[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Several questions to sgml-tools



On Thu, Oct 29, 1998 at 11:28:36PM +0100, Andreas Tille wrote:
> On Thu, 29 Oct 1998, Antti-Juhani Kaijanaho wrote:
> 
> > can't find a good tag in linuxdoc, you can either file a wishlist bug
> > or develop your own DTD and use (IIRC) Jade.  In the former case, you
> > would be better served by writing in TeX and *roff directly, and
> > forget about SGML and HTML, since they cannot help you.
> I had some experiences with HyperLatex.  I think this will be my friend
> instead of SGML, because I don't think that I have to write my own
> DTDs.

The worst thing is, a DTD is not hard to write, but will gain you nothing
for your needs. You are mainly interested inthe output, but a DTD will not
output anything. For the output, you'll need a DSSSL style specification,
which is written according to yet another standard, in a scheme like
language. It is all very interesting, but doesn't serve your needs quickly.
  
> > Your ideas do show that you haven't grasped the idea of separating
> > content from presentation, which is fundamental to SGML, HTML and
> > LaTeX (in decreasing order of the idea's importance).  However, that
> > does not imply that you are a beginner: I know many professional HTML
> > authors that make the same mistake.
> OK, so far.  I ask my question other way around.  Content is a
> formula equation (not to complicated so that it could be expressed
> with ASCII).  I think an appropriate representation would be to
> center this formula on a single line.  Question: Which tag is the
> right one to tell my style that this is an equation.
> ... so far to the centering problem ;-).

HTML will not display any math correctly, use TeX for that ;)  If you want
to display ascii, use a tag that represents such. "pre" will do, maybe in
conjunction with "blockquote" (if it exists) or something similar.

If you really need it centered, you can hint it using Cascade Style Sheets
with HTML 4.0.
  
> > On the second point, I'm not sure what you mean with "literate
> > programming".  In the Knuthian sense: no, SGML is not a literate
> > programming tool.
> To be more precise:  I've read in the GTK list that DocBook is a tool
> which uses SGML to enable literate programming (more or less in
> the Knuthian sense).  I havn't the faintest idea what kind of a
> beast DocBook is but having a very short look at the documentation
> it seems to have a complete set of LaTex equivalent tags.  Seemed
> me rather interesting.

DocBook is a DTD, just as HTML 4.0. It is used for technical documentation.
Both are SGML Document Definitions.

Really, if you are interested in such things you should take some books
about SGML, DSSSL, XML, XMS and read them. The concept is different from
text processing and from common web design/html. (html is misused often).
  
> > Yes.  In fact, you are asking too much of HTML, too.  You cannot
> > expect Lynx to show larger fonts, yet Lynx is (at least trying to be)
> > a conforming HTML implementation.  Likewise, you cannot expect a
> > speech syntesizer to implement text centering - the whole idea is
> > meaningless in that context!  Yet, many visually impaired people do
> > use speech synthesizers for reading HTML documents.
> But HTML contains certain Tags for changing the font size and for instance
> you can include images too.
> Thats well defined in the HTML standard.

Wrong. HTML 4.0 strict does not use such tags. HTML 4.0 transition defines
such tags but only for backward compliance and as an interim solution. HTML
4.0 transition should not be used any longer. You should use Cascade Style
Sheets for presentation. Never depend on presentation.

> For poor browsers like lynx exist default methods like showing the
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Shame on you.

> "alt" field of the img tag or printing the text with bigger font in
> different color for instance.

This is actually preferred by me. It is also preferred by visually impaired
people, or over telnet, or...

Do not think that lynx can't make use of gif or jpg files. I can view them
using mime capabilities and zgv. The fact that you consider lynx as "poor"
shows that you didn't grab the concept yet. Unfortunately, you are not
alone: The web is probably the biggest misunderstanding in the 20th century.

> I thing speech synthesizers will have several problems to express
> Headings of sections too.  Do they shout at the listener with
> screaming voice at <h1> headings and shout a little bit more moderate
> at <h2>s?

No. They could say: "Secion blablabla" "Subsection blablabla". They can
implement rests (pauses, breaks), and use longer breaks before H1.

> There ARE content elements that produce exactly bigger fonts
> and so they are available.

No.

> But not all things which should be in bigger fonts are section headings.
> For instance, I want to print a warning that my software is Alpha.
> It wouldn't be good style for a typesetter to change the fontsize
> for that purpose but in a HTML document I consider this to be
> necessary for reasons I don't want to explain here.
> Is there a tag <warning>?  --- No.

This shows thatthe designer of html were aware, that not all tags they could
invent would be implemented and used. They restricted themself to a small
subset, which is bearable/understandable by the masses, which shows that the
designer of html are wise people. If you want a lot of tags, use docbook, or
write your own dtd. But then, you also need stylesheets or a browser...

To get the desired result, use things like:

<EM STYLE="warning">
Alpha Software
</EM>

and cascade stylesheet:
EM.STYLE { background-color: red, foreground-color: black, font-size: bigger} 


(but check the right syntax prior, this is from the top of my head, and I
don't do much html).

> How can I define rules to get such a tag?  --- Write my own DTD.

No, a DTD wouldn't help you, as browsers are closed-minded and not aware of
it. Use cascade style sheets. Install the doc-html-w3 package (or sim.)

> I can't imagine that I'm the first who need this feature and so
> my question is:  Has anybody found a solution for this, because
> I will definitely not write any DTD.  I want to write a C program
> and if the effort for writing the documentation exceeds the effort
> of programming I simply leave out the documentation or write
> a short README:
>     Look at the source. It is selfexplaining. Have fun.

Look at www.w3.org. There's lots of stuff. Have fun.
 
> Of course, but if there are missing some logical concepts, how to
> get the right markup with a reasonable effort.

What is the right markup? Will you consider any situation? What if you use
red colors and green colors, but I'm red-green-blind? Or I use a monochrom
monitor? Or I'm visually impaired? or in text mode over a slow console?

What if I'm not reading the text, but listening to it? What if I want to use
your source and transform it to another format/style/document?

A lot of people have made a big effort to find solutions for this problems.
You have to made the effort and learn the concepts. First, don't think of
the presentation, think of the underlying structures of your document. Then
the computer can make sense of what you write, and a text to speech
synthesizer, too.
  
> > Probably.  Last time I looked at that side of sgml-tools, it was quite
> > simplistic.  You will probably get better results if you start using
> > Jade.
> Can you explain in short words what jade is.  Does it contain
> styles in the sense I described above or is it an interpreter
> to work with selfwritten DTDs?

jade is a dsssl processor, and can transform SML documents that are conform
to a dtd to (html|rtf|ps) if a dsssl style specification exists for the dtd.

For example docbook:

               +-----------+
               |DocBook DTD|
               +-----------+
                    |
                    v
               +-----------+
<document> ->  |  nsgmls   |
               | conform?  |-(no)-> edit your document
               +-----------+
                    | (yes)
                    v
              go on with jade


              +------------------------------+
              | DSSSL style sheet for docbook|
              +------------------------------+
                        |
                        v
                  +-----------+
  <document> ->   |    jade   |  -> html output, or rtf output, or ps output
                  +-----------+

This is an oversimplification.

The whole process is quite complex. The standards involved are ISO standards
and several hundred pages long. You don't need to know all to work with it,
but you should know about the fundamental concepts. There are some tutorials
for it, if you're interested, I can provide you with basic stuff.

Marcus

                  
-- 
"Rhubarb is no Egyptian god."        Debian GNU/Linux        finger brinkmd@ 
Marcus Brinkmann                   http://www.debian.org    master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de                        for public  PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       PGP Key ID 36E7CD09


Reply to: