2

I've been having this problem for quite some time now but can't figure it out and it's driving me crazy. I'm new to latex and can't find any already answered question that can help me sort it out, so here it goes:

I'm writing my thesis and am using an already defined thesis class (`Thesis.cls', based on 'ECSthesis.cls', by Steve R. Gunn, from latextemplates.com if it's any help).

Now it all works well but it uses natbib to manage the bibliography and I wanted to try out biblatex, so I commented the part of the template where it imports the natbib package and added the lines to setup biblatex. It looks like this:

Setup for natbib:

\documentclass[12pt, a4paper, twoside, openright]{Thesis} % Paper size, default font size and one-sided paper
\graphicspath{{Pictures/}} % Specifies the directory where pictures are stored

\usepackage[comma, authoryear]{natbib} % Use the natbib reference package - read up on this to edit the reference style; if you want text (e.g. Smith et al., 2012) for the in-text references (instead of numbers), remove 'numbers' \usepackage[comma,authoryear]{natbib}
%\usepackage[utf8]{inputenc}%espaniol (it's already declared in Thesis.cls)

\hypersetup{urlcolor=black, colorlinks=false, citecolor=black, linkcolor=black, pdfborder={0 0 0}} % Colors hyperlinks in blue - change to black if annoying
\title{\ttitle} % Defines the thesis title - don't touch this

\begin{document}

Which I changed to:

\documentclass[12pt, a4paper, twoside, openright]{Thesis} % Paper size, default font size and one-sided paper
\graphicspath{{Pictures/}} % Specifies the directory where pictures are stored

%%%%%% SETUP BIBLIOGRAPHY
\usepackage[spanish,english]{babel}
\usepackage[autostyle]{csquotes}
\usepackage[backend=biber,style=alphabetic,sorting=ynt]{biblatex}
\addbibresource{Bibliography.bib}

\hypersetup{urlcolor=black, colorlinks=false, citecolor=black, linkcolor=black, pdfborder={0 0 0}} % Colors hyperlinks in blue - change to black if annoying
\title{\ttitle} % Defines the thesis title - don't touch this

\begin{document}

Now after these changes the project compiles and the pdf looks alright, bibliography and cites work perfectly, but I get the Undefined control sequence error at

\begin{document}

The error only comes up after I add the following line:

\usepackage[backend=biber,style=alphabetic,sorting=ynt]{biblatex}

So I'm guessing that there may be some kind of incompatibility between what is already defined in Thesis.cls and the biblatex package, but can't find anything (or just don't recognize it when I see it).

Is there anything that I'm doing wrong or do you have any idea of what I should be looking at?

Any help is greatly appreciated!

closed as unclear what you're asking by moewe, Stefan Pinnow, Claudio Fiandrino, Zarko, Andrew Swann Jul 7 '16 at 7:24

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Welcome to TEX.SE! A few more details would be helpful here, first of all: what is the undefined control sequence? Furthermore, there have been a few changes in biblatex , so you may need an up-to-date version. – campa Jun 9 '16 at 13:47
  • Can you copy and paste the exact error message from the .log file? Before you do so, just to be sure, delete the temporary files (.bbl, .bcf, .aux) and try to compile from scratch. If that does not help, please try to provide a proper MWE. Please also provide a link to the exact Thesis.cls you use, it seems to me like every other file on that template website calls itself a thesis class. – moewe Jun 9 '16 at 14:01
  • I just downloaded a template that could be yours from latextemplates.com/template/masters-doctoral-thesis. That template uses biblatex explicitly and does not mention anything about natbib. Maybe you have a really old version of the template? – moewe Jun 9 '16 at 14:08
  • Thanks for the responses @moewe and @campa! While preparing the MWE I zeroed into the root of the problem and it happened to have something to do with the babel package and not biblatex as I first thought. Anyways, I was using babel because I was using csquotes and I don't know why I was using csquotes in the first place so I got rid of both and the error message is gone. If you are still interested in seeing what was the actual problem, the MWE is: \documentclass{article} \usepackage[english]{babel} \usepackage{biblatex} \begin{document} \end{document} It's probably just a dumb mistake. – agustin Jun 9 '16 at 17:44
  • You should be able to run both babel andcsquotes with biblatex (in fact it is recommended to do so, definitely if you happen to write non-English texts, but even if you write only in English, csquotes is really nice to have). You may have to make sure that their versions match though, that can be done by updating all packages via your distribution. (tlmgr with TeX live and the Update Manager - in both Admin and User mode - for MikTeX.) – moewe Jun 9 '16 at 17:47

Browse other questions tagged or ask your own question.