[OS X TeX] References across files

Michael Sharpe msharpe at ucsd.edu
Mon Jan 12 15:13:47 EST 2009

On Jan 12, 2009, at 10:46 AM, Alain Schremmer wrote:

> I have two problems with newcommand:
> 1) The name of the new command cannot include digits. Since my  
> "characters" are "checkable items" for multiple choice exams, the  
> name of the new commands really have to include numbers.
> For instance, in CheckableItemsList.tex I have:
> %371
>> 	\item%7
> 	Which is \emph{largest-in-Sze}?
> which I would like to replace by something like
> \Checkable371-7
> to be defined in the style sheet as
> \newcommand{\Checkable371-7}{Which is \emph{largest-in-Sze}?}
> 2) The second one, I am afraid, might be insuperable: I am also  
> using the names of the checkable items in _comments_, e.g. in the  
> control file that creates the multiple choice exam from the  
> checkable item files (one checkable item per file) in the  
> QuestionBase folder so as to know what checkable item is in the file:
>> 	%7 - Which is \emph{largest-in-Sze}?
> 	../QuestionBase/371/7
> 	,
> as well as, say, in the checkable item file 371/7 itself:
>> 	%============================================================
> 	%CHECKABLE ITEM: Which is \emph{largest-in-size}?
> 	%============================================================
> Sort of hopeful regards
> --schremmer

You might find the arrayjob package of use, but you would have to  
rework your data. It allows you to describe arrays of data that you  
define with, eg
\mydata(1)={first piece of data}
\mydata(2)={second piece}
and which can be retrieved within short macros for arbitrary use. It's  
a very well done package.


More information about the MacOSX-TeX mailing list