2

I am attempting to reference labels in an external LyX document. I have found how to do this using the xr package in .tex files. However, I see no way of doing this in LyX without having to export to .tex first. Has anyone figured out how to refernece external documents in LyX without having to export to .tex first?

Alex
  • 2,111
  • I know nothing about lyx but doesn't it generate .aux files when used? xr just needs the aux file of the document it is referencing. – David Carlisle Jul 13 '14 at 20:20
  • It does not - things actually seem to work without the aux file.. not sure how that is possible but xr but somehow be reading the .lyx file – Alex Jul 13 '14 at 20:22
  • 1
    LyX generates a .tex file in a temporary directory and runs e.g. pdflatex on that file, so the .aux file and other temporary files are generated in that temporary directory. – Torbjørn T. Jul 13 '14 at 21:57
  • Related questions: http://tex.stackexchange.com/q/134896/586 http://tex.stackexchange.com/q/70988/586 http://tex.stackexchange.com/q/39772/586 – Torbjørn T. Jul 13 '14 at 21:58
  • yes but how doex xr know what that temporary directory is? – Alex Jul 13 '14 at 23:08
  • (that is, i'm astounded that simply putting the file name in the preamble worked since i specified no directory) – Alex Jul 13 '14 at 23:11
  • 1
    If I were to guess, I'd assume that LyX uses the same temporary directory within a single session. If that is the case, the two .tex files will be in the same folder, and then you don't have to specify the folder. – Torbjørn T. Jul 14 '14 at 08:40
  • ahh good call. that makes sense. – Alex Jul 14 '14 at 18:13

0 Answers0