Next Previous Contents

3. A minimalistic document

In this section you'll find what you'll need for a minimalistic linuxdoc dtd conform document. It's intended to give a first touch.

Skip it, if you allredy now the principles.

3.1 Step By Step

The steps you have to do to create a nice linuxdoc document and map it to the form you need are:

3.2 A Startup Document

We start with a simple document (the numbers and colon in the begining of the line are for explanation, don't type it!):


1: <!doctype linuxdoc system>
2: <notes>
3: <title>A Small Linuxdoc Example</title>
4: <p>Hello <em>world</em>.</p>
5: <p><bf>Here</bf> we are.</p>
6: </notes>

Now we walk through the single lines:

  1. A linuxdoc document has to start, like all SGML conform documents, with the preambel. If you like you can take it as a piece of neccessary magic, or you can try to find more information about SGML. It is indicating to the SGML-parser, wich dtd (document type definition) to use for parsing the syntax of the tags and entities.
  2. Open the document class: You have to decide, wich type of document you want to write. See section Document Classes for a more detailled description about that document classes. The necessary header information, wich is depending on the document class is also explained there. In our case we place a <notes> tag forming a note, wich is not allowing (and therefore also not asking for) chaptering and sectioning.
  3. Even if optional it's a good idea to give a title to the document. That's done with the <title> tag.
  4. A paragraph marked by the <p> tag, containing the word world wich is inline emphasized by the <em> tag.
  5. Another completely tagged paragraph, with another word inline boldfaced by the <bf> tag.
  6. Closing the open document class tag.

The same example may be writtten a little bit shorter, by leaving out tags, wich are placed implicitely, and by using shortened tags:


1: <!doctype linuxdoc system>
2: <notes>
3: <title>A Small Linuxdoc Example
4: <p>Hello <em/world/.
5:
6: <bf/Here/ we are.
7: </notes>

Now we walk through the single lines again:

  1. The preambel.
  2. The document class (also unchanged).
  3. The title. It's not closed, because the p tag in the next line is implicitely closing it.
  4. The paragraph is implicitly closing the title. The emphasize tag is noted in short form. The short notation you can use only if your tagged text doesn't contain a litteral /. The paragraph is not explicitly closed in this line.
  5. The empty line here is the reason, why you don't need to close the previous paragraph and don't need to open the next one. A empty line is taken as a end of a paragraph and the start of a new one like the combinatiton </p><p>.
  6. Another paragraph (not opened directly), with another short inline tag.
  7. Closing the open document class tag, wich is implicitly also closing the still open paragraph.

Maybe now it's a little bit more clear, who you have to work with tags.


Next Previous Contents