[Top][All Lists]

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

Re: [Groff] Indexing these days with groff

From: Ted Harding
Subject: Re: [Groff] Indexing these days with groff
Date: Sun, 09 Sep 2012 21:01:24 +0100 (BST)

I go with Denis on using makeindex! The standard troff tools for
indexing and bibliography are too limited and inflexible for
serious use, and are very difficult to modify, let alone to extend.

For some of my views and suggestions on this, see posts to this
list some years ago at:

Search on "makeindex" in the groff archive at:

for more postings on this and related matters.

Although makeindex is a TeX program, it will output troff source
if given a suitable style file (which you can customise to your

It is also very suitable for indexes which have words in many
different languages, since you can use a different collating order
for words from different languages in the same index (publishers'
tastes in this differ from country to country .. ). The idea here
is that the keyword for an index entry can be given in two formats:
the first which matches the collation order, the second which is
the entry that will be printed. Example:

Turkish: Çan (bell); English: Can (container)

Depending on the publisher, there may be no distinction between the
Ç in Çan and the C in Can -- C-cedilla is interchangeable with
plain C.

Or (as in Turkish books) Ç must follow C, so any word beginning
with Ç must come after every word beginning with C; thus "Çan"
must follow "Czerny". But there is generally no distinction between
"Å" and "A" in Danish words in Turkish book indexes, while Danish
books put "Å" after "Z".

So for the Turkish book you can specify your index entry as


which makes "Çan" sort like "Czan" but print as "Çan"; while a
Danish word like "få" could be entered as


It is also easy to generate 2nd and 3rd level entries. A summary
of the possibilities can be found in:

See also the more comprehensive account in:

It's a lot to get your head round at first, but well worth it when
you become proficient at it!


On 09-Sep-2012 16:35:45 Denis M. Wilson wrote:
> Hello all,
> I have indexing in my -markup macros (which do the same sort of job as
> -mom but differently). It uses the conventions of makeindex, and creates
> several intermediate files (so has to be used with groff -U). The
> process is automatic using the .Index macro. You can find the source and
> documentation in
> where there is a rather old version (I'll try to find time to update
> it), but it's worked well for many years.
> I don't know of any other troff macro package with indexing.
> Denis
> On Sun, 09 Sep 2012 08:34:35 +0200
> Johann Höchtl <address@hidden> wrote:
>> Fellow groffers,
>> what is the prefered method of creating indexes with groff these days?
>> Mainly I am only aware of
>> Tools for Printing Indexes 
>> <>, CSTR #128, J. L.
>> Bentley and B. W. Kernighan <>, Bell
>> Labs, October 1986.
>> available for download at
>> and used in the community resurection of
>>   Unix Text Processing
>> available at
>> I found the CSTR quite difficult. Has anybody some recent experience
>> in indexing or some newer helpers?
>> BTW. I would try to do it with the mom macro package
>> Greetings, Johann
> -- 
> ()  ascii ribbon campaign - against html e-mail 
> /\   - against proprietary attachments

E-Mail: (Ted Harding) <address@hidden>
Date: 09-Sep-2012  Time: 21:01:21
This message was sent by XFMail

reply via email to

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