Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 965e33040dd61030a94f0eb89877aee8 > files > 3420

howto-html-en-20080722-2mdv2010.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>LinuxDoc+Emacs+Ispell-HOWTO: Your first document.</TITLE>
 <LINK HREF="LinuxDoc+Emacs+Ispell-HOWTO-4.html" REL=next>
 <LINK HREF="LinuxDoc+Emacs+Ispell-HOWTO-2.html" REL=previous>
 <LINK HREF="LinuxDoc+Emacs+Ispell-HOWTO.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="LinuxDoc+Emacs+Ispell-HOWTO-4.html">Next</A>
<A HREF="LinuxDoc+Emacs+Ispell-HOWTO-2.html">Previous</A>
<A HREF="LinuxDoc+Emacs+Ispell-HOWTO.html#toc3">Contents</A>
<HR>
<H2><A NAME="s3">3. Your first document.</A>    </H2>

<P>
<H2><A NAME="ss3.1">3.1 From a text document</A>
     </H2>

<P>If you want to turn a text document into SGML to port it to other
formats, this is the way to go:
<P>
<OL>
<LI>Add the following lines at the very beginning:
       
<PRE>
        &lt;!doctype linuxdoc system>
         &lt;article>
          &lt;title>Title Goes Here&lt;/title>
          &lt;author>
           name of author, author's e-mail, etc.
          &lt;/author>
          &lt;date>
           version and date 
          &lt;/date>
       
</PRE>

       </LI>
<LI>If you describe briefly the contents of the document in the
beginning, surround that paragraph with the 
<CODE>&lt;abstract&gt;</CODE> and <CODE>&lt;/abstract&gt;</CODE> tags.
       </LI>
<LI>Then insert the <CODE>&lt;toc&gt;</CODE> tag, which stands for <EM>Table
Of Contents</EM>. 
</LI>
<LI>At the beginning of each new chapter, replace the line giving the
number and title of the chapter with: 

<PRE>
       &lt;sect>The Title Of The Chapter
       
</PRE>

and add the <CODE>&lt;/sect&gt;</CODE> tag at the end of the
chapter.<BR>
<P><B>Note&nbsp;:</B> You don't have to put the chapter number, this
is done automatically.
<P>
</LI>
<LI>Proceed in the same way for sections. You need to
delete their numbers and tag their titles with <CODE>&lt;sect1&gt;</CODE>
and they end with <CODE>&lt;/sect1&gt;</CODE>.
</LI>
<LI>You can also define as many as 4 levels of nesting in the sections,
using <CODE>&lt;sectn&gt;</CODE> and <CODE>&lt;/sectn&gt;</CODE> where
<CODE>n=</CODE> 2, 3, or 4 in a similar way.
</LI>
<LI>In the beginning of each paragraph, insert the <CODE>&lt;p&gt;</CODE>
tag.
</LI>
<LI>If you need to emphasise some parts, tag them with
<CODE>&lt;it&gt;</CODE> and <CODE>&lt;/it&gt;</CODE>
(<I>italics</I>), <CODE>&lt;bf&gt;</CODE> and <CODE>&lt;/bf&gt;</CODE>
(<B>bold face</B>), or <CODE>&lt;tt&gt;</CODE> and <CODE>&lt;/tt&gt;</CODE>
(<CODE>typewriter style</CODE>).
</LI>
<LI>To insert a list like the following one: 

<PRE>
        This is a four lines list:

         - first line goes here
         - second line comes next
         - yet another one
         - that's it.
       
</PRE>

       
you must replace it with:
       
<PRE>
        This is a four lines list:
       &lt;itemize>
       &lt;item>first line goes here
       &lt;item>second line come next
       &lt;item>yet another one
       &lt;item>that's it.
       &lt;/itemize>
        
</PRE>

</LI>
<LI>When a whole block is a part of a program, or something else that
needs to stick out: 

<PRE>
       &lt;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
        &lt;/verb>
       
</PRE>

</LI>
<LI>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
<B>SGML-Tools</B>, which gives more details about the
<B>LinuxDoc</B> document type.
</LI>
</OL>
<HR>
<A HREF="LinuxDoc+Emacs+Ispell-HOWTO-4.html">Next</A>
<A HREF="LinuxDoc+Emacs+Ispell-HOWTO-2.html">Previous</A>
<A HREF="LinuxDoc+Emacs+Ispell-HOWTO.html#toc3">Contents</A>
</BODY>
</HTML>