[Tugindia] Using variable definitions from another auxiliary file

Kannan Moudgalya kannan at iitb.ac.in
Tue Sep 2 03:31:59 CEST 2008

Nina Mazumdar wrote:
> On Sat, Aug 23, 2008 at 1:31 PM, Kannan Moudgalya <kannan at iitb.ac.in> wrote:
>> My original question remains: How do I use an existing .aux file from a
>> different source for the current compilation.
> xr.sty is what you are looking for.
> Suppose, if you want to include references from an external document,
> myfile.tex, you may kindly provide:
> \externaldocument{myfile}
> Now you can \ref and \pageref the labels in  myfile.tex.
Dear Nina,

This worked like a charm.  The reason why it did not work earlier was 
that I was using the file extension in the external document command: to 
illustrate, in the above example,  instead of the command 
\externaldocument{myfile}, I used \externaldocument{myfile.aux}.

I have now abandoned my earlier solution that requires scripting.  
Karthikeyan's suggestion of renaming .aux files as .sty files and 
importing with usepackage command also works.  But this also involves 
extra work.  At the minimum, one has to rename/copy the files.

Thanks for persisting with me and sending me privately a working example.


More information about the tugindia mailing list