This commit is contained in:
gferg 2000-06-01 20:55:08 +00:00
parent 2fbbed232e
commit 78c1f69211
5 changed files with 848 additions and 3 deletions

View File

@ -0,0 +1,844 @@
<!doctype article public "-//OASIS//DTD DocBook V3.1//EN"
[ <!entity header system "header.sgml">
]>
<!-- DocBook file was created by LyX 1.1
See http://www.lyx.org/ for more information -->
<article>
<artheader>
<title>
HOWTO-HOWTO
</title>
<pubdate>v1.10 1 Jun, 2000</pubdate>
<author>
<firstname>Mark</firstname> <surname>Komarinski</surname>
</author>
<abstract>
<para>
List the tools, procedures, and hints to get HOWTO authors up to speed and writing.
</para>
</abstract>
</artheader>
<sect1>
<title>
Introduction
</title>
<sect2>
<title>
History
</title>
<para>
This document was started on Aug 26, 1999 by Mark F. Komarinski after two day's worth of frustration getting tools to work. If even one LDP author is helped by this, then I did my job.
</para>
</sect2>
<sect2>
<title>
New versions
</title>
<para>
The newest version of this can be found on my homepage http://www.cgipc.com/~markk in its SGML source. Other versions may be found in different formats at the LDP homepage <ulink url="http://www.linuxdoc.org/">http://www.linuxdoc.org</ulink>.
</para>
</sect2>
<sect2>
<title>
Comments
</title>
<para>
Comments on this HOWTO may be directed to the author (<ulink url="mailto:markk@linuxdoc.org">markk@linuxdoc.org</ulink>).
</para>
</sect2>
<sect2>
<title>
Version History
</title>
<para>
v1.10 (Jun 1, 2000)
</para>
<itemizedlist>
<listitem>
<para>
Ditched LinuxDoc informaiton. Everyone should be using DocBook by now.
</para>
</listitem>
<listitem>
<para>
Ditched mini-HOWTO information. Everything is now HOWTO format
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>
Copyrights and Trademarks
</title>
<para>
(c) 1999-2000 Mark F. Komarinski
</para>
<para>
This manual may be reproduced in whole or in part, without fee, subject to the following restrictions:
</para>
<itemizedlist>
<listitem>
<para>
The copyright notice above and this permission notice must be preserved complete on all complete or partial copies
</para>
</listitem>
<listitem>
<para>
Any translation or derived work must be approved by the author in writing before distribution.
</para>
</listitem>
<listitem>
<para>
If you distribute this work in part, instructions for obtaining the complete version of this manual must be included, and a means for obtaining a complete version provided.
</para>
</listitem>
<listitem>
<para>
Small portions may be reproduced as illustrations for reviews or quotes in other works without this permission notice if proper citation is given. Exceptions to these rules may be granted for academic purposes: Write to the author and ask. These restrictions are here to protect us as authors, not to restrict you as learners and educators. Any source code (aside from the SGML this document was written in) in this document is placed under the GNU General Public License, available via anonymous FTP from the GNU archive.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>
Acknowledgements and Thanks
</title>
<para>
Thanks to everyone that gave comments as I was writing this. This includes Deb Richardson, Daniel Barlow, Greg Ferguson, Mark Craig and other members of the ldp-discuss list. Some sections I got from the HOWTO Index (available at many LDP locations) and the sgmltools documentation. The sections on network access to CVS was partially written by Serek (<ulink url="mailto:ser@serek.arch.pwr.wroc.pl">ser@serek.arch.pwr.wroc.pl</ulink>). Sections on DocBook were written by Jorge Godoy (<ulink url="mailto:godoy@conectiva.com.br">godoy@conectiva.com.br</ulink>). A great deal of thanks to both of them for their help.
</para>
</sect2>
<sect2>
<title>
Conventions
</title>
<para>
Commands that are listed have the following format. Commands are prefaced with the name of the current shell running. This is followed by a &dollar; for commands that should be run as a normal (non-root) user. Shells followed by a &num; are commands that should be run as a root user.
</para>
</sect2>
</sect1>
<sect1>
<title>
Background on the LDP and SGML
</title>
<sect2>
<title>
The LDP
</title>
<para>
The Linux Documentation Project (LDP) was started to provide new users a way of getting information quickly about a particular subject. It not only contains a series of books on administration, networking, and programming, but has a large number of smaller works on individual subjects, written by those who have used it. If you want to find out about printing, you get the Printing HOWTO. If you want to do find out if your Ethernet card works with Linux, grab the Ethernet HOWTO, and so on. At first, many of these works were in text or HTML. As time went on, there had to be a better way of managing these documents. One that would let you read it from a web page, a text file on a CD-ROM, or even your hand-held PDA. The answer, as it turns out, is SGML.
</para>
</sect2>
<sect2>
<title>
SGML
</title>
<para>
The Standard Generalized Markup Language (SGML) is a language that is based on embedding codes within a document. In this way, its similar to HTML, but there is where any similarities end. The power of SGML is that unlike WYSIWYG (What You See Is What You Get), you don't define things like colors, or font sizes, or even some kinds of formatting. Instead, you define elements (paragraph, section, numbered list) and let the SGML processor and the end program worry about placement, colors, fonts, and so on. HTML does the same thing, and is actually a subset of SGML. SGML has really three parts that make it up. First is the Structure, which is what is commonly called the DTD, or Document Type Definition. The DTD defines the relationship between each of the elements. The DocBook DTD, used to create this document, is an example of this. The DTD lists the rules that the content must follow. Second is the DSSSL or Document Style Semantics and Specification Language. The DSSSL tells the program doing the rendering how to convert the SGML into something that a human can read. It tells the renderer to convert a &lt;table&gt; tag into 14 point bold if it's going to RTF format, or to turn it into a &lt;h1&gt; tag if you're going to HTML.
Finally there is the Content, which is what gets rendered by the SGML processor and is eventually seen by the user. This paragraph is content, but so would a graphic image, table, numbered list, and so on. Content is surrounded by tags to separate out each element.
</para>
</sect2>
<sect2>
<title>
Why SGML instead of HTML or other formats?
</title>
<para>
SGML provides for more than just formatting. You can automatically build indexes, table of contents, and links within the document or to outside. The Jade and OpenJade packages also lets you export (I'll call it render from here on) SGML to LaTeX, info, text, HTML, and RTF. From these basic formats, you can then create other formats such as MS Word, PostScript, PDF and so on. Programs like LyX allow you to write in TeX format, then export it as SGML and render from SGML to whatever you chose. In the end, SGML is more concerned about the way elements work instead of the way they look. A big distinction, and one that will let you write faster, since you don't have to worry about placement of paragraphs, font sizes, font types, and so on.
</para>
</sect2>
<sect2>
<title>
The tools
</title>
<para>
In this section, I'll go over some of the tools that you'll need or want to use to create your own LDP documentation. I'll describe them here, and better define them later on, along with how to install them. If you use some other tool to assist in writing LDP, please let me know and I'll add a blurb here for it.
</para>
<sect3>
<title>
Jade
</title>
<para>
Required unless you use openjade - <ulink url="ftp://ftp.jclark.com/pub/jade/jade-1.2.1.tar.gz">ftp://ftp.jclark.com/pub/jade/jade-1.2.1.tar.gz</ulink>
</para>
<para>
Jade is the front-end processor for SGML. It uses the DSSSL and DocBook DTD to perform the verification and rendering from SGML into the target format.
</para>
</sect3>
<sect3>
<title>
OpenJade
</title>
<para>
Replacement for Jade - <ulink url="http://openjade.sourceforge.net/">http://openjade.sourceforge.net/</ulink>
</para>
<para>
An extension of Jade written by the DSSSL community (see below for what a DSSSL is). Some applications require jade, but are being updated to support either software package.
</para>
</sect3>
<sect3>
<title>
DSSSL
</title>
<para>
Required - <ulink url="http://nwalsh.com/docbook/dsssl/db152.zip">http://nwalsh.com/docbook/dsssl/db152.zip</ulink>
</para>
<para>
The Document Style Semantics and Specification Language tells jade how to render a SGML document into print or online form. The DSSSL is what converts a title tag into an &lt;H1&gt; tag in HTML, or bold, 14 point Times Roman for RTF, for example. Documentation for DSSSL is located at <ulink url="http://nwalsh.com/docbook/dsssl/db152d.zip">http://nwalsh.com/docbook/dsssl/db152d.zip</ulink>. Note that modifying the DSSSL doesn't modify DocBook itself. It merely changes the way the rendered text looks. The LDP uses a modified DSSSL that provides for a table of contents.
</para>
</sect3>
<sect3>
<title>
DocBook DTD (version 3.1)
</title>
<para>
Required - <ulink url="http://www.oasis-open.org/docbook/sgml/3.1/docbk31.zip">http://www.oasis-open.org/docbook/sgml/3.1/docbk31.zip</ulink>
</para>
<para>
The DocBook DTD defines the tags and structure of a DocBook SGML document. Modifying the DTD, such as adding a new tag, doesn't make it DocBook anymore.
</para>
</sect3>
<sect3>
<title>
sgmltools-lite
</title>
<para>
Recommended - <ulink url="http://sgmltools-lite.sourceforge.net/">http://sgmltools-lite.sourceforge.net/</ulink>
</para>
<para>
This is the successor to the sgmltools project, which has officially been disbanded for over a year. Since then, Cees de Groot has created a slightly different project, which acts as a wrapper to the jade SGML processor. It hides much of the ugliness of syntax. This author was able to install the old sgmltools package followed by the sgmltools-lite and could format this document quite easily. There's even a man page for sgmltools showing syntax.
</para>
</sect3>
<sect3>
<title>
TeX
</title>
<para>
Optional
</para>
<para>
TeX (rhymes with blech!) is the markup language of choice for many, including those in the mathematics world. I still remember many Calculus exams that were written in TeX. It is also one of the first markup languages that is still around (the other being the *roff formats used in man pages). TeX actually follows some of the same concepts that SGML does. However, TeX renders its files into DVI (Device Independent) that can then be rendered into another format. Unfortunately, DVI can't be easily converted into anything other than printer languages (PostScript, PCL), making it hard to use to generate HTML. TeX is installed or is available with most Linux distributions. TeX is available on almost all distributions as LaTeX or TeTeX. Either should work for you.
</para>
<para>
Some of the tools use TeX to convert into PostScript and PDF, so you may need it installed if you want to render to those formats. You'll probably also need it to install LyX (see below). If you're not using LyX, PostScript, or PDF, you won't need TeX.
</para>
</sect3>
<sect3>
<title>
LyX
</title>
<para>
Optional - <ulink url="http://www.lyx.org/">http://www.lyx.org/</ulink>
</para>
<para>
LyX provides the power of writing SGML with the ease-of-use of a regular word processor. It's not a WYSIWYG program, but more WYSIWYM (What You See Is What You Mean) application, since what you see on the screen isn't necessarily what happens after the SGML processor is done with it. The display that LyX provides is similar to, but not exactly like, what the output from jade would look like. However, it's close enough for you to see the flow of the document. Sections and subsections are numbered and put in bold, and different fonts are used to signify things like &lt;code&gt; or &lt;url&gt; tags. Most tags are hidden from the main LyX window while you edit, since LyX writes in TeX, then exports the TeX to SGML.
</para>
<figure><title>LyX screen shot</title>
<mediaobject>
<imageobject>
<imagedata fileref="lyx_screenshot.jpg" format="jpg">
</imageobject>
</mediaobject>
</figure>
</sect3>
<sect3>
<title>
Emacs (PSGML)
</title>
<para>
Optional - <ulink url="http://www.lysator.liu.se/~lenst/about_psgml/">http://www.lysator.liu.se/~lenst/about_psgml/</ulink>
</para>
<para>
Emacs has an SGML writing mode called psgml. Anyone with experience writing in this mode is welcome to e-mail the author of this document. psgml is a major mode in Emacs designed for editing SGML and XML documents. It provides &quot;syntax highlighting&quot; or &quot;pretty printing&quot; features that make SGML tag stand out, a way to insert &quot;tags&quot; other than typing them by hand, and the ability to validate your document while writing.
</para>
<para>
For users of Emacs, it's a great way to go, and many believe it to allow more versatility than any other SGML documentation tool. It works with DocBook, LinuxDoc and other DTDs equally well.
</para>
</sect3>
<sect3>
<title>
WordPerfect 9 (Corel Office 2000)
</title>
<para>
Optional - <ulink url="http://www.corel.com/">http://www.corel.com/</ulink>
</para>
<para>
WordPerfect 9 for the MS Windows platform has support for SGML and DocBook 3.0. WordPerfect 9 for Linux has no SGML capabilities.
</para>
<para>
This is the least expensive of the commercial applications that support SGML.
</para>
</sect3>
<sect3>
<title>
DocBook: The Definitive Guide
</title>
<para>
Optional (but recommended) - <ulink url="http://www.docbook.org/">http://www.docbook.org/</ulink>
</para>
<para>
This book was released by O'Reilly in October 1999, and is a great reference to DocBook. I have not found it to be a great practical book, and much of the emphasis is on XML, but the DocBook tags for version 3.1 are all listed in a handy format. You can pick it up at the book vendor of choice. The entire book is also available online at the above URL.
</para>
</sect3>
<sect3>
<title>
Aspell
</title>
<para>
Optional - <ulink url="http://aspell.sourceforge.net/">http://aspell.sourceforge.net/</ulink>
</para>
<para>
This spell checking application can work around SGML tags, and only spell check the content within the tags. Default spell checkers like ispell will try to spellcheck the tags, causing errors at every new tag.
</para>
</sect3>
<sect3>
<title>
Cygnus DocBook Tools
</title>
<para>
Optional (may be Red Hat specific) - <ulink url="http://www.redhat.com/">http://www.redhat.com/</ulink>
</para>
<para>
Red Hat distributes three packages, possibly starting with 6.2, that include DocBook support and some tools. They provide for only rendering to HTML and PDF, but they're easily installed if you have Red Hat, allowing you to focus more on writing than wrestling with the tools. TeTex 0.9, Jade, and Jadetex must be installed first.
</para>
</sect3>
</sect2>
</sect1>
<sect1>
<title>
Getting Started with DocBook
</title>
<para>
This section covers the new method of writing LDP documentation, using the DocBook 3.1 DTD. We'll cover getting, installing, and using tools, along with an introduction to DocBook tags. Since there are over 300 DocBook tags, we won't cover them all here. Really interested readers can go to http://www.docbook.org for more information.
</para>
<sect2>
<title>
For New Authors
</title>
<para>
If you are a new to the LDP and want to pick up an unmaintained HOWTO or write a new HOWTO or mini-HOWTO document, contact the HOWTO coordinator at <ulink url="mailto:ldp-discuss@lists.linuxdoc.org">ldp-discuss@lists.linuxdoc.org</ulink>. This is to make sure the HOWTO coordinator can know who is working on what documentation. Also note that all HOWTO submissions must be in SGML format using the DocBook 3.1 DTD. Mini-HOWTOs are no longer being accepted, but are being converted into full HOWTOs.
</para>
</sect2>
<sect2>
<title>
Mailing Lists
</title>
<para>
There are a few mailing lists to subscribe to so you can take part in how the LDP works. First is ldp-discuss@lists.linuxdoc.org, which is the main discussion group of the LDP. To subscribe, send a message with the subject reading &quot;subscribe&quot; to <ulink url="mailto:ldp-discuss-request@lists.linuxdoc.org">ldp-discuss-request@lists.linuxdoc.org</ulink>. To unsubscribe, send an e-mail with the subject of &quot;unsubscribe&quot; to ldp-discuss-request@lists.linuxdoc.org.
</para>
</sect2>
<sect2>
<title>
Downloading and installing the tools
</title>
<sect3>
<title>
Manual using jade/openjade
</title>
<para>
This is the quick and dirty way that should work for all distributions, no matter what distribution you're using.
</para>
<orderedlist>
<listitem>
<para>
Create a base directory to store everything such as <emphasis>/usr/local/sgml</emphasis>. We'll call this <emphasis>&dollar;_toolroot</emphasis> form here on.
</para>
</listitem>
<listitem>
<para>
Install Jade, DocBook DTD, and DSSSL such that the base of each is under <emphasis>&dollar;_toolroot</emphasis> (creating <emphasis>&dollar;_toolroot/jade-1.2.1</emphasis>, <emphasis>&dollar;_toolroot/dtd</emphasis>, <emphasis>&dollar;_toolroot/dssl</emphasis>)
</para>
</listitem>
<listitem>
<para>
You'll need to set the <emphasis>SGML_CATALOG_FILES</emphasis> environment variable to the catalogs that you have under <emphasis>&dollar;_toolroot</emphasis>. You can do this with the command: <emphasis>&dollar;ENV&lcub;'SGML_CATALOG_FILES'&rcub; = &ldquo;&dollar;_toolroot/dtd/docbook.cat;&dollar;_toolroot/dsssl/docbook/catalog;&dollar;_toolroot/jade-1.2.1/dsssl/catalog&rdquo;</emphasis>
</para>
</listitem>
<listitem>
<para>
Now you can start using Jade. To create individual HTML files: <emphasis>&dollar;_toolroot/jade-1.2.1/jade/jade -t sgml -i html -d &dollar;_toolroot/dsssl/docbook/html/docbook.dsl howto.sgml</emphasis>
</para>
</listitem>
<listitem>
<para>
To create one large HTML file, add <emphasis>-V nochunks</emphasis> to the jade command.
</para>
</listitem>
</orderedlist>
</sect3>
<sect3>
<title>
sgmltools
</title>
<para>
Unlike previous versions of sgmltools, you will require sgmltools version 2.x for use with DocBook. Since the backend programs have all changed, you'll also need to forget the sgml2xxx style of programs (sorry). Since some major distributions ship with sgml 1.x, you'll need to remove the sgml 1.x package and install either a 2.0 version, or a CVS version. To get the latest CVS source code version, you can use the following set of commands:
</para>
<programlisting>
bash$ CVSROOT=:pserver:cvs@cvs.sgmltools.org:/home/cvs
bash$ export CVSROOT
bash$ cvs login
bash$ cvs -z6 get sgmltools
</programlisting>
<para>
The CVS password is 'cvs'. Once downloaded, You can just use
</para>
<programlisting>
bash$ ./compile
bash$ make
bash$ make install
</programlisting>
<para>
to install sgmltools. For Red Hat-based systems (using RPM) you can use the rpmfind command to get the latest sgmltools. The rpmfind program is available at http://www.rpmfind.net/. Make sure you get sgmltools and not sgml-tools, as the latter is sgml-tools 1.0.9. For Debian-based systems, apt-get will retrieve the right package for you:
</para>
<programlisting>
bash# apt-get install sgmltools
</programlisting>
<para>
As with the RedHat, be sure to get sgmltools and not sgml-tools.
</para>
</sect3>
<sect3>
<title>
Cygnus DocBook Tools
</title>
<para>
These tools are provided with Red Hat 6.2. Make sure the following packages are installed:
</para>
<itemizedlist>
<listitem>
<para>
sgml-common
</para>
</listitem>
<listitem>
<para>
docbook
</para>
</listitem>
<listitem>
<para>
stylesheets
</para>
</listitem>
</itemizedlist>
<para>
Red Hat has the latest version on their web site: <ulink url="http://www.redhat.com/support/errata/RHBA-2000022-01.html">http://www.redhat.com/support/errata/RHBA-2000022-01.html</ulink>.
</para>
<para>
Download/get/sneakernet the RPMs to your machine and install in the usual manner (become root, then rpm -Uvh <emphasis>filename</emphasis>). Once the RPMs are installed, you can use the following commands to render DocBook:
</para>
<programlisting>
bash$ db2html <emphasis>filename</emphasis>
</programlisting>
<para>
Renders DocBook into HTML. A subdirectory with the filename (minus the .sgml extension) is created and the HTML files are placed there.
</para>
<programlisting>
bash$ db2pdf <emphasis>filename</emphasis>
</programlisting>
<para>
Renders DocBook into a PDF file.
</para>
</sect3>
</sect2>
<sect2>
<title>
Writing SGML by hand
</title>
<para>
Must of this is covered by Jorge Godoy's Using DocBook document. Those interested can read it at <ulink url="http://metalab.unc.edu/godoy/using-docbook/using-docbook.html">http://metalab.unc.edu/godoy/using-docbook/using-docbook.html</ulink> for writing DocBook using your favorite text editor.
</para>
</sect2>
<sect2>
<title>
Writing SGML using LyX
</title>
<sect3>
<title>
New documents
</title>
<para>
You can easily start a new HOWTO using LyX. Use the <emphasis>File-&gt;New from template... </emphasis>menu command to bring up the template listings. Select <emphasis>Templates</emphasis> on the right side of the screen, then select <emphasis>docbook_template.lyx</emphasis> in the file listing. Select OK, and you'll have a new document. Fill in the items, such as title, abstract, and author name, then start writing.
</para>
<figure><title>DocBook Template screen from LyX</title>
<graphic fileref="docbook_template.jpg"></graphic>
</figure>
</sect3>
<sect3>
<title>
Existing documents
</title>
<para>
If you have an already-existing LyX, TeX, or text document, you can import it into LyX with the <emphasis>File-&gt;import</emphasis> command. Once the file is imported, go to <emphasis>Layout-&gt;Document...</emphasis> In the popup window, under Style, select <emphasis>SGML (DocBook Article)</emphasis>. You'll be asked if you want to convert all text over, and say Yes. You will need to reapply most tags, but it's a fairly simple matter of selecting text and changing the style. Many LyX functions have a keyboard shortcut to assist you.
</para>
<figure><title>Document Layout screen</title>
<graphic fileref="document_layout.jpg"</graphic>
</figure>
</sect3>
<sect3>
<title>
Exporting documents to SGML
</title>
<para>
Once your document is written or converted, save it in LyX format. This will allow you to edit future versions easily. Then, go to <emphasis>File-&gt;Export-&gt;as DocBook...</emphasis> and the file will be exported in DocBook.
</para>
</sect3>
</sect2>
<sect2>
<title>
Writing SGML using PSGML
</title>
<sect3>
<title>
Introduction
</title>
<para>
If you have installed a recent distribution, you may already have PSGML installed for use with Emacs. To check, start Emacs and look for the PSGML documentation (C-h i m psgml).
</para>
<para>
From here on, we assume you have PSGML installed for use with a recent version of GNU Emacs. If that all went by too fast for you, see the free chapter from Bob Ducharme's SGML CD book: <ulink url="http://www.snee.com/bob/sgmlfree/">http://www.snee.com/bob/sgmlfree/</ulink>.
</para>
</sect3>
<sect3>
<title>
Updating your .emacs to use PSGML
</title>
<para>
If you want GNU Emacs to enter PSGML mode when you open a <emphasis>.sgml</emphasis> file and be ready for SGML editing, make sure PSGML can find the DocBook DTD. If your distribution already had PSGML set up for use with GNU Emacs, you probably do not have to do anything to get this to work. Otherwise, you may need to set an environment varialbe that tells PSGML where to look for the SGML catalog (the list of DTDs).
</para>
<para>
For example:
</para>
<programlisting>
bash$ export SGML_CATALOG_FILES=/usr/lib/sgml/catalog
</programlisting>
<para>
Then add something like the following to your .emacs file:
</para>
<programlisting>
;; ******************************************************************* ;; set up psgml mode...
;; use psgml-mode instead of emacs native sgml-mode ;; (autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t )
(setq auto-mode-alist (append (list '("\\.sgm$" . sgml-mode) '("\\.sgml$" . sgml-mode)) auto-mode-alist))
;; set some psgml variables (setq sgml-auto-activate-dtd t) (setq sgml-omittag-transparent t) (setq sgml-balanced-tag-edit t) (setq sgml-auto-insert-required-elements t) (setq sgml-live-element-indicator t) (setq sgml-indent-step nil)
;; create faces to assign to markup categories (make-face 'sgml-comment-face) (make-face 'sgml-start-tag-face) (make-face 'sgml-end-tag-face) (make-face 'sgml-entity-face) (make-face 'sgml-doctype-face) ; DOCTYPE data (make-face 'sgml-ignored-face) ; data ignored by PSGML (make-face 'sgml-ms-start-face) ; marked sections start (make-face 'sgml-ms-end-face) ; end of marked sections (make-face 'sgml-pi-face) ; processing instructions (make-face 'sgml-sgml-face) ; the SGML declaration (make-face 'sgml-shortref-face) ; short references
;; view a list of available colors with the emacs-lisp command: ;; ;; list-colors-display ;; ;; please assign your own groovy colors, because these are pretty bad (set-face-foreground 'sgml-comment-face "coral") ;(set-face-background 'sgml-comment-face "cornflowerblue") (set-face-foreground 'sgml-start-tag-face "slateblue") ;(set-face-background 'sgml-start-tag-face "cornflowerblue") (set-face-foreground 'sgml-end-tag-face "slateblue") ;(set-face-background 'sgml-end-tag-face "cornflowerblue") (set-face-foreground 'sgml-entity-face "lavender") ;(set-face-background 'sgml-entity-face "cornflowerblue") (set-face-foreground 'sgml-doctype-face "lavender") ;(set-face-background 'sgml-doctype-face "cornflowerblue") (set-face-foreground 'sgml-ignored-face "cornflowerblue") ;(set-face-background 'sgml-ignored-face "cornflowerblue") (set-face-foreground 'sgml-ms-start-face "coral") ;(set-face-background 'sgml-ms-start-face "cornflowerblue") (set-face-foreground 'sgml-ms-end-face "coral") ;(set-face-background 'sgml-ms-end-face "cornflowerblue") (set-face-foreground 'sgml-pi-face "coral") ;(set-face-background 'sgml-pi-face "cornflowerblue") (set-face-foreground 'sgml-sgml-face "coral") ;(set-face-background 'sgml-sgml-face "cornflowerblue") (set-face-foreground 'sgml-shortref-face "coral") ;(set-face-background 'sgml-shortref-face "cornflowerblue")
;; assign faces to markup categories (setq sgml-markup-faces '((comment . sgml-comment-face) (start-tag . sgml-start-tag-face) (end-tag . sgml-end-tag-face) (entity . sgml-entity-face) (doctype . sgml-doctype-face) (ignored . sgml-ignored-face) (ms-start . sgml-ms-start-face) (ms-end . sgml-ms-end-face) (pi . sgml-pi-face) (sgml . sgml-sgml-face) (shortref . sgml-shortref-face)))
;; tell PSGML to pay attention to face settings (setq sgml-set-face t)
;; ...done setting up psgml-mode. ;; *******************************************************************
</programlisting>
<para>
Then restart Emacs
</para>
</sect3>
<sect3>
<title>
SGML Smoke Test
</title>
<para>
Try the following smoke test. Start a new file, <emphasis>/tmp/test.sgml</emphasis> for example, and enter the following:
</para>
<programlisting>
<![CDATA[
<!DOCTYPE test [
<!ELEMENT test - - (#PCDATA)>
]>
]]>
</programlisting>
<para>
Enter <emphasis>C-c C-p</emphasis>. If Emacs manages to parse your DTD, you will see <emphasis>Parsing prolog...done</emphasis> in the minibuffer. Try <emphasis>C-c C-e RETURN</emphasis> to insert a <emphasis>&lt;test&gt;</emphasis> element. If things are working correctly, you should see the following in Emacs:
</para>
<programlisting>
<![CDATA[
<!DOCTYPE test [
<!ELEMENT test - - (#PCDATA)>
]>
<test></test>
]]>
</programlisting>
</sect3>
<sect3>
<title>
Writing a New HOWTO in DocBook
</title>
<para>
Start a new file for your HOWTO and enter the following:
</para>
<programlisting>
<![CDATA[
<!DOCTYPE ARTICLE PUBLIC "-//Davenport//DTD DocBook V3.0//EN"> ]]>
</programlisting>
<para>
Enter <emphasis>C-c C-p</emphasis> and hold your breath. If everything goes as planned, you will see Emacs chewing for a few seconds and then <emphasis>Parsing prolog...done</emphasis> in the minibuffer.
</para>
<para>
At this point, enter <emphasis>C-c C-e RETURN</emphasis> to insert an <emphasis>&lt;article&gt;</emphasis> element and proceed to write your HOWTO.
</para>
</sect3>
<sect3>
<title>
Quick Reference for Emacs with PSGML
</title>
<para>
See Nik Clayton's primer for FreeBSD documentation: <ulink url="http://www.freebsd.org/tutorials/docproj-primer/psgml-mode.html">http://www.freebsd.org/tutorials/docproj-primer/psgml-mode.html</ulink>
</para>
</sect3>
</sect2>
</sect1>
<sect1>
<title>
CVS
</title>
<para>
The LDP is in the process of providing CVS access to authors. There are a few good reasons for this:
</para>
<orderedlist>
<listitem>
<para>
CVS will keep an off-site backup of your documents. In the event that you hand over a document to another author, they can just retrieve the document from CVS and continue on. In the event you need to go back to a previous version of a document, you can retrieve it as well.
</para>
</listitem>
<listitem>
<para>
It's great if you have many people working on the same document. You can have CVS tell you what changes were made while you were editing your copy by another author, and integrate those changes in.
</para>
</listitem>
<listitem>
<para>
Keeps a log of what changes were made. These logs (and a date stamp) can be placed automatically inside the document when you use some special tags that get processed before the SGML processor.
</para>
</listitem>
<listitem>
<para>
Can provide for a way for a program to automatically update the LDP web site with new documentation as it's written and submitted. This is not in place yet, but is a potential goal. Currently, CVS updates signal the HOWTO coordinator to update the LDP web page, meaning that if you use CVS, you're not required to e-mail your SGML code.
</para>
</listitem>
</orderedlist>
<para>
If you're completely new to CVS, there are a few web pages you may want to look at which can help you out:
</para>
<itemizedlist>
<listitem>
<para>
<ulink url="http://www.sourcegear.com/CVS/Docs/blandy">http://www.sourcegear.com/CVS/Docs/blandy</ulink>
</para>
</listitem>
<listitem>
<para>
<ulink url="https://wroclaw.art.pl/~ser/docs/cvs.html">https://wroclaw.art.pl/~ser/docs/cvs.html</ulink>
</para>
</listitem>
</itemizedlist>
<sect2>
<title>
Getting a CVS account
</title>
<para>
First you'll need to get an account at the LDP's CVS Repository. This is pretty much the root directory that is used by CVS, with various projects (HOWTOs, mini HOWTOs, etc.) created as subdirectories of that.
</para>
<para>
You will need to create a hashed password and userid for your account. The hashed password allows you to send an encrypted password to the CVS group without them needing to know your password. You can do this with the following command, from bash (or sh):
</para>
<programlisting>
bash$ echo put_your_password_here | perl -e "print crypt(&lt;&gt;, join '',('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]),\"\n\""
</programlisting>
<para>
Take the output of this command, and send it with your proposed userid to <ulink url="mailto:cvsadmin@cvslist.linuxdoc.org">cvsadmin@cvslist.linuxdoc.org</ulink>. Your unique CVSROOT will be created and you'll get an e-mail with a response. When you get your response, log into your CVSROOT and make sure everything is set up properly:
</para>
<programlisting>
bash$ export CVSROOT=:pserver:your_userid@cvs.linuxdoc.org:/cvsroot
bash$ cvs -d $CVSROOT login
</programlisting>
<para>
(Replace the <emphasis>your_userid</emphasis> with what you were sent in the response e-mail).
</para>
<para>
You will be asked for your password, and then given access to the CVS Repository in read-write mode. Once you've used cvs login once and have been given access to the system, your password is stored in .cvsroot and you will not have to use cvs login again. Just set the CVSROOT and continue on. You can get the entire linuxdoc repository with this command:
</para>
<programlisting>
bash$ cvs get LDP
</programlisting>
<para>
Or you can get the SGML source for your own document with these commands:
</para>
<programlisting>
bash$ cvs get howto/YOUR-HOWTO.sgml
bash$ cvs get minihowto/YOURDOC.sgml
</programlisting>
<para>
Also available is The Commit List, which is an e-mail sent for each change anywhere in the repository. Note that this is a high-volume list. You can subscribe by sending an empty e-mail to <ulink url="mailto:commits-subscribe@cvslist.linuxdoc.org">commits-subscribe@cvslist.linuxdoc.org</ulink>. You can unsubscribe by sending an empty e-mail to <ulink url="mailto:commits-unsubscribe@cvslist.linuxdoc.org">commits-unsubscribe@cvslist.linuxdoc.org</ulink>.
</para>
</sect2>
<sect2>
<title>
Other CVS repository notes
</title>
<sect3>
<title>
Anonymous CVS access
</title>
<para>
Anonymous CVS access is available for those who do not require an account (such as those wishing to publish LDP documents). This repository is read-only:
</para>
<programlisting>
bash$ cvs -d :pserver:cvs@anoncvs.linuxdoc.org:/cvsroot login
</programlisting>
<para>
As a password, use cvs. You can then get linuxdoc modules as above. Note that changes to the anoncvs site may be a half an hour behind the main site.
</para>
</sect3>
<sect3>
<title>
CVS Files via web
</title>
<para>
You can access the CVS repository via the web at <ulink url="http://cvsweb.linuxdoc.org/index.cgi/linuxdoc">http://cvsweb.linuxdoc.org/index.cgi/linuxdoc</ulink>.
</para>
</sect3>
<sect3>
<title>
Graphical access to CVS
</title>
<para>
There are graphical interfaces to CVS, and you can get a list of them at <ulink url="http://freshmeat.net/appindex">http://freshmeat.net/appindex</ulink>. Search for CVS.
</para>
</sect3>
</sect2>
<sect2>
<title>
Updating files and CVS
</title>
<para>
CVS has a special tag that you can use to automatically insert the date and version directly into the document. This is called <emphasis>&dollar;Id&dollar;</emphasis>. By including this tag in your document, you can have that automatically change each time you change the file, allowing the revision mark to increment each time.
</para>
<para>
When you're ready to upload changes to the CVS server, use the command <emphasis>cvs ci -m &quot;comment&quot; YOUR-HOWTO.sgml</emphasis>. The -m &quot;comment&quot; isn't necessary, but if you don't include it, you'll be brought into the editor (usually vi, or whatever your EDITOR environment variable is) and be given the chance to add a comment about the changes.
</para>
<para>
You can follow more of the CVS discussion on the ldp-discuss list. For the time being, LDP submissions should still be sent to ldp-submit.
</para>
</sect2>
</sect1>
<sect1>
<title>
Distributing your documentation
</title>
<sect2>
<title>
Before you distribute
</title>
<para>
Before you distribute your code to millions of potential readers there are a few things you should do.
</para>
<para>
First, be sure to spell-check your document. Most utilities that you would use to write SGML have plug-ins to perform a spell check. If not, there's always the aspell program.
</para>
<para>
Second, get someone to review your documentation for comments and factual correctness. The documentation that is published by the LDP needs to be as factually correct as possible, as there are millions of Linux users that may be reading it. If you're part of a larger mailing list talking about the subject, ask others from the list to help you out.
</para>
<para>
Third, create a web site where you can distribute your documentation. This isn't required, but is helpful for people to find the original location of your document.
</para>
<sect3>
<title>
Validate your SGML code
</title>
<para>
Using sgmltools, or really the nsgmls command, you can validate your .sgml code against the DTD to make sure there aren't any errors.
</para>
<programlisting>
bash$ nsgmls -s HOWTO-HOWTO.sgml
</programlisting>
<para>
If there are no issues, you'll just get your command prompt back.
</para>
</sect3>
</sect2>
<sect2>
<title>
Copyright and Licensing issues
</title>
<para>
In order for an LDP document to be accepted by the LDP, it must be licensed to allow for free (as in beer) distribution and publishing. As an author, you may retain the copyright and add other restrictions (for example, you must approve any translations or derivative works). A sample license is available at <ulink url="http://www.linuxdoc.org/COPYRIGHT.html">http://www.linuxdoc.org/COPYRIGHT.html</ulink>. If you choose to use the boilerplate copyright, simply copy it into your source code under a section called &quot;Copyright and Licenses&quot; or similar. Also include a copyright statement of your own (since you still own it). If you are a new maintainer for an already-existing HOWTO, you must include the previous copyright statements of the previous author(s) and the dates they maintained that document.
</para>
</sect2>
<sect2>
<title>
Submission to LDP
</title>
<para>
Once your LDP document has been reviewed by a few people and you took into account their comments, you can release your document to the LDP. Send an e-mail with the SGML source code as an attachment (you may gzip it if you like) to <ulink url="mailto:ldp-submit@lists.linuxdoc.org">ldp-submit@lists.linuxdoc.org</ulink>.
</para>
<para>
Be sure to include the name of your HOWTO in the subject line, and use the body to outline changes you've made and attach your HOWTO. This allows the maintainers to do their jobs faster, so you don't have to wait for your HOWTO to be updated on the LDP web site. If you don't hear anything in 7 calendar days, please follow up with an e-mail to make sure things are still in process.
</para>
</sect2>
<sect2>
<title>
Style guides
</title>
<para>
This section contains notes on conventions that the LDP has agreed to in order to give all LDP documents a similar look and feel. You should keep these guides in mind when writing.
</para>
<sect3>
<title>
Date formats
</title>
<para>
The &lt;date&gt; tag in your header should be in the following format:
</para>
<programlisting>
v1.0, 21 April 2000
</programlisting>
</sect3>
<sect3>
<title>
Conventions
</title>
<para>
Conventions for different kinds of text is as follows:
</para>
<para>
If you're going to show the use of a command, format the command so it looks like a user's command line. The prompt must contain the shell type (bash, tcsh, zsh, etc) followed by a &dollar; for commands to be run as a normal (non-root) user or a &num; for a root user.
</para>
<para>
A command would then look like this:
</para>
<programlisting>
bash$ command "run as a normal user"
bash# command "run as a root user"
tcsh# setenv DISPLAY :0.0
</programlisting>
</sect3>
</sect2>
</sect1>
<sect1>
<title>
FAQs about the LDP
</title>
<sect2>
<title>
I want to help the LDP. How can I do this?
</title>
<para>
The easiest way is to find something and document it. Also check the unmaintained HOWTOs and see if there is a subject there that you know about and can continue documenting.
</para>
</sect2>
<sect2>
<title>
I want to publish a collection of LDP documents in a book. How is the LDP content licensed?
</title>
<para>
Please see <ulink url="http://www.linuxdoc.org/COPYRIGHT.html">http://www.linuxdoc.org/COPYRIGHT.html</ulink>. Note that this is only a guideline to authors. However, the licensing cannot be more restrictive than what is listed in that URL.
</para>
</sect2>
<sect2>
<title>
I found an error in an LDP document. Can I fix it?
</title>
<para>
Contact the author of the document, or the LDP coordinator at <ulink url="mailto:ldp-discuss@lists.linuxdoc.org">ldp-discuss@lists.linuxdoc.org</ulink>and mention the problem and how you think it needs to be fixed.
</para>
</sect2>
</sect1>
</article>

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -3,8 +3,9 @@
<ARTICLE>
<title>The Linux HOWTO Index
<author>by Guylhem Aznar, <tt><htmlurl url="mailto:guylhem@oeil.qc.ca" name="guylhem@oeil.qc.ca"></tt> and Greg Ferguson, <tt><htmlurl url="mailto:gferg@sgi.com" name="gferg@sgi.com"></tt>
<date>v3.7, May 2000</date>
<author>by Guylhem Aznar, <tt><htmlurl url="mailto:guylhem@oeil.qc.ca" name="guylhem@oeil.qc.ca"></tt>
and Greg Ferguson, <tt><htmlurl url="mailto:gferg@sgi.com" name="gferg@sgi.com"></tt>
<date>v3.8, June 2000</date>
<abstract>
This document contains an index to the Linux HOWTOs as well as other
@ -385,7 +386,7 @@ Addresses Linux localization issues specific to Greek users (written
in Hellenic).
<item><htmlurl url="HOWTO-HOWTO/index.html" name="HOWTO-HOWTO">,
<BF/HOWTO HOWTO/ <p><em/Updated: May 2000/.
<BF/HOWTO HOWTO/ <p><em/Updated: June 2000/.
Lists the tools, procedures, and hints to get HOWTO authors up to
speed and writing.