This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: more index troubles with tex/ps output


Sam Roberts wrote:
 
I'm having a terrible time getting index numbers in dvi/ps/pdf output.
When I set the system up last summer it worked, but with the latest
rpms from sourceware.cygnus.com, it doesn't. This is my test file,
and I build the dvi using these commands:

----- mk --------------
#!/bin/sh

set -x

jade -t sgml -i html $xarg -d ../dsl/cogent-both.dsl\#html samples.sgml

collateindex -g -o index.sgml HTML.index

jade -t tex -d ../dsl/cogent-both.dsl\#print -o samples.tex samples.sgml

jadetex samples.tex
jadetex samples.tex
jadetex samples.tex
-------------------------

I have had the same trouble but now have it (mostly) figured out. There are four problems with your processing commands:
1. You have to call collateindex with the -N flag to generate an empty index.sgml.
2. You have to give the "-V html-index" flag to jade when you call it the first time. This builds HTML.index.
3. I have tried many variations, but have never gotten an "xxx-both.dsl" type dsl to work with the "-V html-index" flag. My only success has come from using a separate stylesheet for html and print. I have used the standard docbook.dsl and I have used cygnus-both.dsl with the html and print stylesheets copied into separate files. So it seems not to be a problem with the cygnus-both.dsl stylesheets, but rather with the "\#html" on the command line (which works fine except for generating the index).
4. For printing, you have to give collateindex the "-p" flag for the page numbers to actually be inserted.

The following commands correctly generate an index for your "samples.sgml" file:
--------------------
#!/bin/sh

set -x

collateindex -N -o index.sgml

#jade -t sgml -i html $xarg -d /usr/lib/sgml/stylesheets/cygnus-both.dsl\#html samples.sgml
jade -t sgml -d /usr/lib/sgml/stylesheets/nwalsh-modular/html/docbook.dsl -V html-index samples.sgml

#collateindex -g -o index.sgml HTML.index
collateindex -g -p -o index.sgml HTML.index

#jade -t tex -d /usr/lib/sgml/stylesheets/cygnus-both.dsl\#print -o samples.tex samples.sgml
jade -t tex -d /usr/lib/sgml/stylesheets/nwalsh-modular/print/docbook.dsl -o samples.tex samples.sgml

jadetex samples.tex
jadetex samples.tex
jadetex samples.tex
--------------------

The lines that are commented out don't work. The lines below them do.

If you remove "index.sgml" and "HTML.index" before you begin, you will be able to follow the progress of the commands. The first collateindex command should generate an empty index.sgml. The first call to jade should build HTML.index. The second call to collateindex will build the actual index.sgml, with file size different from the empty one. The second call to jade builds samples.tex. The calls to jadetex build samples.dvi. If you use pdfjadetex instead, you get samples.pdf, containing an index with hypertext page numbers that you can click on.

OK, I said I had it "mostly" figured out. When I click on a page number in the pdf index, it takes me to the right page and looks fine if I have the whole page on the screen. But if I have zoomed in, with only, say, half the page on the screen, it places me just below the item indexed, so that the index term is actually off screen. Of course, I could place the <indexterm> in the paragraph below the actual term, but then I run the risk of getting the wrong page if the page breaks at the wrong place. Is there a way to get the index term in the middle of the window instead of 1/4 inch above the top of the window? Here is an example of samples.pdf

-- 
Kevin M. Dunn
kevinmd@hsc.edu
Department of Chemistry
Hampden-Sydney College
HSC, VA 23943
(804) 223-6181
(804) 223-6374 (Fax)
 

samples.pdf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]