1

When I try to compile my .bib file, I get the following error message:

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)

What seems to be happening is that two \bibstyle commands are inserted into the .aux file. I looked at the .bib file, and I see no problems with it. What do I need to do to make BiBTeX compile properly?

Below is an example that outlines my preamble:

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

Here is the .bib entry that is causing me trouble:

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

Thanks in advance.

  • This certainly doesn't come from the .bib file. What is your preamble and your document class? – Bernard Jul 3 '17 at 0:39
  • What do you mean by compiling your bib file? You shouldn't compile your bib file at all! – cfr Jul 3 '17 at 1:04
  • Try removing all generated files (especially the .aux) and recompiling if you had an error you've fixed. Otherwise, can you give us a minimal example we can use to reproduce the problem? – cfr Jul 3 '17 at 1:10
  • @cfr, I have a reference that does not appear as cited. Instead of (Jones, Haran, Caffo, & Neath, 2006), which is what I should get, instead I get (!)JonesHCN06, which is the label I used to identify the citation in the .bib file. I thought that using shift+ctrl+b in WinEdt would compile the bibliography, and correct the citation error. – Ethan Arenson Jul 3 '17 at 1:14
  • Then probably the error is there. But you've given no code, so impossible to say. When you run bibtex, do you get errors? – cfr Jul 3 '17 at 1:19
1

I wasn't able to figure out how the second \bibliography statement ended up in the .aux file.

So, instead, I manually typed the citation, and followed it with \nocite{JonesHCN06} to make sure the citation appeared in the bibliography.

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.