Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am writing my thesis using LyX's thesis template, and each chapter is a different file (chapter-x.lyx).

However, sometimes, I need to refer to a section from another chapter, which is in a different file. So for example:

chapter-2.lyx:

this is explained further in chapter \ref{chap:White-Box-Testing}

chapter-3.lyx:

\begin_layout Chapter
White Box Testing
\begin_inset CommandInset label
LatexCommand label
name "chap:White-Box-Testing"

The problem is that when I generate the PDF document from Thesis.lyx, which has the pointers to all the chapter-x.lyx files, I get broken links in the output document.

How would I go about fixing this?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

The problem is solved by setting the correct "master document": In each branched document (chapter-x.lyx), go to Document>Settings>Document Class.
Here, ensure that Select default master document is checked and the value is set to the filename referring to the main document from which all these other documents branch off. In my case, this document is Thesis.lyx and not the default thesis.lyx.

This rename fixes the issue

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.