« Return to Thread: should I use section or sect1, sect2, sect3 etc?

Re: should I use section or sect1, sect2, sect3 etc?

by Warren Young :: Rate this Message:

| View in Thread

Rock Lobster wrote:
>
> I'm somehow confused on whether I should use nested <section> tags, or the
> "predefined" <sect1> to <sect5>.
> Are there any benefits in using the latter? Are there any reasons why one
> way should be avoided in certain situations?

DocBook is all about semantic markup.  If your document has a fixed
nesting structure, you should express that in the document.  If sections
are less formal, use the generic tag.  Take a reference manual, for
example: you could lay down a rule that says that the chapter
introductions are always at level 1, followed by the main topics of that
chapter at level 2, and any subtopics at level 3.  You're expressing the
strict hierarchical nature of your document in the markup, and that's a
good thing.

If it's constructed with semantic markup in mind, you should be able to
look at a DocBook document and get a pretty good idea of what sort of
document it is just from the tags it uses.

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@...
For additional commands, e-mail: docbook-help@...

 « Return to Thread: should I use section or sect1, sect2, sect3 etc?