Here is a more minimal AND working example, using biber
not bibtex
Note that biber
complains about the format of the date, so you'll need to look that up in the biblatex
manual.
You probably mean urldate
not date
, and then the syntax is YYYY-MM-DD
, so
urldate = {2016-04-11},
in this case.
\documentclass[a4paper, 12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[style=authoryear]{biblatex}
\usepackage{csquotes}
\usepackage{filecontents}
\begin{filecontents*}{rapport.bib}
@online{cim-wiki,
author = {Wikipedia},
title = {Common Information Model (electricity)},
urldate = {2016-04-11},
url = {https://en.wikipedia.org/wiki/Common_Information_Model_(electricity)},
}
\end{filecontents*}
\bibliography{rapport}
\begin{document}
\chapter{Bibliographie}
\cite{cim-wiki}
\printbibliography
\end{document}
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...
\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:
Best Answer
There are a couple of things here:
You are using
bibtex
instead of what it seems you want to use,biblatex
. For this, you first need to change the path to the executable file. I cannot tell you how to do this because I do not know what type of editor you are using, but for example, if using TeXnicCenter it's just a matter of changing this on the profile settings.If you actually want to use
bibtex
(which I personally prefer... but many folks around here just lovebiblatex
) you need to:2.1 Instead of
\usepackage[style=chicago-authordate]{biblatex}
change it for\usepackage{natbib}
2.2 You need to create a
.bib
file which contains the bibliography entries.2.3 In order to not get the warnings, you actually need to
\cite
any of the authors of your.bib
file (thus eliminating the problem of not finding\citation
commands) , and of course this file should not be empty (thus eliminating the problem of not finding\bibdata
and finally you have to set a\bibliographystyle
, that since you are using thenatbib
package mentioned at the beginning, you'll get the options to choose the style you want.2.3.1 As it seems the style you need is Chicago, this could be implemented by
\bibliographystyle{chicagoa}
Now, if you want to use
biblatex
it is usually recommended to go along withbiber
. This could be a good starting point: Setting up biber as a default biblatex backend in the configuration file