## LaTeX forum ⇒ Theses, Books, Title pages ⇒ Cross referencing between different separate chapters!!! Topic is solved

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Estela
Posts: 2
Joined: Thu May 10, 2018 5:11 pm

### Cross referencing between different separate chapters!!!

My main.tex file

..................
\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!

Tags:

Estela
Posts: 2
Joined: Thu May 10, 2018 5:11 pm
SOLVED thnx!!!

Stefan Kottwitz
Posts: 9105
Joined: Mon Mar 10, 2008 9:44 pm
Hi Estela,

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