LaTeX forum ⇒ BibTeX, biblatex and bibernatbib and subfiles packages Topic is solved

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Posts: 14
Joined: Fri Aug 13, 2010 8:22 am

natbib and subfiles packages

Postby nich » Thu Sep 30, 2010 1:01 pm

Anyone know how I can get these two to work together.

Obviously I only want one reference list in my final document so I cant include an instruction to crease a bibliography in every subfile. But when I do not include the commands to crease a bibliography in each subfile I cant get the in text citations to show when I compile individual subfiles.


Recommended reading 2021: • •
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

natbib and subfiles packages

Postby frabjous » Thu Sep 30, 2010 7:57 pm

I don't have a lot of experience with the subfiles package, but one option that occurs to me would be to go ahead and include the bibliography in each subdocument, but use the comment package to suppress its output:


Posts: 1
Joined: Sat Jan 22, 2011 11:56 pm

natbib and subfiles packages

Postby GregNash » Sun Jan 23, 2011 12:10 am

Packages cannot be declared in subfiles. My current solution is to add

at the end of each subfile and to uncomment them when I'm compiling the individual subfiles.

Note that I use "../References" instead of "References" because my References.bib file is located in the parent directory.

Posts: 1
Joined: Wed Apr 20, 2011 3:46 am

natbib and subfiles packages  Topic is solved

Postby crowding » Wed Apr 20, 2011 3:55 am

Here via google, just worked out the answer to this one. Define something like \biblio to produce a bibliography in the individual files, but undefine it in the body of your main file.

In your main file:

In your chapter files:

Posts: 1
Joined: Sun Aug 09, 2015 5:28 pm

Re: natbib and subfiles packages

Postby AlexIgamberdiev » Sun Aug 09, 2015 5:33 pm

Awesome, it works perfectly, thank you!

User avatar
Stefan Kottwitz
Site Admin
Posts: 10118
Joined: Mon Mar 10, 2008 9:44 pm

natbib and subfiles packages

Postby Stefan Kottwitz » Tue Aug 11, 2015 12:52 am

Hi Alex,

welcome to the forum!

It's great to read, that it worked for you. Just to mention that, perhaps the challenge could be tackled with the modern biblatex package too.

Stefan admin

Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 4 guests