groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] A less than trivial indexing problem and an erroneous soluti


From: Sigfrid Lundberg, NetLab
Subject: Re: [Groff] A less than trivial indexing problem and an erroneous solution
Date: Thu, 4 Apr 2002 16:58:18 +0200 (CEST)

On Sat, 16 Mar 2002, Werner LEMBERG wrote:

...

> Here you have to insert `.br'.  But `.di' includes the current partial
> outline line also which is not what you want.  `.box' is your
> friend...

I did it as seen below, which is almost the way you proposed. However,
I had to switch off hyphenation inside the diversions. I experimented
with chopping the box before executing it, but by losing its new line
it also seems to be impossible to run. Instead it seems to print the
next line in the macro.

The indexing information comes out very nicely, but the diverted text
seems still not entirely "asciified" (seen in the bibliography on very
first page on http://laurentius.lub.lu.se/search/bibliography/mh.ps
there are some terrible pages forther on, but there are presumably
other problems in my XSLT script contributing to that)

Yours

Sigfrid


PS

The above document is formatted by todays groff-current.tar.gz


-----

.open INDEX master-index.txt
.
.de begin-index
.  box index-terms
.  hy 0
..
.
.de end-index
.  br
.  box
.  hy 1
.  asciify index-terms
.  index-terms
.  chop index-terms
.  writec INDEX \\$0:
.  writem INDEX index-terms
.  write INDEX "\\$* ... \\n[PN]
.  rm index-terms
..
.
.als title begin-index
.als /title end-index
.
.als person begin-index
.als /person end-index
.
.als place begin-index
.als /place end-index
.
.als name begin-index
.als /name end-index
.

... etc for other things to appear in index


reply via email to

[Prev in Thread] Current Thread [Next in Thread]