I have two tex files, tex1.tex
and tex2.tex
. I have defined multiple bibitem
s on tex1.tex
and printed the bibliography there. Is it possible to reference some of the biblatex items from tex1
in tex2
, and print the corresponding referenced items in tex2
?
MWE:
tex1.tex
:
\documentclass{article}
\begin{document}
I'm citing~\cite{cite2} first and then~\cite{cite1}
% I could also manually write the bibitems here
\bibliographystyle{unsrt}
\bibliography{tex1_biblio}
\end{document}
tex1_biblio.bib
:
@article{cite1,
author = "Author1",
title = "Title1",
journal = "Journal1",
volume = "8",
number = "20",
pages = "888",
year = "2000",
DOI = ""
}
@article{cite2,
author = "Author2",
title = "Title2",
journal = "Journal2",
volume = "3",
number = "10",
pages = "77",
year = "2010",
DOI = ""
}
tex2.tex
:
\documentclass{article}
\usepackage{biblatex}
\begin{document}
\section{Sec1}
I'm citing~\cite{cite1} from mwe1 (shoud be [2])
\printbibliography % (?)
\section{Sec2}
I'm citing~\cite{cite1} from mwe1 (shoud be [2])
\printbibliography % (?)
\end{document}
So, if I cite
[2]
(from tex1
) in tex2
, I have a bibliography as
[2] ref 2 from tex 1 ...
If this is possible, would it be also possible to print these references in tex2
multiple times? (for example, for different sections)
I'm aware of the xcite
package but I can't figure out how to make it work and I think it doesn't allow me to print the bibliography on a different tex file
Best Answer
tex1.tex
being the paper, upon whichbibtex
is run should look like a normal document.tex2.tex
can then make use of thexcite
package to use the same reference labels without generating a bibliography.Or if the bibliography should be replicated in its entirity then
\input{tex1.bbl}
can be used.To generate references with the same labels as
tex1
but only print those used intex2
thenxcite
should be used to determine the labels and then a separate bibliography needs to be generated. To use the same labels we can do the below (this is not a very robust solution and may well break with use of any other bibliography-related packages or different bibliography styles) where the bibliography label for every entry is generated from a\cite
command which extracts the relevant number fromtex1
.