[OS X TeX] using variables in text via references or labels

Gert van Oss gertmt at mac.com
Mon Mar 30 18:03:39 EDT 2009


On 30 mrt 2009, at 23:50, Alan Munn wrote:

>
> You're welcome.  Just for completeness, there was a redundancy in  
> the getrow command: it doesn't need to assign a command to the  
> Index, and it certainly doesn't need to assign it twice as in my  
> original example.  So a better command would be:
>
> \newcommand{\getrow}[2]{%
> \DTLforeach*[\DTLiseq{\myindex}{#2}]{#1}{%
> \tableA=A,\tableB=B,\tableC=C,\tableD=D}}
>
> (Of course if having a command for the Index is useful, it could be  
> assigned.)
>
> Alan


you're probably giving me an exercise
; )
the `\myindex=Index` has to be there just once in order to get a  
correct result.

\newcommand{\getrow}[2]{%
\DTLforeach*[\DTLiseq{\myindex}{#2}]{#1}{%
\myindex=Index,\tableA=A,\tableB=B,\tableC=C,\tableD=D}}

I'll see what I can make of the fp.package. Though it seems this  
technique works for me at this moment.
Thanks,

Gert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20090331/776507fb/attachment.html>


More information about the MacOSX-TeX mailing list