I have a document organized into several chapters. In each chapter, theorems are numbered by section (1.1, 1.2, … even in chapter 5). I often would like to refer to theorems in different chapters. However, if I am in chapter 6 and refer to theorem 1.3 in chapter 1, it is rather ambiguous, and the reader might assume that "theorem 1.3" meant the current chapter. Is there an automatic way of configuring things so that the cross-referencing will say "theorem 1.3" only if it is really the current chapter, but "theorem I.1.3" (or something like that) if the cross-referencing spans chapters?
[Tex/LaTex] Cross-referencing in multiple chapters
cross-referencing
Best Answer
You can add a conditional in the reference number which checks if the chapter number of the referenced label is identical to the current chapter number and then suppress the chapter number in the output.
Here a way to do it. I used
ntheorem
and loadedcleveref
because you said you are using it. It might need some minor adjustments to work in your document, but you get the idea.