0

I am getting an error of the type "can be used only in preamble", and I am also having an error with the bibliography. Maybe both errors are related. My .TEX file is as follows:

\documentclass[12pt,a4paper]{article}

\usepackage[backend=biber]{biblatex}
\usepackage[english]{babel}  

\title{LaTex error: can be used only in preamble}  
\author{John Doe} 

\begin{document} 
\maketitle

\section{Introduction} 
\label{sec:intro}

The problem of constructing reliable circuits was first stated by John von
Neumann in 1952, but it is fair to say that the topic became a field of 
research from 1956 onwards, with the work of  E.F. Moore and C.E. Shannon \cite{MooreShannon56}.  

% \section*{References}
% \nocite{*} 
% \bibliographystyle{plain} 
\bibliography{Biblio1} 

\end{document}

and my .BIB file only contains the following entry:

@article{MooreShannon56,
author = "E.F. Moore and C.E. Shannon",
title = "Reliable circuits using less reliable relays",
journal = "Journal of the Franklin Institute",
volume = "262",
number = "3",
pages = "191 - 208",
year = "1956", 
issn = "0016-0032",
doi = "http://dx.doi.org/10.1016/0016-0032(56)90559-2",
url = "http://www.sciencedirect.com/science/article/pii/0016003256905592" 
}

Besides the aforementioned error, the list of references is not shown. I am using MikTeX in combination with TeXnicCenter.

moewe
  • 175,683

1 Answers1

1
\documentclass[12pt,a4paper]{article}

\usepackage[backend=biber,style=numeric]{biblatex}
% numeric is about equal to Bibtex's plain
\usepackage[english]{babel}  

\addbibresource{Biblio1.bib}
% This command can be used repeatedly to combine your bibliography from as many files you want
...
\begin{document} 
...
\printbibliography % Prints the bibliography
\end{document}

I highly suggest you read the docs or some of the tutorials on Biblatex.

clocktown
  • 316
  • Thank you very much, but unfortunately, it only solves one of my problems. I no longer get the 'preamble' error, but the references are still not printed. I ran biber independently, and it gives me one error: "Found biblatex control file version 1.7, expected 3.1". I suppose I will have to update biblatex. – Manolito Pérez May 26 '17 at 10:36
  • Well, I replaced biber by bibtex in the biblatex options, and now it works. Thank you very much, once again. – Manolito Pérez May 26 '17 at 10:43
  • I'm using TeX Live on Windows. And that's what I used on Ubuntu as well. Such a problem never occured - and should not, IMO. If you have no specific reason for using MiKTeX, I suggest you switch to TeX Live. – clocktown May 26 '17 at 10:47
  • Glad it works now, though I suggest you try to fix the Biber issue. Biber is a huge improvement over bibtex. – clocktown May 26 '17 at 10:50
  • OK, thank you for your suggestions. I will do as you say. In fact, the Biber version was recent one. The problem was with biblatex, but in any case I will update everything, for future emergencies. – Manolito Pérez May 26 '17 at 15:05