I am writing a paper by splitting it to several subfiles and editing each subfile once a time.
For each subfile, it has the code:
\documentclass[../../main.tex]{subfiles}
\begin{document}
Content of the paper
\end{document}
(In the main file, I use packages
\usepackage{amsfonts, amssymb, amscd}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{subfiles})
This enables me to compile the subfile and edit it. However, I met a problem that each time when I cite something in this subfile, it will not show up properly -- it just shows "[??]" (but it will show properly if I compile the main file).
My question is: is there any way that the subfile can show references properly (even better, it contains a list of reference at the end just as the main file)?
I know that I can add the .bib file to each folder where the subfile is kept, but this method is very inconvenient as I need to update my .bib file ocasionally.
\cite{}a reference using bibtex ? or do you want to reference something like a figure with\ref{}? if it is the latter I suggest you look into xr. If it is the first, then do you want each chapter to have its own bibliography ? a MWE would be helpful here... – Elad Den Dec 12 '17 at 14:56xcitepackage, which extends the citing mechanism 'the same way' (well ;-)) likexrdoes for the real cross-references – Dec 12 '17 at 22:46