[tex-eplain] Indexing and numberedlist

Adam Fenn acwfenn at hotmail.com
Wed Aug 1 15:37:18 CEST 2007


>   $ makeindex file.ldx -o file.lnd
>
>and then \readindexfile{l} will work.

Thanks Oleg for that, I understand now.

I would like to add one final refinement to your macro and that is a 
hyperlink. Is that possible?

------------------------------%<------------------------------
\input eplain

\newwrite\listidxfile
\immediate\openout\listidxfile = \jobname.ldx

\def\MyMacro#1#2#3{%
  \li
  {#1, }%                      surname
  {#2: }%                      forename
  {#3}%                        stuff
  \begingroup
    % \li has advanced the numbers, so restore this item's number.
    \advance\itemnumber by -1
    \advance\itemletter by -1
    \advance\itemromannumeral by -1
    % Pass arguments through a \toks register, to avoid unneeded
    % expansion during \write.
    \toks0={#1, #2}%
    % Write immediately, as opposed to writing during page shipout,
    % otherwise item numbers and \the\toks0 will be all wrong.
    \immediate\write\listidxfile{\string\indexentry{\the\toks0}{\marker}}
  \endgroup
}

\bye
------------------------------%<------------------------------

Thanks for all your help,
Adam.

_________________________________________________________________
Get Pimped! FREE emoticon packs from Windows Live -  
http://www.pimpmylive.co.uk



More information about the tex-eplain mailing list