11. Indices
<!entity % index "idx|cdx|nidx|ncdx" > <!element idx - - (#pcdata)> <!element cdx - - (#pcdata)> <!element nidx - - (#pcdata)> <!element ncdx - - (#pcdata)>
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
- Set the opts attribute of your document class to
contain the packages makeidx.
You do that by:
<article opts="makeidx">
. - 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.
- Process your file with makeindex
sgml2latex -m mydocument.sgml
.
This will produce an additionalmydocument.idx
. - Process
mydocument.idx
with themakeindex
command likemakeindex mydocument.idx
.
This will produce an additionalmydocument.ind
. - To include the now generated index in your document
you process your document with
sgml2latex -o tex -m mydocument.sgml
.
This results in output ofmydocument.tex
. - 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. - Process the modified file with
latex mydocument.tex
.
This gives you the finalmydocument.dvi
wich aggain you might process withdvips
to generate a postscript document.
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