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

Alan Munn amunn at msu.edu
Mon Mar 30 18:49:47 EDT 2009


At 5:50 PM -0400 3/30/09, 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.)

Sorry, I revised too quickly.  The command does need to be assigned 
once. So the correct command should be:

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

Sorry for the extra messages.

Alan

-- 
Alan Munn						amunn at msu.edu
Department of Linguistics
and Germanic, Slavic, Asian and African Languages		Tel. 
	517-355-7491
Michigan State University, East Lansing MI 48824 USA	Fax	517-432-2736



More information about the MacOSX-TeX mailing list