bug-texinfo
[Top][All Lists]
Advanced

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

Re: Small document and sample HTML and DocBook


From: Noah Slater
Subject: Re: Small document and sample HTML and DocBook
Date: Tue, 6 Jan 2009 12:22:36 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Dec 24, 2008 at 06:28:26PM -0600, Karl Berry wrote:
>       I would like to suggest that this be the [HTML] output instead:
>       ...
>       * added a proper DOCTYPE, you might want to use "transitional" though
>
> The suggestion has been made before.  We even generated a DOCTYPE at one
> time, as I recall.  The experience was that having a DOCTYPE is nothing
> but a recipe for trouble with overzealous or buggy browsers, whereas
> omitting it has never hurt anything in practice.

Unfortunately, this is not the case. :(

Most browsers operate in two modes, standards mode and quirks mode. Standards
mode is when the browser uses the most correct rendering model and applies CSS
in the most correct way possible. Quirks mode is for older web pages and applies
purposefully buggy rendering and CSS so as not to break things too badly.
Designing modern CSS for a page that browsers render in quirks mode is insanely
difficult, and so any CSS tutorial or expert will always tell you to make sure
your documents are triggering standards mode first.

These modes are triggered by DOCTYPEs, and a comprehensive list can be found:

  http://hsivonen.iki.fi/doctype/ (Activating Browser Modes with Doctype)

The most commonly applicable DOCTYPE from that list is:

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd";>

This activates HTML 4.01 standards mode, and would be my *firm* recommendation.

>   * indented the output, but I wouldn't actually bother to do that in 
> texi2html
>
> Having more readable output wouldn't hurt ...

Sure, but pretty printing HTML is *really* hard.

It's probably best to leave that to a tool like HTMLTidy if it becomes an issue.

>   * added a <h1> element that contains the document title (important change)
>
> How the frontmatter gets handled in HTML has always been rather ad hoc.
> Using the @settitle string in the absence of actual node title seems
> reasonable.

Great!

> Are these changes something for Docbook output in general, or just for
> this type of nodeless document?  (Obviously, the fewer special cases,
> the better.)  Probably the Docbook output needs your thorough review,
> not just more ad hoc changes.

My changes here were very general, and so should be broadly applicable.

I am more than happy to help out with the DocBook output.

-- 
Noah Slater, http://tumbolia.org/nslater




reply via email to

[Prev in Thread] Current Thread [Next in Thread]