2

I want to cross-reference between different chapters. For example I have chap2.tex and chap3.tex as files containing all the theorems and methods, respectively. The following chapters 4,5...7 will extensively rely on cross-referencing from these two chapter.

I am using the thesis template from here and I have tried following the solution provided for a similar problem using the xr package, but it is not working.

Can somebody point out the error I am making? Is there something with the template?

  • 1
    If you're including these in the same "master document", there's no need for specifically using xr. A simple \label and corresponding \ref would suffice. – Werner Jul 22 '15 at 18:17
  • @Werner I am keeping each chapter separate as they are around 10 chapters. \label and \ref works perfectly fine within a chapter on a single chap.tex file. – Nitya Jul 22 '15 at 18:22
  • 2
    What do you mean by "keeping each chapter separate"? Do you compile them on their own? If you \include each chapX.tex as part of a master document, then you can still use \label-\ref, even though the \label is in one file and \ref is in another. – Werner Jul 22 '15 at 18:30
  • @Werner I \include them into the master document as \include{chap1.tex}, \include{chap2.tex}......Trying to use \ref is not giving me any option to include in another chapter as it gives in the same chapter. – Nitya Jul 22 '15 at 18:38
  • 1
    Yes you are. The suggested labels in your \ref might not show up, but you can certainly use them. – Werner Jul 22 '15 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.