1

I'm having some slight issues with citation styles. I want Harvard style citations, in the form of (Bethe, 1939). Here is my code:

\documentclass[11pt,a4paper]{article}
%\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}

\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{comment}
%\usepackage{natbib}
\usepackage{amsmath}
\usepackage[
backend=bibtex,
style=authoryear,
sorting=nty
]{biblatex}
\usepackage{float}
%\usepackage{cite}

\bibliography{biblio} \addbibresource{biblio.bib}
%\bibliographystyle{alpha}
\begin{document}  

Document here \cite{EPS}

\end{document}

Sorry for the clutter. Experimented a lot trying to get the bibliography to work. Here is my bibliography:

http://www.filedropper.com/biblio

Using the citestyle definition in the preamble, this should display Harvard style, if the manual is to believed. Instead I get the title of the paper. Perhaps it has to do with the warnings given? Here:

https://i.stack.imgur.com/m3ApM.png

PTNobel
  • 356
  • 1
  • 14
Joshua
  • 43
  • 1
  • 3
  • Try removing the \bibliography{biblio}. (but leave the \addbibresource...) Right now the .bib is being loaded twice, which will only cause problems. Plust \bibliography is deprecated in biblatex – PTNobel Dec 02 '15 at 02:26
  • Yes, my preamble is disgusting, and yes, it's some sort of frankenstein's monster esque mess from other template codes. I did try using Biber, but I managed to get it to (sort of) work using bibtex. I didn't report on this, but Biber throws up all sorts of errors ('undefined control sequences') if I try to compile, including a lot of errors from other seemingly arbitrary places. For example, line 19:
    1. \usepackage{titlesec}
    2. \setcounter{secnumdepth}{4}

    Doesn't like that. That for example is used to make a subsubsubsection. But there's nothing on line 19.

    – Joshua Dec 02 '15 at 05:32
  • It is asking me to rerun Biber on my file, though this isn't a compiling option in Tex. I've found biber as an external exe, but I'm not sure how to use it. Other undefined control sequences include '\vspace{1.5cm}' (error thrown up twice), '\vspace{2cm}' (for spacing out images on the title page), '\tableofcontents' (thrown up twice), an empty line after \newpage, after \tableofcontents, and finally another empty line after that.

    I'm also getting all of the old warnings about the biblipgraphy being empty.

    – Joshua Dec 02 '15 at 05:39
  • 2
    Hi again. Found this: http://tex.stackexchange.com/questions/154751/biblatex-with-biber-configuring-my-editor-to-avoid-undefined-citations/154788#154788

    Is this what I'm missing?

    – Joshua Dec 02 '15 at 06:00
  • Biber won't give the errors you describe. It is used on the .bcf file, not the .tex file. The sequence is: latex myfile.tex, biber myfile.bcf, latex myfile.tex (where latex could be pdflatex). Biber should also be installed by default by now (even on Windows, I'd imagine). How your editor calls Biber is a different question. But your comment suggests the real problem: a preamble you don't understand. Fix that above all. *TeX is not supposed to be a black box of mystery like (MS) Word. – jon Dec 02 '15 at 06:01
  • Yes, probably. Though note that you can also run latex, biber, and indeed bibtex from the command prompt / command line. – jon Dec 02 '15 at 06:02
  • 1
    https://www.youtube.com/watch?v=xos2MnVxe-c

    It's alive! Finally working. I couldn't understand how to set up Biber, as it doesn't come installed with Texmaker. Thank you two for all the support you've given over the past few days. I really appreciate it!

    – Joshua Dec 02 '15 at 16:58
  • Is your problem solved? If so would you consider Biblatex with Biber: Configuring my editor to avoid undefined citations an appropriate duplicate of your question here? – moewe Dec 11 '15 at 06:42

0 Answers0