This commit is contained in:
gferg 2000-05-30 21:18:49 +00:00
parent fc5dcf549a
commit 868db93b98
1 changed files with 104 additions and 20 deletions

View File

@ -10,7 +10,7 @@
HOWTO-HOWTO
</title>
<date>
v1.8 17 May, 2000
v1.9 30 May, 2000
</date>
<author>
<firstname>Mark</firstname> <surname>Komarinski</surname>
@ -54,27 +54,17 @@
Version History
</title>
<para>
v1.8 (May 17, 2000)
v1.9 (May 30, 2000)
</para>
<itemizedlist>
<listitem>
<para>
Corrected errors in LinuxDoc section that didn't render properly.
PSGML informaton added from Mark Craig
</para>
</listitem>
<listitem>
<para>
Added content about Cygnus tools - thanks to Dan Scott
</para>
</listitem>
<listitem>
<para>
Added OpenJade information and link
</para>
</listitem>
<listitem>
<para>
More DocBook rendering information - thanks to Greg Ferguson
Differences between HOWTO and mini-HOWTO started
</para>
</listitem>
</itemizedlist>
@ -117,7 +107,7 @@
Acknowledgements and Thanks
</title>
<para>
Thanks to everyone that gave comments as I was writing this. This includes Deb Richardson and Daniel Barlow 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. There are pointers to sgmltools and the LDP elsewhere in this document. 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.
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>
</sect1>
@ -161,7 +151,7 @@
Jade
</title>
<para>
Required - <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>
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.
@ -230,7 +220,7 @@
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.
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>
</sect3>
<sect3>
@ -304,6 +294,14 @@
<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. The mini-HOWTO submissions may be made in either SGML or HTML formats, but only SGML-formatted submissions will be included in printed versions of the HOWTOs.
</para>
<sect3>
<title>
Should I write a HOWTO or mini-HOWTO?
</title>
<para>
The LDP has two sets of HOWTOs. The larger HOWTOs are always written in SGML (either DocBook or LinuxDoc - but DocBook is preferred). HOWTOs are usually large in scope, and longer than two or three printed pages. The mini-HOWTOs are smaller in scope, can be submitted in SGML or HTML, and take up only two or three printed pages.
</para>
</sect3>
</sect2>
<sect2>
<title>
@ -470,10 +468,96 @@ db2pdf <emphasis>filename</emphasis>
</title>
<sect3>
<title>
Not written
Introduction
</title>
<para>
Unfortunately, I don't use Emacs. If you use PSGML for writing/validating SGML, please e-mail the author your directions and I'll be happy to add them here as a service for other users.
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>
@ -984,7 +1068,7 @@ v1.0, 21 April 2000
I found an error in an LDP document. Can I fix it?
</title>
<para>
Contact the author of the document, or the LDP coordinator and mention the problem and how you think it needs to be fixed.
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>