I have a main.tex file, an appendix.tex file and a ref.bib file.

My main page has references from the bib file, and I want the references in the appendix to be also referring to the ref.bib file without showing the references at the end.

Also if I add \bibliography{ref} to my appendix.tex the references shows at the end and not in the references of main.tex. (I want all the references to be shown at the end of main.tex.)

Now I know there may be similar questions like: use the same bibliography bib file for two latex source (main and appendix) But the answer is vague. It says use the xc package. Unclear instructions. Tried adding the code and failed.

What should I do?

  • 1
    You shouldn't need to do anything special. Just put your \bibliography{...} command at the end of your main file before the appendix, and any citations in the appendix will appear there too. – Alan Munn Jul 22 at 3:07
  • The main.tex and appendix.tex are different files. If I put \bibliography at the end of appendix, it will show the used references at the end of appendix. I want all at the end of main.tex. – ELLA Jul 23 at 4:14
  • 1
    Yes, I understand. So put the \bibliography command at the end of the main text not at the end of the appendix. – Alan Munn Jul 23 at 4:42
  • 2
    This reads very similar to your earlier question tex.stackexchange.com/q/553841/35864. It is still not clear to me whether your compile your main document and appendix separately or whether you just include the appendix into the main document. If you compile them as separate documents (and on Overleaf presumably also projects), things are going to be much more tricky. It may be a better option to compile both of them in the same document and just split the PDF if in the end if you need separate documents. – moewe Jul 23 at 6:54
  • That makes sense. Yes I was trying to compile them separately and couldnt make it work. So I will just compile it as one pdf and then seperate them. Thanks to both of you for taking the time to answer me. – ELLA Jul 23 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.