Citations across tex files

I have a strange problem that I can't resolve.

In my main *.tex file I have

\input{Chapter1VB.tex}
\input{vbq.tex}
\newpage
\input{Chapter2VB.tex}


In the first tex file I have

\begin{thm}\label{thm1.3}


In the third I have

(which exists by Theorem~\cite{thm1.3}


No matter how many times I 'latex' or 'pdflatex' I keep getting a warning that thm1.3 is undefined.

Any thoughts?

The \cite macro should be used to cite bibliography references (marked by \bibitem inside a thebibliography environment). For cross-references (marked by \label), use \ref instead of \cite.

Note: You may use packages like cleveref to automatically add "Theorem" (or whatever term is appropriate) to a cross-reference.

\documentclass{article}

\newtheorem{thm}{Theorem}

\usepackage{filecontents}

\begin{filecontents}{first.tex}
\begin{thm}\label{thm1.3}
Some text.
\end{thm}
\end{filecontents}

\begin{filecontents}{second.tex}
\dots~which exists by Theorem~\ref{thm1.3}
\end{filecontents}

\begin{document}

\input{first}

\input{second}

\end{document}


(The filecontents environment is only used to include some external files directly into the example, so that it compiles. It is not necessary for the solution.)

• opps, I did know that. I'll blame...Friday-itis May 20, 2011 at 6:23