<!doctype debiandoc public "-//DebianDoc//DTD DebianDoc//EN">

<debiandoc>

<book id="Debiandoc-example">
<title>Debiandoc example</title>
<author>
 <name>Osamu Aoki</name>
 <email>debian@aokiconsulting.com</email>
</author>
<author>
 <name>David Sewell</name>
 <email>drs2n@virginia.edu</email>
</author>

<version>Version 1.00 August 2002</version>

<abstract>
This provides a simple example of a debiandoc-sgml document.
You cannot place "ref" tag in here, if "info" needs to be generated.
This includes "Style Sheet for Debian Reference -- spellings and usage".
</abstract>

<copyright>
  <copyrightsummary>
    Copyright &copy; 2002 by Osamu Aoki <email>debian@aokiconsulting.com</>
  </copyrightsummary>
  <p>
  <url id="http://www.gnu.org/copyleft/gpl.html"
        name="This document may used under the terms of the GNU General Public License version 2 or higher.">
</copyright>
<toc sect1>  <!-- list section to sect1 -->

<chapt>How to use this
<p>
<example>
$ debiandoc2text example.sgml
$ debiandoc2html example.sgml
$ debiandoc2latexpdf example.sgml
</example>

<chapt>General Notes
<p>
<sect>Case and quotation
<p>
Distribution codenames uppercase: Potato, Woody
<p>
Use "..." (double quotations, American usage) for most quotation.  
"..." becomes a set of curly quotes in PDF but source SGML code is a set 
of straight double quotes.
<p>
Use `' (grave and apostrophe in source SGML) to quote a letter or key name: 
type `S'  (Rationale: printed output converts "..." to curly quotes, but
doesn't convert '' similary. `' convert set of curly single quote and 
looks better. Also, text output uses `...' for cross-ref quotation.)
No need to use any quotation with tt-tags like 
<example>`&lt;tt&gt;...&lt;/tt&gt;'</example>.
<p>
For terms like "bash", "perl", and "awk" that double as command names
and names of programming languages, use:
<list>
<item>capitalized name when referring to the language.
<item>Likewise, capitalize a program name when used to describe a well-known
program suite: Exim, Mutt, Elm, Vim, Samba, Emacs, etc.
<item>&lt;prgn&gt; tag for the program command.
<item>&lt;tt&gt; tag for the program command with command line options.
<item>&lt;file&gt; tag for the full path file or directory name.
</list>
Thus:
<list>
<item>The developer of Perl is Larry Wall
<item>To check your Perl version, use <tt>perl -V</tt>. (taged as
  <tt>&lt;tt&gt;...&lt;/tt&gt;</tt>)
<item><prgn>perl</prgn> (taged as <tt>&lt;prgn&gt;...&lt;/prgn&gt;</tt>) should be 
located in <file>/usr/bin</file> (taged as <tt>&lt;file&gt;...&lt;/file&gt;</tt>)
</list>
See next sections for more on tags.

<sect id="inline-tag">Inline tags
<p>
Followings will elucidate effect of each tag (check result in each format, 
wrapping is enabled for these tags.):
<taglist>
 <tag>"em"
  <item> &mdash; <em>emphasis</em>, _text_ HTML=italics
 <tag>"strong"
  <item> &mdash; <strong>more emphasis</strong>, _text_ HTML=PDF=BOLD
 <tag>"var"
  <item> &mdash; <var>metasyntactic variable</var>, &lt;text&gt; HTML=PDF=italics
 <tag>"prgn"
  <item> &mdash; <prgn>program-name-or-well-known-file-name</>, `text' HTML=PDF=fix
 <tag>"package"
  <item> &mdash; <package>package-name</package>, `text' HTML=PDF=fix
 <tag>"file"
  <item> &mdash; <file>/full/path/file/or/directory/name</>, `text' HTML=PDF=fix
 <tag>"tt"
  <item> &mdash; <tt>terminal input/output with <var>metasyntactic variable</></>,
    `text' HTML=PDF=fix (variable=italics fix)
</taglist>

<sect>Example tag
<p>
&lt;example&gt; tag is good for terminal interaction, table, ... 
where no-wrapping is desirable.
<example>
&lt;example&gt;
0        1         2         3         4         5         6         7
123456789012345678901234567890123456789012345678901234567890123456789012
&lt;- must be liess than 72 char (70 better) per line within example tag -&gt;
   this is because this section is not wrapped.
# root-shell-command &lt;var&gt;variable&lt;/var&gt;   # sgml original
# root-shell-command <var>variable</var>               # result
$ user-shell-command &lt;var&gt;variable&lt;/var&gt;
$ user-shell-command <var>variable</var>
&lt;/example&gt;
</example>

<chapt>Examples of SGML

<sect>Cross reference
<p>
<list>
<item>&lt;ref id="inline-tag"&gt;:<ref id="inline-tag">
<item>&lt;manref name="ls" section="1"&gt;: <manref name="ls" section="1">
<item>&lt;url id="http://www.debian.org" name="Debian"&gt;:<url id="http://www.debian.org" name="Debian">
</list>

<sect>List
<p>
This section illustrates how list-types render SGML.  
Compare results with the source.  
Tag-list has some limitation in wrapping.
<p>
List:
<list>
<item>Item 1 (simple list)
 <list>
 <item>Item 1.1 (sublist)
 <item>Item 1.2 (sublist)
 </list>
<item>Item 2. Long list of words will wrap line into next line. 
  Long list of words will wrap line into next line.
  Long list of word will wrap line into next line.
  Long list of word will wrap line into next line.
 <p>Paragraph
<item>Item 3 <url id="http://www.debian.org/pub/debian/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/path"
 name="long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-url-name">
<item>Item 4
</list>
<p>
Enumlist:
<enumlist>
<item>Item 1 (simple enumlist)
 <enumlist>
 <item>Item 1.1 (sub-enumlist)
 <item>Item 1.2 (sub-enumlist)
 </enumlist>
<item>Item 2
  Long list of words will wrap line into next line.
  Long list of words will wrap line into next line.
  Long list of words will wrap line into next line.
 <p>Paragraph
  Long list of words will wrap line into next line.
  Long list of words will wrap line into next line.
  Long list of words will wrap line into next line.
<item>Item 3
 <list>
 <item>Item 3.1 (sublist)
 <item>Item 3.2 (sublist)
 </list>
<item>Item 4 <url id="http://www.debian.org/pub/debian/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/path"
 name="long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-url-name">
</enumlist>

Taglist:
<taglist>
<tag>Tag 1 <url id="http://www.debian.org/pub/overflow-in-pdf-debian/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/path"
 name="overflow-in-pdf-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-url-name">
<item>Item 1 (simple taglist)
 <enumlist>
 <item>Item 1.1 (sub-enumlist)
 <item>Item 1.2 (sub-enumlist)
 </enumlist>
<tag>Tag 2
  Long list of words will wrap line into next line.
  Long list of words will wrap line into next line.
  Long list of words will wrap line into next line.
<item>Item 2
  Long list of words will wrap line into next line.
  Long list of words will wrap line into next line.
  Long list of words will wrap line into next line.
 <p>Paragraph
  Long list of words will wrap line into next line.
  Long list of words will wrap line into next line.
  Long list of words will wrap line into next line.
<tag>Tag 3
<item>Item 3
 <list>
 <item>Item 3.1 (sublist)
 <item>Item 3.2 (sublist)
 </list>
<tag>Tag 4
<item>Item 4
</taglist>

<chapt>Word convention
<p>
Alphabetical list of word convention:
<example>        
APT            # an acronym, not a single program name
auto-start
back end
boot disk
chip set
codename
conffile
de-install
email
filename
file system
hard link
multi-byte
multi-user
multi-volume
nameserver
non-developers
on-screen
overwrite
post-configuration
pre-release
reconfigure
record-keeping
regular-expression (adj.)
runlevel
setup
single-user (adj.)
start-up
sysadmin
Web
Web page
website
</example>        

</book>
</debiandoc>

