groff
[Top][All Lists]
Advanced

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

Re: [Groff] Does groff match my needs?


From: Jones, Larry
Subject: Re: [Groff] Does groff match my needs?
Date: Thu, 12 Nov 2015 04:13:27 +0000

In conjunction with .IX or similar facilities, you can use the makeindex 
program that is typically used for formatting TeX/LaTeX indexes, you just need 
a troff style file. That's how the index in the ISO C Standard (which is 
formatted with groff and MM) is produced.

-Larry

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Damian McGuckin
Sent: Wednesday, November 11, 2015 11:01 PM
To: Peter Schaffter
Cc: address@hidden
Subject: Re: [Groff] Does groff match my needs?

On Wed, 11 Nov 2015, Peter Schaffter wrote:

> On Wed, Nov 11, 2015, address@hidden wrote:
>> Consider that groff itself is somehow like plainTeX.  You may need a 
>> macro package for creating documents.  But traditional macro packages 
>> do (AFAIK) not provide TOC, index, cross references *compared to 
>> LaTeX*.  Up to now I did not test the MOM macros
>> (http://www.schaffter.ca/mom/mom-01.html) but likely they have this 
>> functionality.
>
> Mom provides TOC, but not cross-referencing and indices, at least not 
> for printed material.  PDF links (internal and external) are 
> supported, though, so on-screen cross-references are available.

MM provides TC too.

There is a macro

        .IX [a [b [c [d]]]

which you can use to log things the error output file which can be used to help 
create an index. Assuming you gave it say 4 arguments arguments in a place in 
the document which ended up on Page 16 like

        .IX INDEX N name given
        .IX INDEX N never "do this"
        .IX INDEX N "number registers"
        .IX INDEX N number registers

It writes

        INDEX N name given ... 16

in the standard error output of groff.

It is up to you to then mess with that file to create an index in whatever 
layout takes your fancy. For the above you might do

           N (emboldened)

        name
           given, 16
        never
           do this, 16
        number
           registers, 17
        number registers, 17

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here 
Views & opinions here are mine and not those of any past or present employer




reply via email to

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