On 9 Feb, 2007, at 3:20 PM, Richard Heck wrote:

Below....

Stefano Franchi wrote:
Hi Richard, thanks for the help, However I cannot even get to step 1. More precisely:

On 9 Feb, 2007, at 12:42 PM, Richard Heck wrote:

Stefano Franchi wrote:
I am still fighting with LyX/LaTeX cross-referencing facilities. While it's rather clear how to use it to refer to page numbers and equation numbers within a single file, I am in the dark on how:
1. cross-referencing to a separate file
2. having the section title appear in the cross-referencing document.
In fact, I am not even sure whether (1) or (2) are possible at all.
(1) is easy, but not terribly intuitive. You need to have both files open in LyX: The one you want to reference and the one you're editing. Now Insert>Cross-reference, and at the top of the dialog box is a drop-down box marked "Labels in". Choose the target file, and the labels in that file will appear in the dialog box.

I had gotten this far, but I cannot get it to work. I do see the label I defined in the other document and I can insert it into the cross-referencing doc, but the pdf file produced has question marks in it where the reference should appear. And indeed the LaTeX log complains of an undefined reference.
Sorry, I forgot to say something before. I was assuming that Chapters 1 and 2 (from your example) would be included in a single file on which you then ran LaTeX. If you're doing that, then it should be working. If not, send me that LyX files and I'll see what I can do.

If, on the other hand, you are trying to compile JUST Chapter 2, with references also being made to Chapter 1, then you will see "?" unless you use the xr package. This isn't a huge issue, as it will be correct when the whole thing is compiled. But, as I said, you can use xr if you need to do so.


Thanks, that makes sense. I tried playing around with xr and its commands, but couldn't get it to work, in LyX or Straight LaTeX. At any rate, even if it did, it would not have been a real solution. With the references to external files buried in the preamble it is a pain to maintain. I give up and will avoid such external cross-references in the future.

Cheers,

S.



__________________________________________________
Stefano Franchi
Department of Philosophy                  Ph:  (64)  9 373-7599 x83940
University Of Auckland                  Fax: (64) 9 373-8768
Private Bag 92019                               [EMAIL PROTECTED]
Auckland
New Zealand                     

Reply via email to