I have a large project that uses the RevTeX documentclass. Sections are incorporated using \include{}. The problem is that labels are not correctly resolved (Reference `xxx' on page 1 undefined). A strange aspect of the issue is that many (most?) references work, but some do not.
Here is a minimum working example
%\documentclass[12pt]{article}
\documentclass[12pt]{revtex4-1}
\newcommand{\be}{\begin{eqnarray}}
\newcommand{\ee}{\end{eqnarray}}
\begin{document}
Eq. \ref{test2}
\be
\label{test2}
1+1=2
\ee
\include{eos}
Eq. \ref{test3}
\be
\label{test3}
1+1=2
\ee
\end{document}
where eos.tex is
Eq. \ref{test}
\be
\label{test}
1+1=2
\ee
The label in eos.tex is not resolved. The other labels are. The problem can be fixed by replacing \include{} by \input{}, or by not using RevTeX.
Is this a known incompatibility? Or some kind of intended behavior?
\includestarts a new page and is thought more for\chapters (which don't exist inrevtex) I'd say that using\inputis better. You can always include a manual\clearpageif you want. – campa Jun 10 '21 at 13:50alignfromamsmathbut if you do use it the there must be two&per row one either side of the relation. – David Carlisle Jun 10 '21 at 13:54\includealways adds\clearpageat the beginning and end, and it's unlikely you really want it. – egreg Jun 10 '21 at 16:32revtex4-2. – campa Jun 10 '21 at 20:48revtex4-2withLaTeX2e <2017-04-15>. Do you have any idea what change might have fixed the issue? – campa Jun 12 '21 at 13:58