Custom Search
Next Previous Contents

## 11. Indices

<!entity % index "idx|cdx|nidx|ncdx" >

<!element idx - - (#pcdata)>
<!element cdx - - (#pcdata)>
<!element nidx - - (#pcdata)>
<!element ncdx - - (#pcdata)>


Index elements
 tag my translation idx index cdx code index (terminaltype index) nidx invisible index ncdx invisible code index (terminaltype index)

The index tags serve for making a index of your document. They are only useful if you want do do LaTeX mapping. They only differ very slightly as mentioned in table Index elements.

## 11.1 Including a index

There are two ways to include indices into your document. Look at both and decide.

### Manually

1. Set the opts attribute of your document class to contain the packages makeidx. You do that by: <article opts="makeidx">.
2. Mark all the words you want to be in the index later with a idx tag or cdx tag. If the word you want to index to a location in your document is not within the text you simply write it at the location you want to index with the nidx tag. It´s like the normal idx only the tagged text will be silently dropped in the normal document.
3. Process your file with makeindex sgml2latex -m mydocument.sgml.
This will produce an additional mydocument.idx.
4. Process mydocument.idx with the makeindex command like makeindex mydocument.idx.
This will produce an additional mydocument.ind.
5. To include the now generated index in your document you process your document with sgml2latex -o tex -m mydocument.sgml.
This results in output of mydocument.tex.
6. Edit mydocument.tex with the editor of your choice.
You look for the line \end{document} (should be somewhere close to the end of the file) and insert the text \printindex bevor this line.
7. Process the modified file with latex mydocument.tex.
This gives you the final mydocument.dvi wich aggain you might process with dvips to generate a postscript document.
A lot of a mess, ain't it?

### Hacked

I'm currently working on a patch to the sgmltools to automate the inclusion and generation of a index. To find out the current state see http://www.bnhof.de/~uwe/lnd/indexpatch/index.html.

Next Previous Contents