2

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}
4
  • newclude doesn't seem to have been touched since 1999 and says it was experimental then, do you need it at all? May 12, 2017 at 11:12
  • @DavidCarlisle the one advantage that I use is that is offers \include*, which does not issue \clearpages. Very helpful for a long, section-based document.
    – bers
    May 12, 2017 at 11:45
  • does it work though? (most implementations of include I have seen that do not use clearpage do not work:-) May 12, 2017 at 12:21
  • @DavidCarlisle I have not noticed anything bad yet, except this issue with hyperref and \includeonly.
    – bers
    May 12, 2017 at 13:23

0

You must log in to answer this question.

Browse other questions tagged .