Next / Previous / Contents / Shipman's homepage

2. Operation of docbook5index

To generate an ID index, use a command of this general form, where file.xml is the name of your DocBook source file.

docbook5index file.xml

This will generate an XSL-FO file named “” (for Table Of Contents). This file must be converted in turn to “toc.pdf”.

At the TCC, we have an academic license for the XEP converter. See the instructions for running this program in Writing documentation with DocBook-XML 4.3. Elsewhere, see the public-domain converter Apache FOP.

2.1. Sample Makefile rules

We assume that you are using the sample Makefile described in the local DocBook documentation. This includes a rule for converting .fo files to .pdf:

	xep $(XEP_OPT) $< $@ 
all: web pdf code index
  1. Add two new defines somewhere at the top of the file:

    INDEX_FO        =
    INDEX_TARGET    =  toc.pdf
  2. To the all: target, add a new target named index:

    all: web pdf code index
  3. Add the definition of the new target like this:

    index: $(INDEX_TARGET)
    $(INDEX_FO): $(SOURCE)
    	rm -f $(INDEX_FO); \
    	docbookindex $(SOURCE)