0

I am writing a large report in TeXshop and have decided to use subfiles for each chapter, and have created a .bib bibliography. However, now that I have separated the chapters into subfiles, the footcites I was using are no longer working (e.g. they put a footnote that says "Key", instead of with the actual citation).

Is there a way to only address the bibliography in my main.tex, rather than having to run through it in every subfile? Or am I better off switching to \include or just keeping everything in one long document?

%mybib.bib:
@book{Key,
  title={Nothing},
  author={Nobody},
  year={2013},
  publisher={Springer}
}

%chapter1.tex:
\documentclass[main.tex]{subfiles}
\begin{document}
\chapter{Chapter 1}
I would like a citation in the footnotes, so I try using \footcite{Key}
\end{document}

%main.tex:
\documentclass{report}
\usepackage{subfiles}
\usepackage{biblatex-chicago}
\addbibresource{mybib.bib}
% !BIB TS-program = biber

\begin{document}
\tableofcontents
\subfile{Chapter1}  
\printbibliography
\nocite{*}
\end{document}
3
  • 1
    Can you provide a minimal example (or see here)? Constructing ones with included files are an even more annoying than simple minimal working examples. So if you do that part of the hard work, others will be more likely to explore the problem and, ideally, suggest an answer to it.
    – jon
    Feb 26 '16 at 3:30
  • 1
    If you use biblatex citations should work absolutely fine even if you split your document up into sub files. This makes me think something more is going on here. Please try and reproduce the problem in an MWE and make sure to also post the relevant warnings and errors from the log files.
    – moewe
    Feb 26 '16 at 6:01
  • As you can see in Bibliographies when using subfiles subfiles and biblatex can work together smoothly.
    – moewe
    Feb 26 '16 at 17:30
1

I don't see why you would need to use the power of subfile here, a simple \include/\input would probably be enough.

That said, the following MWE works mighty fine for me (obligatory filecontents warning: this document saved as <file>.tex will overwrite <file>-sub1.tex)

\documentclass{article}
\usepackage{subfiles}
\usepackage{filecontents}
\begin{filecontents*}{\jobname-sub1.tex}
\documentclass[\jobname.tex]{subfiles}
\begin{document}
\section{Chapter 1}
I would like a citation in the footnotes, so I try using \footcite{geer}
\end{document}
\end{filecontents*}

\usepackage{biblatex-chicago}
\addbibresource{biblatex-examples.bib}

\begin{document}
\subfile{\jobname-sub1}  
\printbibliography
\nocite{sigfridsson}
\end{document}

Saved as test.tex I only needed to run pdflatex test, biber test, pdflatex test, pdflatex test and everything looked as expected.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.