3

I'm trying to compile a short essay with its bibliography. I'm in AUCTeX under Win 7. This is the route to follow, isn't it?

  1. compile main.tex with pdflatex
  2. launch BibTex on main.tex (this generates main.aux)
  3. compile main.tex with pdflatex twice

I'm getting this error message

This is BibTeX, Version 0.99d (TeX Live 2015/W32TeX) The top-level auxiliary file: main.aux I found no \citation commands---while reading file main.aux I found no \bibdata command---while reading file main.aux I found no \bibstyle command---while reading file main.aux (There were 3 error messages)

TeX Output exited abnormally with code 2 at Sat Sep 24

Here's a MWE. Where am I going wrong?

\documentclass[11pt, a4paper, twoside]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}


\usepackage[margin=2.5cm,]{geometry}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}
\usepackage[useprefix, style=numeric-comp, sorting=nyt, backend=biber, hyperref=true]{biblatex}
\bibliography{articles}

\usepackage{fancyhdr} %with "twoside" \documentclass option!!
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\thepage} % Left if Even, Right if Odd pg
\fancyhead[RE,LO]{Urban Gardens}
\fancyfoot[]{} %
\fancyfoot[]{}


% FONT CHOICE
% Palatino for serif & math, Helvetica for ss, Courier for tt
\usepackage{mathpazo} % math & rm
\linespread{1.50}     % Palatino needs more leading (space between lines)
\usepackage[scaled]{helvet} % ss
\usepackage{courier} % tt
\normalfont

\usepackage{graphicx}
\usepackage{booktabs}
% \usepackage{subcaption} % \begin{subfigure} within 'figure' environment
\usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}
\usepackage[capitalize, italian]{cleveref}
\usepackage{lipsum}
\usepackage{keyval}
\usepackage{subfig}
\usepackage{caption}

\frenchspacing

% \graphicspath{{./img/}}

\title{My Essay}
\author{WW}
\date{}

\begin{document}

\maketitle{}
% \tableofcontents
\lipsum[2]

\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{\bibname}
\nocite{*}
\printbibliography

\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

The bibliography articles.bib has only 2 records. Can you please help me detect errors?

  • 4
    Since you have the directive \usepackage[..., backend=biber,...]{biblatex}, why are you running bibtex? You should be running biber instead. Also, consider changing \bibliography{articles} to \addbibresource{articles.bib}. – Mico Sep 24 '16 at 20:19
  • 1
    Can you please add the bib file to your question? – Kurt Sep 24 '16 at 20:20
  • 1
    As Mico says, if you use biblatex (especially with backend=biber) you need to run Biber and not BibTeX. See Biblatex with Biber: Configuring my editor to avoid undefined citations for help with your editor. – moewe Sep 24 '16 at 21:09
3

You asked,

>This is the route to follow, isn't it?
>    compile main.tex with pdflatex       [this generates main.aux]
>    launch BibTex on main                [this generates main.bbl]
>    compile main.tex with pdflatex twice [this incorporates main.bbl into the pdf file]

This would indeed be the route to follow if your document were using BibTeX. However, since your document uses the biblatex package with the option backend=biber, you should be running biber, not BibTeX. For your document, then, the correct sequence is:

> run pdfLaTeX on main[.tex]
> run biber on main
> run pdfLaTeX on main

Incidentally, you should replace the deprecated instruction \bibliography{articles} with

\addbibresource{articles.bib}

Two comments about the linespread choice: (a) Don't manipulate the low-level TeX parameter \linespread directly. Instead, load the setspace package and issue the directive \setstretch{1.5}. (b) One indeed does encounter the recommendation that leading should be slightly looser with a Palatino font. However, that recommendation is generally for a factor around 1.04 or 1.05, never 1.5! If you absolute must increase the leading, by all means to do. Just don't claim you're doing so because Palatino somehow requires it...

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{articles.bib}
@misc{a:3001,
  author = "Anne Author",
  title  = "Initial Thoughts",
  year   = 3001,
}
@misc{z:3002,
  author = "Zo{\"e} Zwicky",
  title  = "Final Thoughts",
  year   = 3002,
}
\end{filecontents}

\documentclass[11pt, a4paper, twoside]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}


\usepackage[margin=2.5cm]{geometry}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}
\usepackage[useprefix, style=numeric-comp, sorting=nyt, 
            backend=biber, hyperref=true]{biblatex}
\addbibresource{articles.bib}

\usepackage{fancyhdr} %with "twoside" \documentclass option!!
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\thepage} % Left if Even, Right if Odd pg
\fancyhead[RE,LO]{Urban Gardens}
\fancyfoot[]{} %
\fancyfoot[]{}


% FONT CHOICE
% Palatino for serif & math, Helvetica for ss, Courier for tt
\usepackage{mathpazo} % math & rm

%%%\linespread{1.50}     % Palatino needs more leading (space between lines)
% Don't set the low-level parameter "\linespread" directly!
% Instead, load the "setspace" package and state "\setstretch{1.5}"
\usepackage{setspace}
\setstretch{1.5}

\usepackage[scaled]{helvet} % ss
\usepackage{courier} % tt
\normalfont

\usepackage{graphicx}
\usepackage{booktabs}
% \usepackage{subcaption} % \begin{subfigure} within 'figure' environment
\usepackage{lipsum}
\usepackage{keyval}
\usepackage{subfig}
\usepackage{caption}
\usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}
\usepackage[capitalize, italian]{cleveref}

\frenchspacing

% \graphicspath{{./img/}}

\title{My Essay}
\author{WW}
\date{}

\begin{document}

\maketitle{}

\tableofcontents

\bigskip
\hrule
\bigskip

\lipsum[2]

%\clearpage
\phantomsection
\addcontentsline{toc}{section}{\refname}

\nocite{*}
\printbibliography

\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

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.