You need two separate indices in your document, a general one and another one for persons.
Use the type
attribute both on
indexterm
and index
. The content of the type
attribute can be any value. Usually
it is a descriptive name (in our case, “persons” would be fine).
For example, the following paragraph contains two index terms. However, Guido is marked up as a “persons index”:
<para> The Python<indexterm> <primary>Python</primary></indexterm> programming language was designed by Guido van Rossum.<indexterm type="persons"> <primary>van Rossum, Guido</primary></indexterm> </para>
Use two index
elements at the end of your document
to distinguish between the two:
<index/> <index type="persons"> <title>Persons</title> </index>
Some documents contain two indices, one general and one for persons. This is quite common these days as it simplifies where to find your search term. You can add as many indices as you need, but more than two are normally uncommon.
By default, multiple indices are turned on by the DocBook
stylesheets. So no special customization is needed. However, if
you want to collect all index terms into one index, set the
parameter index.on.type
to 0
(zero). In
that case, the type
attribute has no
effect.
Project@GitHub | Issue#6 |