当我尝试编译我的 .bib 文件时,收到以下错误消息:
This is BibTeX, Version 0.99d (TeX Live 2016/W32TeX)
The top-level auxiliary file: DissertationProposal_07-02-17.aux
The style file: apacite.bst
Illegal, another \bibstyle command---line 273 of file DissertationProposal_07-02-17.aux
: \bibstyle
: {apacite}
I'm skipping whatever remains of this command
Illegal, another \bibdata command---line 274 of file DissertationProposal_07-02-17.aux
: \bibdata
: {Dissertation}
I'm skipping whatever remains of this command
Database file #1: Dissertation.bib
apacite.bst [2013/07/21 v6.03 APA bibliography style]
Warning--`others' not consistent with 6th ed. of the APA Manual
(There were 2 error messages)
似乎发生的情况是两个 \bibstyle 命令插入到了 .aux 文件中。我查看了 .bib 文件,发现它没有任何问题。我需要做什么才能使 BiBTeX 正确编译?
下面是一个概括我的序言的例子:
\documentclass[12pt]{report}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{geometry}
\usepackage{apacite}
\usepackage{apalike}
\usepackage{sectsty}
\usepackage{bm}
\usepackage{setspace}
\usepackage[titletoc]{appendix}
\geometry{left=1in,right=1in,top=1in,bottom=1in}
\allsectionsfont{\normalsize}
\renewcommand{\baselinestretch}{2}
\numberwithin{equation}{chapter}
\begin{document}
I will use a simplification of the batch means stopping rule for MCMC suggested by \cite{JonesHCN06}. While Jones, et al. allow both the number of batches and the batch size to increase with each MCMC iteration, for computational simplicty, I will base the batch size on the square root of the maximum number of iterations, $s_\text{max}$:
$$ n_\text{batch}=\text{floor}\left(\sqrt{s_\text{max}}\right).$$
I will store the mean of every $n_\text{batch}$ iterations in a vector
$$\textbf{b} = \left(\bar{Y}_1, \bar{Y}_2, \dots, \bar{Y}_{b_\text{max}}\right),$$
where $b_\text{max}$ is the maximum number of batches, and is given by
$$b_\text{max} = \text{floor}\left(\frac{s_\text{max}}{n_\text{batch}}\right) + 1.$$
\bibliographystyle{apacite}
\bibliography{Dissertation}
\end{document}
以下是.bib
给我带来麻烦的条目:
@article{JonesHCN06,
title={Fixed-width output analysis for {M}arkov chain {M}onte {C}arlo},
author={Jones, Galin L and Haran, Murali and Caffo, Brian S and Neath, Ronald},
journal={Journal of the American Statistical Association},
volume={101},
number={476},
pages={1537--1547},
year={2006},
publisher={Taylor \& Francis}
}
提前致谢。
答案1
我无法弄清楚第二条\bibliography
语句是如何出现在.aux
文件中的。
因此,我手动输入了引用,然后\nocite{JonesHCN06}
确保引用出现在参考书目中。