LaTeX 额外 } 问题

LaTeX 额外 } 问题

我正在尝试编译使用 BibLaTeX 和 Biber 后端的文档,但我的文档最后一行不断出现这些错误:

! Argument of \hyper@anchorstart has an extra }.<inserted text>\par \end
! Paragraph ended before \hyper@anchorstart was complete.<to be read again>\par \end

这是出现错误的文档(减去内容):

\documentclass[12pt,a4paper,draft]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

% ----------------------------------------------
% Bibliography
% ----------------------------------------------
\usepackage[autostyle]{csquotes}
\usepackage[
backend=biber,
hyperref=true,
style=numeric
]{biblatex}
\addbibresource{final_thesis.bib}

\usepackage{hyperref}
\hypersetup{colorlinks=true}

% ----------------------------------------------
% Document
% ----------------------------------------------
\begin{document}
Content \cite{arduinounorev3}
\newpage
\printbibliography
\end{document}

和final_thesis.bib:

@online{arduinounorev3,
author = {Arduino},
title  = {Arduino uno},
year   = {2014},
url    = {http://arduino.cc/en/Main/arduinoBoardUno},
urldate = {2014-12-01}
}

现在,当我再次运行 LaTeX、BibTeX 和 LaTeX 时,它会产生上述错误。

我正在使用 BibLaTeX 2.9a 版本和 Biber 1.9,根据 BibLaTeX 手册,它们应该兼容。

编辑:我开始认为这实际上是一个 LaTeX 问题

答案1

您给出的错误信息Argument of \hyper@anchorstart has an extra }让我猜测,您在一个特殊的 bib 文件条目上遇到了问题,因为您给出的代码和 bib 文件在我当前的 MikTeX 2.9 系统上编译时没有任何错误或警告。

您谈到了“错误”。那么您遇到了更多错误吗?是给定的 MWE 错误还是您的代码错误?首先,我们必须确保我们讨论的是相同的代码。

因此,请将以下 MWE 复制到您的计算机中并进行编译,运行 biber 并编译两次。结果是?(对我来说:没有错误,除了 之外没有警告filecontents,这没问题)。我添加了包babel并使用包filecontents将 bib 文件包含到这个 MWE 中。

梅威瑟:

\listfiles
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@online{arduinounorev3,
  author  = {Arduino},
  title   = {Arduino uno},
  year    = {2014},
  url     = {http://arduino.cc/en/Main/arduinoBoardUno},
  urldate = {2014-12-01},
}
\end{filecontents*}


\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
%\usepackage{amsmath}
%\usepackage{amsfonts}
%\usepackage{amssymb}

\usepackage[autostyle]{csquotes}
\usepackage[
  backend=biber,
  hyperref=true,
  style=numeric
]{biblatex}
\addbibresource{\jobname.bib}

\usepackage{hyperref}
\hypersetup{colorlinks=true}


\begin{document}
Content \cite{arduinounorev3}
\nocite{*}
\newpage
\printbibliography
\end{document}

在您的系统上,此 MWE 也应该可以顺利编译。如果没有,则您的安装存在问题。如果是,我猜您的 bib 文件中还有更多条目?那么其中一个条目高于给定的导致问题。逐个添加到 MWEs bib 文件中并再次编译。请检查 biber 运行的日志。文件中有错误消息blg?是吗?更正它们。没有。那么我们需要更多信息...

我的列表文件结果是:

 *File List*
filecontents.sty    2011/10/08 v1.3 Create an external file from within a LaTeX document
  report.cls    2014/09/29 v1.4h Standard LaTeX document class
  size12.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
inputenc.sty    2014/04/30 v1.2b Input encoding file
    utf8.def    2014/09/29 v1.1m UTF-8 support for inputenc
   t1enc.dfu    2014/09/29 v1.1m UTF-8 support for inputenc
  ot1enc.dfu    2014/09/29 v1.1m UTF-8 support for inputenc
  omsenc.dfu    2014/09/29 v1.1m UTF-8 support for inputenc
   babel.sty    2014/09/25 3.9l The Babel package
 bblopts.cfg    2006/07/31 v1.0 MiKTeX 'babel' configuration
 spanish.ldf
csquotes.sty    2011/10/22 v5.1d context-sensitive quotations
etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
csquotes.def    2011/10/22 v5.1d csquotes generic definitions
csquotes.cfg    
biblatex.sty    2014/06/25 v2.9a programmable bibliographies (PK/JW/AB)
biblatex2.sty    2014/06/25 v2.9a programmable bibliographies (biber) (PK/JW/AB)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
  logreq.sty    2010/08/04 v1.0 xml request logger
  logreq.def    2010/08/04 v1.0 logreq spec v1.0
  ifthen.sty    2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
     url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.
  blx-dm.def
 numeric.dbx
biblatex-dm.cfg
blx-compat.def    2014/06/25 v2.9a biblatex compatibility (PK/JW/AB)
biblatex.def    
standard.bbx    2014/06/25 v2.9a biblatex bibliography style (PK/JW/AB)
 numeric.bbx    2014/06/25 v2.9a biblatex bibliography style (PK/JW/AB)
 numeric.cbx    2014/06/25 v2.9a biblatex citation style (PK/JW/AB)
biblatex.cfg    
hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX
hobsub-hyperref.sty    2012/04/25 v1.12 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2012/04/25 v1.12 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2012/04/25 v1.12 Construct package bundles (HO)
  ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)
  bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
 hopatch.sty    2011/06/24 v1.1 Wrapper for package hooks (HO)
xcolor-patch.sty    2011/01/30 xcolor patch
atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)
atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)
refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)
 hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)
  pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
 hpdftex.def    2012/11/06 v6.83m Hyperref driver for pdfTeX
rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
 spanish.lbx    2014/06/25 v2.9a biblatex localization (PK/JW/AB)
user3287849.bbl
   color.sty    2014/10/28 v1.1a Standard LaTeX Color (DPC)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
supp-pdf.mkii
 nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)
user3287849.out
user3287849.out

相关内容