[texhax] \index command to use my page numbers.

Paul Isambert zappathustra at free.fr
Mon Oct 18 17:02:38 CEST 2010


  Le 18/10/2010 16:38, Ted Rolle Jr. a écrit :
> I'll be happy to take this to the LaTeX mailing list.  I looked for it 
> but couldn't find it.  So, if someone could spin me around and point 
> me in the right direction \ldots
>

OK, here's a tentative solution. I'll use a special \myindex command, so 
we don't mess with the normal \index.

\makeatletter
\def\myindex#1{%
   \immediate\write\@indexfile{%
     \noexpand\indexentry{#1}{\arabic{Page}}}%
}
\makeatother

Now \myindex{whatever} will add ``whatever'' to the index, but with page 
number Page.

There are more bells and whistles to the real \index command, but I'm no 
LaTeX user; the solution here should probably work in most cases, though.

Best,
Paul


More information about the texhax mailing list