diff options
author | jfieber <jfieber@FreeBSD.org> | 1995-05-09 23:19:47 +0000 |
---|---|---|
committer | jfieber <jfieber@FreeBSD.org> | 1995-05-09 23:19:47 +0000 |
commit | e466ffc54dd5937d615db06a1b497efed87548a0 (patch) | |
tree | f8e747afb1dd386e313d7eb05919e3e1e96d9a02 /share/sgml/FreeBSD/doc/example.sgml | |
parent | acd6ba06465e00f8a77b3633e38fc58a7d7d1d63 (diff) | |
download | FreeBSD-src-e466ffc54dd5937d615db06a1b497efed87548a0.zip FreeBSD-src-e466ffc54dd5937d615db06a1b497efed87548a0.tar.gz |
The linuxdoc DTD used for the FreeBSD handbook and FAQ.
Reviewed by: rgrimes
Obtained from: Linux (with modification)
Diffstat (limited to 'share/sgml/FreeBSD/doc/example.sgml')
-rw-r--r-- | share/sgml/FreeBSD/doc/example.sgml | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/share/sgml/FreeBSD/doc/example.sgml b/share/sgml/FreeBSD/doc/example.sgml new file mode 100644 index 0000000..a16b684 --- /dev/null +++ b/share/sgml/FreeBSD/doc/example.sgml @@ -0,0 +1,135 @@ +<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN"> + +<!-- 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. + --> + +<article> + +<!-- Title information --> + +<title>Quick SGML Example +<author>Matt Welsh, <tt/mdw@cs.cornell.edu/ +<date>v1.0, 28 March 1994 +<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> +$ format -Tnroff | qroff | pg +</verb></tscreen> +this will produce plain ASCII. You can also produce LaTeX, and (soon) HTML +and Texinfo. + +<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>Cross references<label id="test-ref"></> + +<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/nroff/ 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/, <sf/sans serif/, <sl/slanted/, +<tt/typewriter/, and <it/italics/. + +<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> |