这个问题我已经困扰我好久了,但一直没法解决,这让我很抓狂。我刚接触 latex,找不到任何已经回答过的问题可以帮助我解决这个问题,所以这里是:
我正在撰写论文,并使用已定义的论文类(“Thesis.cls”,基于 Steve R. Gunn 的“ECSthesis.cls”,来自 latextemplates.com,如果有帮助的话)。
现在一切运行正常,但它使用 natbib 来管理参考书目,我想尝试一下 biblatex,所以我注释了模板中导入 natbib 包的部分,并添加了设置 biblatex 的行。它看起来像这样:
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}
我将其改为:
\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}
现在,经过这些更改后,项目可以编译,pdf 看起来没问题,参考书目和引用工作正常,但我得到了未定义的控制序列错误
\begin{document}
仅当我添加以下行后才会出现错误:
\usepackage[backend=biber,style=alphabetic,sorting=ynt]{biblatex}
所以我猜测 Thesis.cls 和 biblatex 包中已经定义的内容之间可能存在某种不兼容性,但找不到任何东西(或者只是看到它时无法识别它)。
我做错了什么吗?或者您知道我应该关注什么吗?
任何帮助是极大的赞赏!