Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
J.4. Documentation Authoring
Prev UpAppendix J. DocumentationHome Next

J.4. Documentation Authoring

SGML andDocBook do not suffer from an oversupply of open-source authoring tools. The most common tool set is theEmacs/XEmacs editor with appropriate editing mode. On some systems these tools are provided in a typical full installation.

PSGML is the most common and most powerful mode for editingSGML documents. When properly configured, it will allow you to useEmacs to insert tags and check markup consistency. You could use it forHTML as well. Check the PSGML web site for downloads, installation instructions, and detailed documentation.

There is one important thing to note withPSGML: its author assumed that your mainSGMLDTD directory would be/usr/local/lib/sgml. If, as in the examples in this chapter, you use/usr/local/share/sgml, you have to compensate for this, either by settingSGML_CATALOG_FILES environment variable, or you can customize yourPSGML installation (its manual tells you how).

Put the following in your~/.emacs environment file (adjusting the path names to be appropriate for your system):

; ********** for SGML mode (psgml)(setq sgml-omittag t)(setq sgml-shorttag t)(setq sgml-minimize-attributes nil)(setq sgml-always-quote-attributes t)(setq sgml-indent-step 1)(setq sgml-indent-data t)(setq sgml-parent-document nil)(setq sgml-exposed-tags nil)(setq sgml-catalog-files '("/usr/local/share/sgml/catalog"))(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t )

and in the same file add an entry forSGML into the (existing) definition forauto-mode-alist:

(setq  auto-mode-alist  '(("\\.sgml$" . sgml-mode)   ))

You might find that when usingPSGML, a comfortable way of working with these separate files of book parts is to insert a properDOCTYPE declaration while you're editing them. If you are working on this source, for instance, it is an appendix chapter, so you would specify the document as anappendix instance of a DocBook document by making the first line look like this:

<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook V4.2//EN">

This means that anything and everything that readsSGML will get it right, and I can verify the document withnsgmls -s docguide.sgml. (But you need to take out that line before building the entire documentation set.)


Prev Up Next
J.3. Building The Documentation Home J.5. Style Guide
pdfepub
Go to Postgres Pro Standard 9.5
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp