This question led to a new package:
xcite
I want to reference to citations from other file. Similar to what xr package
does to labels, but I want to apply it for the bibliography.
If I'm able to do \cite{someone}
in the main file, and it creates let say the number [4], I want to do the same \cite{someone}
in a second file, and also create the same number [4]. Similar to what xr
does with the labels.
By the way, I tried to add the main.bbl
file from the main file. However, that adds all the references to the end of the second file. I want to avoid this.
Is there any package that accomplish this?
Best Answer
Save the following in your working directory as
xc.sty
:Then say, in your
derived.tex
document,(where
main.tex
is the document you are taking the citations from). Nowin
derived.tex
will do what you want.The interface is just the same as xr's: you can also specify a prefix
and use
\cite{A-xyz}
inderived.tex
.The
xc.sty
file has been obtained fromxr.sty
with some very simple transformations:xr
->xc
XR
->XC
\externaldocument
->\externalcitedocument
\newlabel
->\bibcite