# How to reference list items in another TeX document?

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?

Variations:

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+

-
`xr` package may help. –  Leo Liu Jan 1 '12 at 8:47
Thanks, Leo Liu. –  Itai Jan 1 '12 at 9:01

## 1 Answer

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

http://ctan.org/pkg/xr

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.

-
Thanks, Vesa Linja-aho. –  Itai Jan 1 '12 at 9:02