[OS X TeX] References across files

Adam M. Goldstein a.m.goldstein at mac.com
Mon Jan 12 18:49:12 CET 2009


On Jan 12, 2009, at 12:31 PM, Chris Goedde wrote:

> On Jan 12, 2009, at 11:22 AM, Peter Vamos wrote:
>
>> At 17:11 +0000 12/1/09, Alain Schremmer wrote:
>>> Suppose you are writing a novel about a family but you have not yet
>>> decided what the names of the various characters are.
>>>
>>> The obvious idea is to create a separate file with a genealogical
>>> tree, in which you would have, say, "Tom" so that, as you write the
>>> various included chapters of the novel, instead of typing "Tom", you
>>> would type the reference of "Tom" in the genealogical tree. Then, as
>>> you would typeset, all the occurrences of the reference would be
>>> replaced by "Tom".
>>>
>>> Now the equally obvious question: Is there actually a way to do  
>>> this?
>>> (in LaTeX)
>>
>> How about just creating for each family member/character a macro e.g.
>> \newcommand{\tom}{Tom}
>>
>> Then just change these macros at will e.g
>>
>> \newcommand{\tom}{Dick} or \newcommand{\tom}{Harry}
>> and all references will be changed at the next typeset.
>
> The only caveat with this is that in normal usage TeX will happily  
> eat the space after the command, so that
>
> See \tom run!
>
> will get typeset as "See Tomrun". This can be worked around by  
> adding braces after the command:
>
> See \tom{} run!
>
> Are there easier work arounds?


Why not:

\newcommand{\tom}{Dick{}}

the "{}" seems pretty good at putting in the space where it's needed,  
leaving it out where it's not. That's been my experience, at least.

-Adam

>
>
> -- 
> Chris
>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://www.esm.psu.edu/mac-tex/list/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>


------------------
Adam M. Goldstein PhD, MSLIS
--
agoldstein at iona.edu
a.m.goldstein at mac.com
http://www.iona.edu/faculty/agoldstein
--
(914) 637-2717
--
Dept of Philosophy
Iona College
715 North Avenue
New Rochelle NY 10801




More information about the macostex-archives mailing list