John Culleton | 23 Mar 2009 19:31
Gravatar

Re: optional arguments


I am addressing a different problem than the \architect 
macro but rather the discrepancy between:
\idxname{John}{Smith}
and
\idx{Smith, John}

These two items end up on separate lines in  the final 
index.  The villian here seems to be the \indexseparator 
item inserted by the \indexname routines. Makeindex does 
not combine the two references on a single line.

When I use eplain and makeindex the idx file looks like 
this:
----------------------------------------------------------------
\indexentry{Smith\idxnameseparator John}{1}
\indexentry{Smith, John}{2}
------------------------------------------------------------
and the book.ind file looks like this:
----------------------------------------------------
\item Smith, John, 2
\item Smith\idxnameseparator John, 1
------------------------------------------------------

The solution would be to modify eplain such that instead of 
inserting  \indexnameseparator the \indexname macro would 
simply insert a comma. This is the default choice anyhow 
and the one that conforms to standard indexing practice. 

The eplain code is formidable enough that I hesitate to 
(Continue reading)

Oleg Katsitadze | 24 Mar 2009 05:42
Picon

Expanding \indexnameseparator (was: optional arguments)

On Mon, Mar 23, 2009 at 02:31:46PM -0400, John Culleton wrote:
> The solution would be to modify eplain such that instead of 
> inserting  \indexnameseparator the \indexname macro would 
> simply insert a comma. This is the default choice anyhow 
> and the one that conforms to standard indexing practice. 

Well, the whole point of \indexnameseparator is to provide
flexibility, in case someone wants something different from the
standard indexing practice.  But I agree it would be nice to have ", "
instead of "\indexnameseparator" inside the .idx file.  So I suggest
the patch below.  It seems backwards-compatible, except in situations
described by John, but such documents are already broken anyway.

If there are no objections, I'll install the patch.

Thanks,
Oleg

Index: xeplain.tex
===================================================================
RCS file: /cvsroot/eplain/eplain/xeplain.tex,v
retrieving revision 1.47
diff -u -r1.47 xeplain.tex
--- xeplain.tex 20 Nov 2007 21:51:02 -0000  1.47
+++ xeplain.tex 24 Mar 2009 04:28:03 -0000
 <at>  <at>  -2842,7 +2842,7  <at>  <at> 
   \ifx\temp\empty
     \toks <at>  = {}%
   \else
-    \toks <at>  = {\idxnameseparator #1}%
(Continue reading)


Gmane