TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Problem in a nutshell: I would like to reference items in an external LyX document (containing a list of definitions and theorems).

Problem in detail: I am a Math student. I maintain a LyX document containing a numbered list of definitions and theorems. I often add, delete and modify this document. I would like to treat this document as a database and reference it in other LyX documents like I do with in-document cross-references to definitions, theorems, etc. How can this be accomplished?


  1. I'm open to solutions that go beyond LyX.
  2. I'm open to solutions that require making the list of definitions available in some form other than a LyX document (e.g. a database).

Software used: LyX + MiKTeX + BibTeX on Windows 7

My level of LaTeX proficiency: Beginner+

share|improve this question
xr package may help. – Leo Liu Jan 1 '12 at 8:47
Thanks, Leo Liu. – Itai Jan 1 '12 at 9:01
up vote 5 down vote accepted

I don't know about LyX, but in plain LaTeX you can use the xr package:


The package provides a means of creating references to labels in another file (say, otherfile.tex) by reading that file's auxiliary information from LaTeX processing (otherfile.aux). This is achieved by the \externaldocument command, which also permits “relabelling” all of the external file with a prefix for all of its labels.

As said in the page, xr is included in MikTeX package called tools.

share|improve this answer
Thanks, Vesa Linja-aho. – Itai Jan 1 '12 at 9:02

Your Answer


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.