[OS X TeX] Working with a list in LaTeX

Frank STENGEL fstengel at menara.ma
Thu Jun 17 19:47:19 CEST 2004


Le 17 juin 04, à 16:17, Gilles Serasset a écrit :

> PROBLEM: I would like to produce an author index. For this, the 
> includearticle command should call:
> \index{Zinedine Zidane}
> \index{Fabien Barthez}
> \index{Lilian Thuram}
>
> QUESTION: Is there a way to do this ?

The joy of delimited macros. A start could be to use the following code 
to process your name list

\def\breakList#1{\breakListA#1,@@@@,}
\def\nothing{@@@@}

\def\breakListA#1,{\def\tmp{#1}%
\ifx\tmp\nothing\else\oneName#1\relax\expandafter\breakListA\fi}

\def\oneName#1{Name: #1}

% A possible use for this :
\breakList{A,b,c,d}


You then need to modifiy \oneName to suit your needs
-- 
Frank STENGEL (stengelf<at>menara.ma)
               (fstengel<at>nordnet.fr)

-----------------------------------------------------
Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the macostex-archives mailing list