Theses, Books, Title pages ⇒ Cross referencing between different separate chapters!!!
Cross referencing between different separate chapters!!!
..................
\begin{document}
\chapter{chapter1}
\label{sec:Ch1}
\input{chapter1}
\chapter{chapter2}
\label{sec:Ch2}
\input{chapter2}
.................
\end{document}
and I want to reference Chapter 1 (chapter1.tex) to Chapter 2(chapter2.tex), the typical Chapter~\ref{sec:Ch1} inside chapter2.tex file isn't working!!!
Can somebody help me.....
thnx!
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Cross referencing between different separate chapters!!!
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Cross referencing between different separate chapters!!!
welcome to the forum!
How did you solve it? Besides I'm curious, often people come in googling with some problem, and if they see "Solved!" without the actual solution mentioned, they might be disappointed.

I think that you already did it the right way. You just need to compile 2 times to get references working: at the first run, the labels get written into the .aux file, at the second run, it's read in to produce the references.
By the way, for chapters
\include
is commonly used instead of \input
. (the \chapter
command is in the included file).Stefan