Short description of my Question:
I am using the xr
or xcite
package in my derivative project supplementary.tex
to give references/citations the same number that they already have in an external document main.tex
. However, doing this will not display the bibliography in the supplementary. How can I display the bibliography also in the supplementary file, only showing the entries that have actually been cited in the supplementary? (So that it looks like the image under "Goal" below.)
Example:
% main.tex
\documentclass{article}
\begin{document}
\section*{Main (External) Document}
Main document with many citations \cite{Chomsky1957, Chomsky1965, Knuth1984texbook}.
\bibliographystyle{plain}
\bibliography{mybib}
\end{document}
% supplementary.tex
\documentclass{article}
\usepackage{xr} % or \usepackage{xcite}
\externaldocument{main} % or \externalcitedocument{main}
\begin{document}
\section*{Supplementary Document}
Supplementary document that only contains some of the main references from the main document \cite{Knuth1984texbook}.
\end{document}
Bibliography data file:
% mybib.bib
@book{Knuth1984texbook,
Author = {Knuth, D.E.},
Title = {The \TeX book, volume A of Computers and typesetting},
Publisher = {Addison-Wesley},
Year = {1984},
}
@book{Chomsky1957,
Address = {The Hague},
Author = {Noam Chomsky},
Publisher = {Mouton},
Title = {Syntactic Structures},
Year = {1957},
}
@book{Chomsky1965,
Address = {Cambridge Mass.},
Author = {Noam Chomsky},
Publisher = {MIT Press},
Title = {Aspects of the Theory of Syntax},
Year = {1965},
}
This works very nicely (as long as the main.aux
is generated in the same folder as the supplementary.tex), as can be seen in the images above.
However, I would like to include a list of References(Bibliography) also in the Supplementary Document, which only contains the references that I have actually cited in the Supplementary. I made an image with paint that shows what I want.
Goal:
How can I achieve this?
I already tried to use \bibliography{mybib} at the end of supplementary.tex. While this included a list of the references used in supplementary.tex (and no others), the citation numbers started again from 1 independent of their number in main.tex - basically undoing what xcite did.