<!DOCTYPE linuxdoc
         PUBLIC "-//LinuxDoc//DTD LinuxDoc 97//EN" >
<!-- ================================================= -->
<!--

    $Id: example.sgml,v 1.1.1.1 2001/05/24 15:57:40 sano Exp $

    This is the Linuxdoc SGML example file, distributed
    with the SGML-Tools package. It was originally
    written for authors of Linux HOWTO's.

    $Log: example.sgml,v $
    Revision 1.1.1.1  2001/05/24 15:57:40  sano
    linuxdoc-tools 0.96
    This is re-imported because of cvs repository is lost
    due to HDD trouble

    Revision 0.1.0.1  2000/05/13 14:59:57  sano
    Initial release of Linuxdoc-Tools

    Revision 1.1  1997/07/09 13:18:45  cg
    * Added contrib/bk, with a lot of work-in-progress from Bernd. (CdG)


    Comments: Here's an SGML example file. Format it
    and print out the source, and use it as a model
    for your own SGML files. As you can see, this is
    a comment.
    Initial version by Matt Welsh, 28 March 1994.
    Modified by BK, May 1997, for strict DTD.
    Removed sf/sans serif, sl/slanted, it/italics.
    Removed MW e-mail (not maintaining this anymore).

                                                       -->
<!-- ================================================= -->


<article>

<!-- Title information -->

<title>Quick SGML Example
<author>Matt Welsh
<date>v1.01, 12 May 1997
<abstract>
This document is a brief example using the Linuxdoc-SGML DTD.
</abstract>

<!-- Table of contents -->
<toc>

<!-- Begin the document -->

<sect>Introduction

<p>
This is an SGML example file using the Linuxdoc-SGML DTD. You can format it
using the command
<tscreen><verb>
% sgml2txt example.sgml
</verb></tscreen>
this will produce plain ASCII. You can also produce LaTeX, and HTML
and GNU info.

<sect>The source

<p>
Looking at the source for this file will be instructive to show you how
to use many of the Linuxdoc-SGML constructs. You should also read the
<em/Linuxdoc-SGML User's Guide/, in the file <tt/guide.sgml/.

The source looks and feels like LaTeX, as you can see. Paragraphs are
separated by blank lines, macros are enclosed in angle brackets. It's
quite simple.

<sect>Some examples

<p>
Here are examples of things that you'll be using in the source. First,
let's decend into a subsection:

<sect1>This is a subsection

<p>
As the header says. Note that you need to use the <tt/p/ command to
start the body of the section, after the <tt/sect1/ command.
Here's a subsubsection:

<sect2>This is a subsubsection

<p>
Right. 5 levels of sections are available. Use the commands
<tt/sect/, <tt/sect1/, <tt/sect2/, <tt/sect3/, and <tt/sect4/ to get them.
This document uses the <tt>article</> document style, which is
appropriate for HOWTOs and other docs; the <tt>report</> style (which
includes the <tt/chapt/ sectioning command) should be used for the LDP docs.

<sect1>Example text

<p>
All right, so you're typing along, and you want to show some example code,
or example I/O with a program, whatever. Use the <tt/code/ or <tt/verb/
``environments'' for this, wrapped in a <tt/tscreen/ environment, as so:
<tscreen><verb>
This is an example verb environment.
</verb></tscreen>
As well as:
<tscreen><code>
This is an example code environment.
</code></tscreen>
The <tt/tscreen/ environment just sets the font to small type and
indents it nicely. It's not required for using <tt/verb/ or <tt/code/,
but I suggest that you do.

The <em/Linuxdoc-SGML User's Guide/ explains what special characters you
can and can't use in the <tt/verb/ and <tt/code/ environments.

<sect1><heading><label id="test-ref">Cross references</>

<p>
What about cross-references? This section has been marked with the
<tt>label</> command; using <tt>ref</> will provide a cross reference,
as in ``See Section <ref id="test-ref">'' for more.

Right now cross-references don't work in the <tt/groff/ translation for
plain ASCII.

<sect1>Using fonts

<p>
You want fonts, we got fonts. Of course these won't show up in the
plain ASCII text, but they all map into the various output formats:
<bf/boldface/, <em/emphasis/, and <tt/typewriter/.

<sect1>Lists

<p>
Lists are easy as well. Just use the <tt/itemize/ element with the
<tt/item/ commands, seen here:
<itemize>
<item> This is a list.
<item> Nothing exciting about that.
       <itemize>
       <item> Multiple levels are supported as well.
       <item> Again, that's no surprise.
       </itemize>
       <enum>
       <item> Enumerated lists using <tt>enum</> also work.
       <item> Description environments using <tt>descrip</> along
	      with <tt>tag</> are also available, as seen here.
       </enum>
       <descrip>
       <tag/First item./ Here's one item.
       <tag/Second item./ Here's another.
       <tag/Third item./ Can we go for three?
       </descrip>
<item> A final item to top it all off.
</itemize>

This is just about everything that you need to get started with
writing SGML docs using the <tt/linuxdoc-sgml/ DTD. Please let me know
if you think something should be changed or added to this document.

</article>
<!-- ================================================= -->
<!-- end of example.sgml                               -->
<!--
     Local Variables:
     mode: sgml
     End:                                              -->
<!-- ================================================= -->