The follow MWE works fine in the sense that I can uncomment \includeonly{a}
after compiling once, and subsequent compilations have maintain correct references to B
. This also works when I use newclude
(uncomment %1
), or when I load hyperref
(uncomment %2
). However, it does not work with both of them loaded.
Am I the first one to notice this apparent incompatibility between newclude
and the hugely popular hyperref
? It is not mentioned in the newclude
manual at all.
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{a.tex}
\section{A}
\label{A}
Ref to B: \ref{B}
\end{filecontents}
\begin{filecontents}{b.tex}
\section{B}
\label{B}
Ref to A: \ref{A}
\end{filecontents}
% uncomment after first compilation!
%0 \includeonly{a}
%1 \usepackage{newclude}
%2 \usepackage{hyperref}
\begin{document}
\include{a}
\include{b}
\end{document}
\include*
, which does not issue\clearpage
s. Very helpful for a long,section
-based document.hyperref
and\includeonly
.