135 lines
3.9 KiB
HTML
135 lines
3.9 KiB
HTML
<!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>
|
|
<!doctype linuxdoc system>
|
|
<article>
|
|
<title>Title Goes Here</title>
|
|
<author>
|
|
name of author, author's e-mail, etc.
|
|
</author>
|
|
<date>
|
|
version and date
|
|
</date>
|
|
|
|
</PRE>
|
|
|
|
</LI>
|
|
<LI>If you describe briefly the contents of the document in the
|
|
beginning, surround that paragraph with the
|
|
<CODE><abstract></CODE> and <CODE></abstract></CODE> tags.
|
|
</LI>
|
|
<LI>Then insert the <CODE><toc></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>
|
|
<sect>The Title Of The Chapter
|
|
|
|
</PRE>
|
|
|
|
and add the <CODE></sect></CODE> tag at the end of the
|
|
chapter.<BR>
|
|
<P><B>Note :</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><sect1></CODE>
|
|
and they end with <CODE></sect1></CODE>.
|
|
</LI>
|
|
<LI>You can also define as many as 4 levels of nesting in the sections,
|
|
using <CODE><sectn></CODE> and <CODE></sectn></CODE> where
|
|
<CODE>n=</CODE> 2, 3, or 4 in a similar way.
|
|
</LI>
|
|
<LI>In the beginning of each paragraph, insert the <CODE><p></CODE>
|
|
tag.
|
|
</LI>
|
|
<LI>If you need to emphasise some parts, tag them with
|
|
<CODE><it></CODE> and <CODE></it></CODE>
|
|
(<I>italics</I>), <CODE><bf></CODE> and <CODE></bf></CODE>
|
|
(<B>bold face</B>), or <CODE><tt></CODE> and <CODE></tt></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:
|
|
<itemize>
|
|
<item>first line goes here
|
|
<item>second line come next
|
|
<item>yet another one
|
|
<item>that's it.
|
|
</itemize>
|
|
|
|
</PRE>
|
|
|
|
</LI>
|
|
<LI>When a whole block is a part of a program, or something else that
|
|
needs to stick out:
|
|
|
|
<PRE>
|
|
<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>
|
|
|
|
</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>
|