I often need to make a reference to an equation (mostly) in another LyX file. Now, I know that it's easy to cross-reference between different files if one is inputed/included inside the other or both inside a master file.
However, if I want to cross-reference equations between unrelated texts, the trick doesn't seem to work. In a quick search, I was not able to find any thread dealing with this neither in the list nor in the wiki pages. The only way I found to accomplish this is using the xr.sty package in the following manner: Suppose you want to mention equation (label: eq1) in document doc1.lyx inside document doc2.lyx and they are not inputed/included in any way: First, export doc1.lyx to LaTex -> doc1.tex -> latex doc1 -> doc1.aux created. Then, in the preamble of doc2.lyx: ... \usepackage{xr} \externaldocument{doc1} ... making sure that doc1.aux is in the path determined by the TEXINPUTS environment variable. Now I can reference the labels in doc1.lyx. The catch here is that every time I make new changes in doc1.lyx, I have to go through the steps all over again... Does anyone know of any other way to do this? If there is no other way, I would suggest to developers that they try to implement this resource so that LyX can extract automagically this information from other .lyx file, without having to go through the .tex and .aux intermediate steps. Thanks. -- Rudi Gaelzer Department of Physics Institute of Physics and Mathematics Federal University of Pelotas Caixa Postal 354 - Campus UFPel 96010-900 Pelotas - RS Phone: +55-53-3275-7468 FAX: +55-53-3275-7343 Registered linux user # 153741