The steps you have to do to create a nice linuxdoc document and map it to the form you need are:
Take a plain text editor of your choice.
Create a file and name it (or later save it as) e.g. start.sgml.
Type the document
Save the file and close your editor.
Run the checker by typing sgmlcheck start.sgml.
If you get errors reported, reopen your document in your editor again and try to correct it
The error messages of sgmlcheck will give you a hint about the type of error and also line and column where it occurred.
. Run the checker again until no more errors occur.
Now you have to decide what's your document for.
Take the apropriate parser mapper combination and translate your document. To find the mappers available in the SGML-Tools see table SGML-Tools mappers for sgml documents.
We start with a simple document (the numbers and colon in the beginning of the line are for explanation, don't type it!):
1: <!doctype linuxdoc system>
3: <title>A Small Linuxdoc Example</title>
4: <p>Hello <em>world</em>.</p>
5: <p><bf>Here</bf> we are.</p>
Now we take a look at the single lines:
A linuxdoc document has to start, like all SGML conform documents, with the preamble. If you like you can take it as a piece of necessary magic, or you can try to find more information about SGML. The preamble is indicating to the SGML-parser, which dtd (document type definition) it should use for checking the syntax of the document.
Open the document class: You have to decide, wich type of document you want to write. See section Document Classes for detailed 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 indicating a simple unstructured document.
Even if optional it's a good idea to give a title to the document. That's done with the <title> tag.
A paragraph marked by the <p> tag, containing the word world wich is inlineemphasized by the <em> tag.
Another completely tagged paragraph, with another word inlineboldfaced by the <bf> tag.
Here we close the open document class tag.
The same example may be written a little bit shorter, by leaving out tags which are placed automatically by the parser, and by using shortened tags:
1: <!doctype linuxdoc system>
3: <title>A Small Linuxdoc Example
4: <p>Hello <em/world/.
6: <bf/Here/ we are.
Now we look at the single lines again:
The document class (also unchanged).
The title. It's not closed, because the p tag in the next line is implicitely closing it.
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.
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 interpreted as a end of the current paragraph and the start of a new one.
Another paragraph (not opened directly), with another short inline tag.
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.