CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

1. Introduction

1.1. Information About this Document

The lastest version of this mini-HOWTO can be found at:

http://www.linuxdoc.org/HOWTO/mini/DocBook-Install/

See the "Legal" section in the appendix for copyright, licenses, and disclaimer information pertaining to this document.

1.2. What is DocBook

DocBook is a Standard Generalized Markup Language (SGML) Document Type Definition (DTD) that defines a set of textual document markup tags that work much like the familiar HTML language used on the web.

DocBook is intended for the authoring of books and articles. As such, it provides tags specifically designed to describe books and articles. For instance, the <book> and <article> DocBook tags are used to create books and articles. Within these documents, the <chapter>, <sect1>, and <para> tags are used. DocBook SGML files are stored in text files with a sgml or gml suffix.

When processed, a single DocBook SGML file can output html, pdf, ps, txt and other formats for both online and printed publication. The processing is governed by stylesheets that can automatically generate a table of contents, page numbering, chapter & section numbering, and other features.

DocBook is also designed for authoring unix man pages by writing <refentry> documents. If you don't know what a man page is, try the command man man on your terminal.

1.3. Brief Overview

Here are brief descriptions of the packages we will work with in the next sections:

OpenJade. OpenJade is an implementation of the ISO/IEC 10179:1996 international standard Document Style Semantics and Specification Language (DSSSL). OpenJade executes the DSSSL language to process SGML and XML input files. In particular, it uses the Modular DocBook Stylesheets dsl code to process DocBook SGML/XML files into other formats such as html, tex, rtf, txt and others. OpenJade is the essential engine for converting a DocBook file into other formats. The TeX output format is used mostly as an intermediate format to obtain dvi, pdf, and ps via TeX macros and dvi converters.

DocBook SGML DTD. The DocBook Document Type Definition (DTD) files are SGML files that define the DocBook language. It defines the valid tag set and rules of their use. OpenJade requires access to the DTD files for every document type that it parses.

ISO8879 ENTITY SGML. Entities define how to represent special characters that have either no keyboard key or have special meaning in SGML. Examples familiar from HTML include "&amp;"='&', "&gt;"='>', and "&lt;"='<'.

DocBook DSSSL (Modular DocBook Stylesheets). The DSSSL files (dsl suffix) for a particular DTD, in this case DocBook, specify how to convert DocBook into html, rtf, tex etc. A dsl file is input to openjade along with your DocBook sgml file and tells openjade how to transform/style your document into another file format. The dsl for online (html) formats is often different than for print (dvi, pdf, ps) formats.

SGMLtools-Lite. SGMLtools-Lite is a frontend wrapper for running openjade and the TeX macros jadetex and pdfjadetex, macros included with OpenJade. Converting a DocBook file to ps or pdf is a two or three-step process. OpenJade outputs a tex file which is the input of jadetex to produce a dvi file, and pdfjadetex to produce a pdf. A ps file is obtained by passing the dvi file through dvips. The sgmltools script provides a single command to perform these tasks.

HTMLdoc. HTMLdoc is a free program for converting html files into a pdf or ps file.

SGMLSpm and docbook2X. Together, these two are used to generate man pages. SGMLSpm is a perl5 module library for processing parsed output from onsgmls, a program included with OpenJade. SGMLSpm includes an application called sgmlspl to use the SGMLSpm library. Sgmlspl requires "spec files", which are available from various other sources on the Internet, for each type of document transformation to be performed. DocBook2X is a package that provides the spec files for transforming DocBook files into man pages.