GeneralSubfile package and bibliography

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
user467
Posts: 4
Joined: Wed Nov 01, 2017 11:58 am

Subfile package and bibliography

Post by user467 »

Hi all,

I have to apologize in advance for this question because it has been asked before. Even though I looked at other peoples' posts and the "Using LATEX to Write a PhD Thesis" document, I was unable to sort out my problem. At the moment I try to combine my different, independent chapters to one big thesis. Each chapter has its separate bib file. In order to build the dissertation I use the subfile package. The directory structure of my thesis is:

Graphs
+ Loads of graphs
References
+ Bibliography.bib (one big database of all the individual bibliographies below)
+ Bibliography1.bib (bibliography chapter 1)
+ Bibliography2.bib (bibliography chapter 2)
+ Bibliography3.bib (bibliography chapter 3)
+ Bibliography_Intro.bib (bibliography phd introduction)
Sections
+ chapter1.tex
+ chapter2.tex
+ chapter3.tex
+ phd_intro.tex
main.tex


In my main.tex file I set the preamble, which looks like

Code: Select all

loads of \usepackage{}  statements
.
.
.
\usepackage[uniquename=false, uniquelist=false, style=authoryear-comp,backend=biber]{biblatex}

\renewbibmacro{in:}{} %gets rid of the word "in" in the printed bibliography

\usepackage{url}

\usepackage{graphicx}

\graphicspath{{Graphs/}{../Graphs/}} 

\usepackage{subfiles}

\usepackage{blindtext}

\addbibresource{../References/Bibliography.bib}

\begin{document}

\chapter{Introduction}
 
\subfile{Sections/phd_intro}
 
\chapter{Chapter 1}
 
\subfile{Sections/chapter2}

\chapter{Chapter 2}
 
\subfile{Sections/chapter2}

\chapter{Chapter 3}
 
\subfile{Sections/chapter3}

\printbibliography{../References/Bibliography}

\end{document}

However, the end result is that Latex doesn't seem to find the big Bibliography file and it therefore fails to cite properly. So the end results in the preview looks like this:

... text text text author2017paper ... text text text ....

In other words, Latex doesn't know what to do with \textcite{author2017paper} and just writes "author2017paper". This is evident from the warning message I receive:

Code: Select all

(no line number):
[0] Config.pm:343> INFO - This is Biber 2.5
[0] Config.pm:346> INFO - Logfile is 'main.blg'
[47] biber:290> INFO - === Wed Nov  1, 2017, 15:36:16
[181] Biber.pm:352> INFO - Reading 'main.bcf'
[372] Biber.pm:777> INFO - Found 72 citekeys in bib section 0
[385] Biber.pm:3494> INFO - Processing section 0
[400] Biber.pm:3658> INFO - Looking for bibtex format file '../References/Bibliography.bib' for section 0
[492] Utils.pm:165> ERROR - Cannot find '../References/Bibliography.bib'!
[492] Biber.pm:113> INFO - ERRORS: 1

Therefore I must reference the .bib file incorrectly but I don't know what to change. Would I also need to include \printbibliography{../References/Bibliography} in each individual chapter? Sorry for asking this very straight forward question. I would be gratefule for any help.

Best,

Rob

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Subfile package and bibliography

Post by Stefan Kottwitz »

Hi Rob,

welcome to the forum!

Since the .bib file is not found, I would try this: move the Bibliography.bib file into the same folder, where your main .tex document is. Then change

\addbibresource{../References/Bibliography.bib}

to

\addbibresource{Bibliography.bib}

I just guess that it doesn't work with a relative path to another folder.

Stefan
LaTeX.org admin
user467
Posts: 4
Joined: Wed Nov 01, 2017 11:58 am

Subfile package and bibliography

Post by user467 »

Hi Stefan,

Many thanks for your reply and help! Great, I will give it a try and post the outcome here.

Best,

Rob
user467
Posts: 4
Joined: Wed Nov 01, 2017 11:58 am

Subfile package and bibliography

Post by user467 »

Thanks again for your help. I have moved now the the .bib file to the main.tex and changed the \addbibresource{} accordingly. Unfortunately the problem is still there and weirdly I get the exact same error message, even though the folder "References" doesn't exist anymore (I have deleted all unnecessary .bib files and just moved the main bibliography). In case you have any hints, please let me know. Maybe I made mistake when I set up structure.

Best,

Rob
user467
Posts: 4
Joined: Wed Nov 01, 2017 11:58 am

Subfile package and bibliography

Post by user467 »

Hi all,

I just wanted to let you know that my problem has been solved. I logged out last night and this morning it miraculously worked. I wish problems like this would always solve over night.

Thanks again for your help,

Rob
Post Reply