[texhax] the command \includeonly{} in LaTeX

Philip G. Ratcliffe philip.ratcliffe at fastwebnet.it
Thu Feb 1 21:57:06 CET 2007


> When I try to use the 
> \includeonly and \include commands in a root file, I get a 
> "There were 
> undefinded references" message despite having the file which 
> contains the 
> \label command among the files used in the \includeonly 
> command. 
> [snip]
> ------file label.tex
> \begin{enumerate}
> \item
> Labeled text.
> \label{test}
> \end{enumerate}
> --------------------
> ------file reference.tex
> Where is \ref{test}?
> --------------------
> ------file main.tex
> \documentclass[11pt]{article}
> \includeonly{
> label,
> reference
> }
> \begin{document}
> \include{reference}
> \end{document}
> --------------------

It's the file label.tex that hasn't been input or included that's the
problem.  You need an \include{label} in your main  file.

Note that \includeonly only tells LaTeX which of the ALREADY \include'd
files to really include. It unfortunately does NOT complain if a file is
missing.

Cheers,  Phil Ratcliffe



More information about the texhax mailing list