Sunday, 19 May 2013

Cross referencing: zref-xr does not detect .aux file of second document

Cross referencing: zref-xr does not detect .aux file of second document

So I am trying to crossreference labels across two documents: draft.tex and appendix.tex. When compiling I get the following error message:
./draft04.tex:16: Package zref-xr Warning: File `appendix.aux' not found or    empty,(zref-xr)                labels not imported on input line 16.
These are the two preamples of the documents including an example of a label and a reference.
First draft.tex:
\documentclass[11pt]{article}

\usepackage{mla}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[document]{ragged2e}
\usepackage[english]{babel}
\usepackage[backend=biber,style=mla]{biblatex}
\usepackage[hidelinks]{hyperref}
\usepackage{zref-xr,zref-user}
\zexternaldocument*{appendix}
\providecommand{\biburldatelong}{}
\bibliography{biblio.bib}

\begin{document}
...
see \ref{fig:01_examples}.
...
\end{document}
Then appendix.tex:
\documentclass[11pt]{article}

\usepackage{mla_appendix}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[document]{ragged2e}
\usepackage[english]{babel}
\usepackage[hidelinks]{hyperref}
\usepackage{zref-xr,zref-user}
\zexternaldocument*{draft04}
\providecommand{\biburldatelong}{}

\begin{document}
...
\listoffigures
\newpage

\begin{figure}
    \includegraphics[width=\textwidth]{img/01introduction/card_blackOps.jpg}
    \caption{Testing the crossreference}
    \label{fig:01_examples}
\end{figure}
... \end{document}
These two documents are in the same directory. I really have no idea, why the 'appendix.aux' is not found, since I can open it and it does contain this line, which I thought was needed for the crossreference:
\newlabel{fig:01_examples}{{1}{2}{Testing the crossreference\relax }{figure.1}{}}
What am I doing wrong? Help would be very much appreciated.

No comments:

Post a Comment