LaTeX forum ⇒ Theses, Books, Title pagesCross 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!!!

Postby Estela » Thu May 10, 2018 5:19 pm

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

Postby Estela » Fri May 11, 2018 10:43 am

SOLVED thnx!!!

User avatar
Stefan Kottwitz
Site Admin
Posts: 9102
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat May 12, 2018 11:01 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
Site admin


Return to “Theses, Books, Title pages”

Who is online

Users browsing this forum: No registered users and 2 guests