2

I am compiling my thesis where I have a rootfile and each chapter is read in with \include{chapterfolder/chaptername}. Everything works but the references, they are all undefinded. When I run BibTex however, the process goes through without errors ("Process exited normally").

I have tried putting everything, i.e. chaptername.tex and chapterbibfile.bib, in the same folder as the rootfile instead of a subfolder, but the result is the same.

Strange enough I had an old version of this document for the research proposal, where referencing worked (exactly 2 years ago). I am using TeXLive-2015 on a MacBook Pro.

Help is highly appreciated, thank you.

Here's my rootfile:

    \documentclass{report}
%\usepackage{etex}
%\reserveinserts{28}
% the latter two are due to the "no-room-for-a-new-dimen" problem, which is discussed and resolved here: http://tex.stackexchange.com/questions/38607/no-room-for-a-new-dimen
% in my case, I had too many packages, and these two lines solve the trick

%\onehalfspacing
\usepackage{atbegshi}% http://ctan.org/pkg/atbegshi THIS REMOVES THE ODD EMPTY PAGE BEFORE THE TITLEPAGE, WHICH ONLY APPEARED WHEN I CHANGED FONT TO 12 PT
\AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}}
\input{preamble}


\title{
\begin{center}
\begin{large}
University of Neverland\\[0.3cm]
Address line 1\\
Address line 2\\
City\\[1cm]
\end{large}
\begin{huge}
        Three Essays on the Economics of \\ 
        Fairy Tales\\
\end{huge}
            \vspace{0.5cm}      
{\Large \textit{Thesis in the Doctoral Program \\
of Fairy Tale Studies}}\\[1.4cm]
\begin{large}
Supervisor\\
Peter Pan\\[0.3cm]
Co-Supervisor\\
Cinderella\\[0.3cm]
External Referee\\
Snow White\\
\end{large}
\end{center}}

\author{\vspace{1cm}\\
        \vspace{0.3cm}Arielle \\
Under the Sea\\
Far Far Away\\
        arielle@ocean.com\\
        Student ID: 00-000-000}
\date{\vspace{1cm} \today}


\begin{document}
\pagenumbering{gobble} %this eliminates the page on the first page, \thispagestyle{empty} somehow did not work here.. 
%% my document content
\clearpage\maketitle

\afterpage{\blankpage}
\pagebreak




%% %% %% %% TOC PAGE %% %% %% %% 
\setcounter{page}{1}
\fontsize{12}{18}\selectfont
\pagestyle{plain}
\pagenumbering{roman}
\setcounter{tocdepth}{1} 

\renewcommand{\contentsname}{Table of Contents} % Changes the default 

\tableofcontents
%% %% %% %% TOC PAGE %% %% %% %% 

\pagebreak

% SUMMARY
%\include{./preface_summary/summary}


%%% %%% %%% CONTENT / CHAPTERS %%% %%% %%% 
\pagebreak
\setcounter{page}{1}
\pagestyle{plain}
\pagenumbering{arabic}

\include{Chapter1_test}
\pagebreak

\include{Chapter2_test}
\pagebreak
\end{document}

My chapter 1 looks like this:

% This is Chapter1_test.tex
%%%%%%% THIS IS FOR THE THESIS VERSION %%%%%%% 
\renewcommand{\thefootnote}{\fnsymbol{footnote}} %creates symbol footnotes, which I need for the aknowledgements.
\chapter{This is the First Chapter}

\begin{Large}
\textit{Peter Pan and Arielle}\footnote{We thank Tinkerbell.}
\end{Large}
\bigskip

\renewcommand{\thefootnote}{\arabic{footnote}}  \setcounter{footnote}{0} % and this sets footnote nubering back to normal, starting with 1 =)


\fontsize{12}{18}\selectfont
\section{Introduction}
\label{Introduction 1}
This is the intro of the first chapter. Here I cite \cite{Piketty2001} and \cite{Piketty2014capital}

\pagebreak
\addcontentsline{toc}{section}{References}

%\singlespacing
\renewcommand{\bibname}{References} % Changes the default 'Bibliography' into 'References'
\footnotesize
\bibliographystyle{apecon}
\bibliography{myref_chap1}

Chapter 2:

% This is Chapter2_test.tex 
%%%%%%% THIS IS FOR THE THESIS VERSION %%%%%%% 
\renewcommand{\thefootnote}{\fnsymbol{footnote}} %creates symbol footnotes, which I need for the aknowledgements.
\chapter{This is the Second Chapter}

\begin{Large}
\textit{Arielle}\footnote{I thank Sebastian.}
\end{Large}
\bigskip

\renewcommand{\thefootnote}{\arabic{footnote}}  \setcounter{footnote}{0} % and this sets footnote nubering back to normal, starting with 1 =)


\fontsize{12}{18}\selectfont
\section{Introduction}
\label{Introduction 2}
This is the intro of the second chapter. Here I cite \cite{YoungVarner2011} and \cite{Tiebout1956}

\pagebreak
\addcontentsline{toc}{section}{References}

%\singlespacing
\renewcommand{\bibname}{References} % Changes the default 'Bibliography' into 'References'
\footnotesize
\bibliographystyle{apecon}
\bibliography{myref_chap2}

The Preamble:

% This is preamble.tex
% % % THIS IS MY GENERAL PREAMBLE FILE % % %
\usepackage[ansinew]{inputenc}
\usepackage{threeparttable}
\usepackage{fancyhdr}
\usepackage{color}
\usepackage{apacite}
\usepackage[sectionbib]{natbib}
\usepackage{chapterbib}
\usepackage{graphicx}
\usepackage{csvsimple}
\usepackage{subfig}
\usepackage{amsmath} 
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{longtable}
\usepackage{appendix}
\usepackage{graphpap}
\usepackage{setspace}
\usepackage{amsfonts}
\usepackage{breqn}
\usepackage{floatrow}
\usepackage{url}
\usepackage[english]{babel}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{capt-of}
\usepackage{lipsum}
\usepackage{comment}
\usepackage{setspace}
\usepackage{here}
\usepackage[applemac]{inputenx}
\usepackage[T1]{fontenc}
\usepackage[colorlinks, linkcolor = black, citecolor = black, filecolor = black, urlcolor = blue]{hyperref}


\usepackage[left=3.5cm,top=3cm,right=3.5cm]{geometry}  % This sets the margins
\usepackage[bottom]{footmisc} % This makes sure footnotes are at the bootom of the page.

\usepackage{float}
\floatstyle{plaintop}
\restylefloat{table}
% these three lines put table caption at the top of the table
%\usepackage[tableposition=top]{caption}


\def\citeapos#1{\citeauthor{#1}'s (\citeyear{#1})} % This creates a command for citations with apostrophes.
\def\citeay#1{\citeauthor{#1}, \citeyear{#1}} % This creates a command for Author, year.
%\def\citepnob[#1]#2{\citeauthor{#2},(\citeyear{#2},#1)

\renewcommand{\&}{and}

%% This is to have Chapter names split in Title and Subtitle
%%\newcommand{\Chapter}[2]{\chapter[#1]{#1\\[1ex]\huge#2}} 
\newcommand\Chapter[2]{\chapter
  [#1\hfil\hbox{}\protect\linebreak{\itshape#2}]%
  {#1\\[1ex]\huge#2}%
}

\hbadness=10000
\hfuzz=50pt

\makeatletter
\newcommand\resetsubfigs{\setcounter{sub\@captype}{0}}
\makeatother


\newcommand\blankpage{%
\null
\thispagestyle{empty}%
\addtocounter{page}{-1}%
\newpage}
%% to insert a blank page in the text, use: \afterpage{\blankpage}

The two bib files:

% This is myref_chap1.bib

@book{Piketty2001,
Address = {Paris},
Author = {Piketty, Thomas},
Publisher = {Bernard Grasset},
Title = {{Les hauts revenus en France au XXe si\`{e}cle. In\'{e}galit\'{e}s et redistributions 1901--1998}},
Year = {2001}
}


@book{Piketty2014capital,
title={Capital in the 21st Century},
author={Piketty, Thomas},
publisher={Harvard University Press, Cambridge},
year={2014}
}

The second bib file for the second chapter

% This is myref_chap2.bib

@article{YoungVarner2011,
Author = {Young, Cristobal and Varner, Charles},
Journal = {National Tax Journal},
Month = jun,
Number = {2},
Pages = {255--284},
Title = {{Millionaire Migration and State Taxation of Top Incomes: Evidence From a Natural Experiment}},
Volume = {64},
Year = {2011}
}


@article{Tiebout1956,
Author = {Tiebout, Charles M.},
Journal = {Journal of Political Economy},
Number = {5},
Pages = {416--424},
Title = {{A Pure Theory of Local Expenditures}},
Volume = {64},
Year = {1956}
}
Isabel
  • 21
  • Please give a Minimal Working Example (a set of files, including bibliography) and the exact commands you give, and their results (error messages, if any). What you describe is emphatically not what I (and everybody else here) sees in their day to day use of LaTeX and BibTeX, so the conclusion is you are doing something wrong. – vonbrand Feb 03 '16 at 01:40
  • If you write \bibliography{./chapterfolder/chapterbib.bib}, then BibTeX will look for a file called chapterfolder/chapterbib.bib.bib, and I doubt any file you have actually ends with .bib.bib. Better: \bibliography{./chapterfolder/chapterbib}. Better still: don't sneak pathnames into \input and \include commands (though that's not likely the problem here). – jon Feb 03 '16 at 04:33
  • Jon: Thanks for this! However, it is only in this sample code that I have the ending .bib, that mistake sneaked in here, but it is not in the actual file. I have corrected it now. The reason why I need the pathnames is because I keep files belonging to a chapter in a chapter-folder - otherwise I have one folder full of all kind of files. Without the pathnames, when I run the rootfile LaTeX can't find the files (such as, e.g., a chapter appendix). – Isabel Feb 03 '16 at 05:03
  • (Deleted my previous comment about the nesting of \includes. However, the point about the accidental way your \inputs and \includes work still stands.) I think we're going to need to see the .log on this one. – jon Feb 03 '16 at 05:50
  • @vonbrand: Ok, I have created a MWE with the Masterfile, two Chapters, and two .bib-files. I there a way to upload them? – Isabel Feb 04 '16 at 04:21
  • @jon: How can I upload the log file? it's too long to paste here. – Isabel Feb 04 '16 at 19:49
  • @Isabel, you still need to construct the minimal example (or see here). You're getting close, but there is still too much that is not at issue. You will get more help if you put in some effort yourself to isolate the problem. – jon Feb 04 '16 at 20:05
  • @jon: I have made it as minimal as possible without deleting the packages I need in my chapters. I have no idea, what is causing the problem, and it's not that I have not been trying. I basically don't understand why I can't make the command \include generate a bibliography. – Isabel Feb 04 '16 at 22:49
  • @Isabel -- What you say is true of your thesis, but the files you post here must also reproduce the problem or there is no point in posting them.So: (1) if the files posted reproduce the problem, then elminate all the packages from preamble.tex that are unrelated to the problem; or (2) if the files posted here do not reproduce the problem, then you need to revise them so that they do. Otherwise, it often turns out that no one can help you. As as aside, although they are called minimal working examples, this does not indicate that creating the MWE requires only a minimal investment of time. – jon Feb 05 '16 at 02:44

0 Answers0