Pages printed twice in index of PDF.
Martin Miehe
mm02 at ferrugo.de
Fri Jan 23 13:33:59 MST 2009
I made some further investigations:
Zitat von Bruce Dubbs <bruce.dubbs at gmail.com>:
> Martin Miehe wrote:
>> In the indices of current stable book (and in 6.3 as well) are several
>> page numbers printed twice after one entry. E.g. at
>> Programs -> acinstall
>> Programs -> aclocal
>> Programs -> addpart
>> Programs -> autoconf
>>
>> and so on.
>>
>> Has this been done purposely or is it a side effect and should be fixed?
>
> Moving to -dev. Please answer there.
>
> This is only an artifact of pdf, not the html.
Indeed. It is done by fop. There are some XML-PDF-converters which
handle page numbers better, but they are not free. In the HTML version
are no page numbers at all.
> Looking at automake.xml, there is
>
> <varlistentry id="aclocal"> ...
> <indexterm zone="ch-system-automake aclocal">
>
> and
>
> <varlistentry id="aclocal-version"> ...
> <indexterm zone="ch-system-automake aclocal-version">
>
> but aclocal-version is not in the index (pdf or html). I think that
> > this is an
> xsl problem, but I don't know how to fix it.
aclocal-version is in the index with version replaced by the version number.
The reason why the page numbers are printed twice is that the
attribute zone contains two ids. The ID of the entry aclocal itself
and the ID of the chapter where aclocal is treated.
The fast&easy way to get rid of duplicate page numbers is to throw out
one of the IDs.
There is a more sophisticated way: By applying the parameter
make.index.markup at the appropriate places in a first pass of fop a
PDF is generated that contains the index as XML code. This code can be
extracted and merged with the lfs-full.xml. Of course <index/> has to
be removed. In a second pass of fop the final PDF will be generated.
More informations are available at:
http://www.xml.com/pub/a/2004/07/14/dbndx.html?page=2
http://docbook.sourceforge.net/release/xsl/current/doc/fo/make.index.markup.html
http://www.cranesoftwrights.com/resources/bbi/index.htm
I am in no way deep enough involved in LFS to decide what shall be
done at this point. What is the best?
Regards, Martin Miehe.
More information about the lfs-dev
mailing list