My question is quite similar to the one asked here. Also, I found a solution using \ref
here. I couldn't find a solution for \cref
however.
The setting: I have large file with many chapters, which have many references between chapters, environments and equations. The references are created with \cref
and usually include hyperlinks through the hyperref
package.
The problem: Most of the time I only want some chapters in my pdf, but still want the references to work.
My idea: I store an .aux
file of the full version in the file full.aux
. Then I include it using the xr
package. This works great so far, that my references are presented correctly. However (of course) there is no place to reference for the hyperlinks, so they just jump to the beginning of the document.
My question: Is ist possible to deactive these external hyperlinks completely, while keeping the internal ones? Use of \cref*
doesn't make sense for me, as that would mean changing the full document, too.
And here a minimal example. This is a full document.
full.tex \documentclass{article} \usepackage{hyperref} \usepackage{cleveref} \usepackage{xr} \externaldocument{full} \begin{document} First page\newpage Second page: \begin{equation} a=b \label{eq:firstequation} \end{equation} \begin{equation} c=d\label{eq:secondequation} \end{equation} \newpage \cref{eq:firstequation} \cref{eq:secondequation} \end{document}
This is what my main document looks like.
main.tex \documentclass{article} \usepackage{hyperref} \usepackage{cleveref} \usepackage{xr} \externaldocument{full} \begin{document} First page\newpage Second page: \begin{equation} a=b \label{eq:firstequation} \end{equation} \newpage \cref{eq:firstequation} \cref{eq:secondequation} \end{document}
And this is what I want it to work like, but without explicit use of \cref*
full.tex \documentclass{article} \usepackage{hyperref} \usepackage{cleveref} \usepackage{xr} \externaldocument{full} \begin{document} First page\newpage Second page: \begin{equation} a=b \label{eq:firstequation} \end{equation} \newpage \cref*{eq:firstequation} \cref{eq:secondequation} \end{document}