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: Damian McGuckin
Subject: Re: [Groff] Does groff match my needs?
Date: Thu, 12 Nov 2015 15:00:48 +1100 (AEDT)
User-agent: Alpine 2.02 (LRH 1266 2009-07-14)

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]