Theses, Books, Title pagesCross referencing between different separate chapters!!!

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

Cross referencing between different separate chapters!!!

Post by Estela »

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!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Estela
Posts: 2
Joined: Thu May 10, 2018 5:11 pm

Cross referencing between different separate chapters!!!

Post by Estela »

SOLVED thnx!!!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Cross referencing between different separate chapters!!!

Post by Stefan Kottwitz »

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
LaTeX.org admin
Post Reply