(M)  s i s t e m a   o p e r a c i o n a l   m a g n u x   l i n u x ~/ · documentação · suporte · sobre

  Next Previous Contents

4. Document Classes


<!element linuxdoc o o 
        (sect | chapt | article | report | 
         book | letter | telefax | slides | notes | manpage ) >

This is describing the overall class of the document, so naturally it has (leave alone the doctype definition) to be the first tag enclosing your whole document. Some of the tags namely the sect and chapt (see section Sectioning Tags) doesn't make any sense taken them standalone despite being included as part of more complete classed document, so we'll describe them later as a part of the other document classes. Decide first which of the top mentioned document classes fits the type of the document you want to write best.

To find a detailed description of the document classes see table Document classes.


Chapter
Class tag
Article Tag<atricle>
Report Tag<report>
Book Tag<book>
Letter Tag<letter>
Telefax Tag<telefax>
Slides Tag<slides>
Notes Tag<notes>
Manpage Tag<manpage>
Document classes

To me the article class is the most important one. That´s the reason why it´s described first and most detailed.

4.1 Article Tag


<!element article - -
        (titlepag, header?,
         toc?, lof?, lot?, p*, sect*,
         (appendix, sect+)?, biblio?) +(footnote)>

<!attlist article
        opts cdata "null">

You can see that the article needs some tags included. They will be explained in consequence.

The options attribute (opts) takes a comma separated list with thy different style (LaTeX .sty) sheets to inlude within the document.

Titlepage Tag


<!element titlepag o o (title, author, date?, abstract?)>

The Titlepage Tag (titlepag) is implicitly placed as soon a you started your document class. You don't need to write it explicitly. Anyway you have to note it's mandatory tags. It's purpouse is to describe the layout and elements of the titlepages.

Title Tag


<!element title - o (%inline, subtitle?) +(newline)>

Each document class wich owns a titlepage of course needs a title, wich is noted down with a <title> tag. You don't need to close thatone. A title may contain a subtitle started by the <subtitle> tag.

If you look at the headerpage of this document you'll find it to be mapped from the tags:

<title>Linuxdoc Reference
<subtitle>A introduction to the linuxdoc dtd

Author Tag


<!element author - o (name, thanks?, inst?,
                        (and, name, thanks?, inst?)*)>

Usually you place the (your) name here. People should know who wrote the document, so you place a <author> tag. If you don't note the name tag it´s imlicitly placed. The author has also optional items wich can be tagged within the author tag.

If you want to say thanks to anyone (might be somebody providing usefull information) you place it within the <thanks> tag. Next, if your writing is done in your position of an institution staff member, place it within the <inst> tag.

The <and> tag is starting the whole story again, as if there would be a second author tag would have been started. Clearly thisone is for coauthors.

Date Tag

If you want to mark your document with a date, you can do that with the <date> tag.

It's not checked weather you really place a valid date here, but don't abuse it.

Abstract Tag

This tag is intended for an abstract description of your document. Don't mix the <abstract> tag withh an indruduction wich is likely to be placed inside the first section of your document (see section Sectioning).

Header Tag


<!element header - - (lhead, rhead) >
<!element lhead - o (%inline)>
<!element rhead - o (%inline)>

A <header> tag specifies what should be printed at the top of each page. It consists of a left heading i.e. <lhead> and a right heading i.e. <rhead>). Both elements are required, if a heading is used at all, but either may be left empty, so that the effect of having only a left or right heading can be achieved easily enough.

As we will see, an initial header can be given after the title page. Afterwards, a new header can be given for each new chapter or section. The header printed on a page is the one which is in effect at the end of the current page. So that the header will be that of the last section starting on the page.

Table Of Contents Tag

If you place the <toc> tag, a table of contense will be generated, by looking the section heading, and adding references.

In a hyperref document, this might be hyperrefs, in a LaTeX document you will come to see the pagenumbers.
Only the sections major to the sect3 will be included.

List Of Figures Tag

If you place the <lof> tag, a list of figures will be generated, by looking the captions of the figures, and adding references.

List Of Tables Tag

If you place the <lot> tag, a list of tables will be generated, by looking the captions of the tables, and adding references.

Body

Here you place various sections according section Sectioning. There is no body tag. The body starts with the first chapter, section or paragraph.

Appendix Tag

In the end of the article you can place the <appendix> tag

Really you shouldn't think about people (e.g. m.d.s knifing your belly here.
, wich starts a area of appended sections. The appendix tag implies a different section numbering type to the following section tags.

Bibliography Tag

It's intended to gather all the <cites> and <ncites> you used within your document. The <biblio> tag will be replaced by a bibliography according the mapping type of the document, maybe by hyperrefs maybe by section numbers or anything wich might be useful.

Until now I've not been able to create a .bbl file, so I wasn't able to verify.

Footnote Tag

A footnote may be place in any spot of your document. Exactly the spot in yout document where you are placing the <footnote> tag should be the one where the reference to the tagged text shuld be rendered. It should be used for additional information, wich is not necessary for understanding the primary purpouse of yor document but might be usefull, interesting, or funny.

Whereas the last one is not always true, even if you try.
anywhere within the article.

4.2 Report Tag


<!element report - -
        (titlepag, header?, toc?, lof?, lot?, p*,
         chapt*, (appendix, chapt+)?, biblio?) +(footnote)>

The report is a document class with a chapter oriented approach. So within a document clasified by a <report> tag the toplevel is grouped by the <chapt> tag (see Sectioning). The rest of the structure is identical to the article class Article Tag.

4.3 Book Tag


<!element book  - -
        (titlepag, header?, toc?, lof?, lot?, p*, chapt*,
         (appendix, chapt+)?, biblio?) +(footnote) >

You will notice that the book element is identical to the report Report Tag. So anything valid there is also valid if you classify your document with a <book> tag.

4.4 Letter Tag


<!entity  % addr "(address?, email?, phone?, fax?)" >

<!element letter - -
        (from, %addr, to, %addr, cc?, subject?, sref?, rref?,
         rdate?, opening, p+, closing, encl?, ps?)>

Also the purpose of the letter document class should be quite self explaining. Place a <letter> tag if you want to write one.

The letter's tags ar described in table Tags in a letter


tag
mandatorywhat's it
fromyesfrom sender
addressnosender's address
emailnosender's email
phonenosender's phone
faxnosender's fax
toyesreceiver
addressnoreceiver's address
emailnoreceiver's email
phonenoreceiver's phone
faxnoreceiver's fax
ccnocarbon copy
subjectnoletters subject
srefnosender's reference
rrefnoreceiver's reference
rdatenoreceived date??
openingyesopening
paragraphsyessee Paragraphs
closingyesclosing
enclnoenclosure
psnopost scriptum
Tags in a letter

4.5 Telefax Tag


<!element telefax - -
        (from, %addr, to, address, email?,
         phone?, fax, cc?, subject?,
         opening, p+, closing, ps?)>

Overall the structure is same to the letter class. The only difference is that with the <telefax> tag the receiver's <fax> tag becomes mandatory.
Should be obvious why.

4.6 Slides Tag


<!element slides - - (slide*) >

The slides class is intended for overhead slides and transparencies. So the structure of a document classified by a <slides> tag is a very simple one. It contains single slide(s) startes by a <slide> tag. Nothing else. If not explicitly written the first slide is started implicitly.

Slide Tag


<!element slide - o (title?, p+) >

A <slide> tag is only allowed within the slides document class. A slide may contain:

A title (see section The Title Tag) and one or more paragraphs (see section Paragraphs). That's all.

4.7 Note Tag


<!element notes - - (title?, p+) >

Intended as a class for personal notes the structure is even more simplified than the slides document class (see The Slide Tag). After classifying a document with the <notes> tag only a title (see section The Title Tag) and one or more paragraphs (see section Paragraphs) are allowed.

4.8 Manual Page Tag


<!element manpage - - (sect1*)
        -(sect2 | f | %mathpar | figure | tabular |
          table | %xref | %thrm )>

This document class is intended for writing manual pages, fitting the need of the man programm. In a document classified by a <manpage> tag the topleve section tag is the sect1 tag (see section Sectioning), for easy pasting manual pages into an article or book document class. The exception here to the nortmal sectioning is, that there is only one subsection level allowed (sect2).


Next Previous Contents