[OS X TeX] referencing external documents with xr

Alan T Litchfield alan at alphabyte.co.nz
Fri Sep 11 22:13:35 CEST 2009

Will the use of \graphicspath help? It comes with the graphics package.


On 12/09/2009, at 1:05 AM, <peter.frings at agfa.com> wrote:

> Good afternoon all,
> I was trying to find a way to refer to sections, figures, etc. in  
> external document, and stumbled upon the hyper-xr package. However,  
> I'm having a problem with it that I cannot figure out by myself...
> The problem is that the link to the external file uses the same path  
> as the one specified in the \externaldocument directive.
> In our system, we have many (PDF) documents, available to all co- 
> workers, in a single, source-controlled folder. The .tex and other  
> files (images, ...) for each of these documents live in a separate  
> subtree, with a subfolder per document
> Ex:
> .../proposals/abc.pdf
> .../proposals/def.pdf
> .../proposals/gih.pdf
> .../proposals-src/abc/abc.tex + other files
> .../proposals-src/def/def.tex + other files
> .../proposals-src/gih/gih.tex + other files
> You see it coming, right?
> When writing the documents in the proposals-src tree, I add e.g., in  
> abc.tex:
> \externaldocument[def/]{../def/def}
> ...
> \ref{def/section1}
> ...
> Sure enough, when working on the document in the src tree, the link  
> in the resulting abc.pdf file properly links to proposals/def/ 
> def.pdf and opens it when clicked. However, when I move it to it's  
> final folder and check it in, the link no longer works: it tries to  
> access document "../def/def.pdf", which is of course not there.
> So, finally, my question: is there a way to make this work, one way  
> or another, preferably without changing the structure of the  src  
> and final trees?
> Thanks,
> Peter.
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> 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

Alan T Litchfield
PO Box 141, Auckland, 1140
New Zealand

More information about the macostex-archives mailing list