On 09/09/2012 10:01 PM, (Ted Harding) wrote:
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.


As promised, my report on using indexing with groff that far.

First, I settled (for now) with makeindex. Makeindex is widely known to be at version 2.12 (frozen in 1990) and available here:
http://www.ctan.org/tex-archive/indexing/makeindex

Yet it got tightly integrated into the TeX world, and the new life is
http://www.tug.org/svn/texlive/trunk/Build/source/texk/makeindexk/

where it has happily advanced to V2.15 with some respectable additions:
http://www.tug.org/svn/texlive/trunk/Build/source/texk/makeindexk/ChangeLog?revision=27214&view=markup

Somewhat unfortunate, 2.15 has been integrated into the TeX building system and requires the KPATHSEA environment. Here my successful endeavour to get it go with groff anyway:

1. Download V2.12 of makeindex and extract the makefile
2. Get all the .c, .h files and file c-auto.in of makeindex V2.15
3. rename c-auto.in to c-auto.h
4. apply the attached patches on Makefile and mkind.c
5. run 'make' and be happy :=)

the generated makeindex passes the troff sample in the original makeindex V2.12 of 1990 (after some tweaks to the minimal 'makeind' shell script)

Now incorporating the ideas of
http://www.ccs.neu.edu/~dorai/troff2page
from index.tmac and I am ready to go.

BTW: The patch to mkind.c of makeindex V2.15 is generic and should permanently be in anyway to make makeindex buildable without the whole TeX source tree, if KPATHSEA is not required. I'll inform the current maintainer, maybe he will consider the patch.

Greetings, Johann


-------------------------------------------------
E-Mail: (Ted Harding) <ted.hard...@wlandres.net>
Date: 09-Sep-2012  Time: 21:01:21
This message was sent by XFMail
-------------------------------------------------


88c88
< CFLAGS		= -O
---
> CFLAGS		= -O -D USE_KPATHSEA=0
331c331,334
< 	    if (!kpse_out_name_ok(ind_fn) ||
---
> 	    if (
> #if USE_KPATHSEA
> 	      !kpse_out_name_ok(ind_fn) ||
> #endif
343c346,349
< 	    if (!kpse_out_name_ok(ilg_fn) ||
---
> 	    if (
> #if USE_KPATHSEA
> 	      !kpse_out_name_ok(ilg_fn) ||
> #endif
398c404,407
< 	   (!kpse_in_name_ok(idx_fn) ||
---
> 	   (
> #if USE_KPATHSEA
> 	     !kpse_in_name_ok(idx_fn) ||
> #endif
418c427,430
< 		 (!kpse_in_name_ok(idx_fn) ||
---
> 		 (
> #if USE_KPATHSEA
> 		   !kpse_in_name_ok(idx_fn) ||
> #endif
440c452,455
<     if (!kpse_out_name_ok(ind_fn) ||
---
>     if (
> #if USE_KPATHSEA
>       !kpse_out_name_ok(ind_fn) ||
> #endif
449c464,467
<     if (!kpse_out_name_ok(ilg_fn) ||
---
>     if (
> #if USE_KPATHSEA
>       !kpse_out_name_ok(ilg_fn) ||
> #endif
455c473,476
< 	if (!kpse_in_name_ok(log_fn) ||
---
> 	if (
> #if USE_KPATHSEA
> 	  !kpse_in_name_ok(log_fn) ||
> #endif

Reply via email to