(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

3. Your first document.

3.1 From a text document

If you want to turn a text document into SGML to port it to other formats, this is the way to go:

  1. Add the following lines at the very beginning:
            <!doctype linuxdoc system>
             <article>
              <title>Title Goes Here</title>
              <author>
               name of author, author's e-mail, etc.
              </author>
              <date>
               version and date 
              </date>
           
    
  2. If you describe briefly the contents of the document in the beginning, surround that paragraph with the <abstract> and </abstract> tags.
  3. Then insert the <toc> tag, which stands for Table Of Contents.
  4. At the beginning of each new chapter, replace the line giving the number and title of the chapter with:
           <sect>The Title Of The Chapter
           
    
    and add the </sect> tag at the end of the chapter.

    Note : You don't have to put the chapter number, this is done automatically.

  5. Proceed in the same way for sections. You need to delete their numbers and tag their titles with <sect1> and they end with </sect1>.
  6. You can also define as many as 4 levels of nesting in the sections, using <sectn> and </sectn> where n= 2, 3, or 4 in a similar way.
  7. In the beginning of each paragraph, insert the <p> tag.
  8. If you need to emphasise some parts, tag them with <it> and </it> (italics), <bf> and </bf> (bold face), or <tt> and </tt> (typewriter style).
  9. To insert a list like the following one:
            This is a four lines list:
    
             - first line goes here
             - second line comes next
             - yet another one
             - that's it.
           
    
    you must replace it with:
            This is a four lines list:
           <itemize>
           <item>first line goes here
           <item>second line come next
           <item>yet another one
           <item>that's it.
           </itemize>
            
    
  10. When a whole block is a part of a program, or something else that needs to stick out:
           <verb>
            10 REM Oh my God what's this?
            20 REM I thought this had long disappeared!
            30 PRINT "I am back to";
            40 PRINT "save the world."
            50 INPUT "From whom, do you reckon? ",M$
            60 IF M$="Bill" THEN PRINT "Thou art wise.":GOTO PARADISE
            70 ELSE PRINT "You ain't got a clue...":GOTO RICHMOND
            </verb>
           
    
  11. Thus far, your SGML formating skills are fairly decent. If you want to refine your document, you may have a look at the user's guide for SGML-Tools, which gives more details about the LinuxDoc document type.

Next Previous Contents