[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Does groff match my needs?
From: |
Denis M. Wilson |
Subject: |
Re: [Groff] Does groff match my needs? |
Date: |
Thu, 12 Nov 2015 10:15:46 +0000 |
My -markup groff macro package has TOC, indexing and
cross-referencing. If interested look at the source to see how it is
done. I use makeindex, and supply a style file. You need to use gnu
make, it apparently does not work under BSD.
http://www.oxytropis.plus.com/groff/markup-1.0.7a.tar.gz
er, I started using nroff (under Unix 6) in the 1970s, and groff in the
1990s.
Denis
On Thu, 12 Nov 2015 04:42:33 +0000 (UTC) Dorai Sitaram
<address@hidden> wrote:
> For those used to LaTeX, there is a pca-ix.tmac in my
> github.com/ds26gte/mpca that can be used for index generation in -ms
> documents, using the same 'makeindex' program that LaTeX relies on,
> and which is available separately and freely for all *nix-y systems.
> Usage: .IX text to be indexed It has the same syntax as LaTeX
> (without the enclosing braces). To wit, @ is used to alter the
> alphabetization! to separate subentries .INDX is used where the
> sorted index should be typeset. Any header (e.g., "Index") is up to
> you. groff should be run a couple of times, the first time to create
> the index aux file and the second time to slurp its sorted version
> back in. groff does need to be run in -U (unsafe) option, so it can
> write out to the aux file and call makeindex on it. All the user
> needs is know is how and where to use the .IX and .INDX macros -- the
> pca-ix.tmac file takes care of the rest.
>
> --d
>
>
> On Wednesday, November 11, 2015 11:02 PM, Damian McGuckin
> <address@hidden> wrote:
>
>
> 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
>
>
>
>
>
--