使用 \include{filename} 时引用未定义

使用 \include{filename} 时引用未定义

我正在编写我的论文,其中有一个根文件,每个章节都用 \include{chapterfolder/chaptername} 读入。一切正常,但参考文献都是未定义的。但是当我运行 BibTex 时,该过程顺利完成,没有错误(“过程正常退出”)。

我尝试将所有内容(即 chaptername.tex 和 chapterbibfile.bib)放在与根文件相同的文件夹中而不是子文件夹中,但结果是一样的。

奇怪的是,我有一个用于研究提案的旧版本,其中引用有效(恰好 2 年前)。我在 MacBook Pro 上使用 TeXLive-2015。

非常感谢您的帮助,谢谢。

这是我的根文件:

    \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\\
        [email protected]\\
        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}

我的第一章如下所示:

% 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}

第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}

序言:

% 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}

两个 bib 文件:

% 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}
}

第二章的第二个 bib 文件

% 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}
}

相关内容