编译未修改的 Legrand Orange Book 模板时出错

编译未修改的 Legrand Orange Book 模板时出错

我刚刚从以下网址下载了 Legrand Orange Book 模板:

http://www.latextemplates.com/template/the-legrand-orange-book

我还没有修改它。但是,当我尝试编译它时,我收到以下错误:

! Undefined control sequence.
<argument> ...docsvlist \expandafter {\bbl@loaded 
                                                  }\ifboolexpr { not test {\...
l.51 \begin{document}

    The control sequence at the end of the top line
    of your error message was never \def'ed. If you have
    misspelled it (e.g., `\hobx'), type `I' and the correct
    spelling (e.g., `I\hbox'). Otherwise just continue,
    and I'll forget about whatever was undefined.

我搜索了类似的问题,但只发现有关编译同一模板的修改版本时出错的帖子,而未修改的版本运行良好(所以我希望这不会被视为重复)

在 Legrand Orange Book 模板上使用修改后的 structure.tex 时出错

据我所知,未定义的 \begin{document} 错误通常与包有关。我没有包含 MWE,因为我没有修改模板,它立即给我这个错误。但我会列出它使用的包(存在于 structure.tex 中):

    %----------------------------------------------------------------------------------------
    %   VARIOUS REQUIRED PACKAGES AND CONFIGURATIONS
    %----------------------------------------------------------------------------------------

    \usepackage[top=3cm,bottom=3cm,left=3cm,right=3cm,headsep=10pt,a4paper]{geometry} % Page margins

    \usepackage{graphicx} % Required for including pictures
    \graphicspath{{Pictures/}} % Specifies the directory where pictures are stored

    \usepackage{lipsum} % Inserts dummy text

    \usepackage{tikz} % Required for drawing custom shapes

    \usepackage[english]{babel} % English language/hyphenation

    \usepackage{enumitem} % Customize lists
    \setlist{nolistsep} % Reduce spacing between bullet points and numbered lists

    \usepackage{booktabs} % Required for nicer horizontal rules in tables

    \usepackage{xcolor} % Required for specifying colors by name
    \definecolor{ocre}{RGB}{243,102,25} % Define the orange color used for highlighting throughout the book

    %----------------------------------------------------------------------------------------
    %   FONTS
    %----------------------------------------------------------------------------------------

    \usepackage{avant} % Use the Avantgarde font for headings
    %\usepackage{times} % Use the Times font for headings
    \usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Sym­bol, Chancery and Com­puter Modern fonts

    \usepackage{microtype} % Slightly tweak font spacing for aesthetics
    \usepackage[utf8]{inputenc} % Required for including letters with accents
    \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs

    %----------------------------------------------------------------------------------------
    %   BIBLIOGRAPHY AND INDEX
    %----------------------------------------------------------------------------------------

    \usepackage[style=alphabetic,citestyle=numeric,sorting=nyt,sortcites=true,autopunct=true,babel=hyphen,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}
    \addbibresource{bibliography.bib} % BibTeX bibliography file
    \defbibheading{bibempty}{}

    \usepackage{calc} % For simpler calculation - used for spacing the index letter headings correctly
    \usepackage{makeidx} % Required to make an index
    \makeindex % Tells LaTeX to create the files required for indexing

    %----------------------------------------------------------------------------------------
    %   MAIN TABLE OF CONTENTS
    %----------------------------------------------------------------------------------------

    \usepackage{titletoc} % Required for manipulating the table of contents
%----------------------------------------------------------------------------------------
%   PAGE HEADERS
%----------------------------------------------------------------------------------------

\usepackage{fancyhdr} % Required for header and footer configuration

\pagestyle{fancy}
%----------------------------------------------------------------------------------------
%   THEOREM STYLES
%----------------------------------------------------------------------------------------

\usepackage{amsmath,amsfonts,amssymb,amsthm} % For math equations, theorems, symbols, etc

%----------------------------------------------------------------------------------------
%   DEFINITION OF COLORED BOXES
%----------------------------------------------------------------------------------------

\RequirePackage[framemethod=default]{mdframed} % Required for creating the theorem, definition, exercise and corollary boxes

%----------------------------------------------------------------------------------------
%   HYPERLINKS IN THE DOCUMENTS
%----------------------------------------------------------------------------------------

\usepackage{hyperref}
\hypersetup{hidelinks,backref=true,pagebackref=true,hyperindex=true,colorlinks=false,breaklinks=true,urlcolor= ocre,bookmarks=true,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}}
\usepackage{bookmark}

structure.tex 文件包含许多其他代码和命令,但这些只是使用的包。

我的 MiKTeX 是最近安装的(2 周前),并且我最近同步了我的包数据库并刷新了 FNDB。

编辑1:

这些是/listfiles 的结果:

*File List*
    book.cls    2007/10/19 v1.4h Standard LaTeX document class
   fleqn.clo    1998/08/17 v1.1c Standard LaTeX option (flush left equations)
    bk11.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
structure.tex
geometry.sty    2010/09/12 v5.6 Page Geometry
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
  ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
geometry.cfg
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
    tikz.sty    2015/08/07 v3.0.1a (rcs-revision 1.151)
     pgf.sty    2015/08/07 v3.0.1a (rcs-revision 1.15)
  pgfrcs.sty    2015/08/07 v3.0.1a (rcs-revision 1.31)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v3.0.1a (rcs-revision 1.7)
  pgfsys.sty    2014/07/09 v3.0.1a (rcs-revision 1.48)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v3.0.1a (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.1a (rcs-revision 1.1)
  pgffor.sty    2013/12/13 v3.0.1a (rcs-revision 1.25)
 pgfkeys.sty    
 pgfkeys.code.tex
 pgfmath.sty    
 pgfmath.code.tex
  pgffor.code.tex
    tikz.code.tex
   babel.sty    2008/07/08 v3.8m The Babel package
 bblopts.cfg    2006/07/31 v1.0 MiKTeX 'babel' configuration
 english.ldf    2005/03/30 v3.3o English support from the babel system
enumitem.sty    2011/09/28 v3.5.2 Customized lists
booktabs.sty    2005/04/14 v1.61803 publication quality tables
   avant.sty    2005/04/12 PSNFSS-v9.2a (SPQR) 
mathptmx.sty    2005/04/12 PSNFSS-v9.2a Times w/ Math, improved (SPQR, WaS) 
microtype.sty    2013/05/23 v2.5a Micro-typographical refinements (RS)
microtype-pdftex.def    2013/05/23 v2.5a Definitions specific to pdftex (RS)
microtype.cfg    2013/05/23 v2.5a microtype main configuration file (RS)
inputenc.sty    2008/03/30 v1.1d Input encoding file
    utf8.def    2008/04/05 v1.1m UTF-8 support for inputenc
   t1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  ot1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  omsenc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
biblatex.sty    2015/12/22 v3.2 programmable bibliographies (PK/JW/AB)
biblatex2.sty    2015/12/22 v3.2 programmable bibliographies (biber) (PK/JW/AB)

etoolbox.sty    2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (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    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
     url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.
  blx-dm.def
alphabetic.dbx
biblatex-dm.cfg
blx-compat.def    2015/12/22 v3.2 biblatex compatibility (PK/JW/AB)
biblatex.def    
standard.bbx    2015/12/22 v3.2 biblatex bibliography style (PK/JW/AB)
alphabetic.bbx    2015/12/22 v3.2 biblatex bibliography style (PK/JW/AB)
 numeric.cbx    2015/12/22 v3.2 biblatex citation style (PK/JW/AB)
biblatex.cfg    
    calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
 makeidx.sty    2000/03/29 v1.0m Standard LaTeX package
titletoc.sty    2011/12/15 v1.6 TOC entries
fancyhdr.sty    
 amsmath.sty    2013/01/14 v2.14 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
amsfonts.sty    2013/01/14 v3.01 Basic AMSFonts support
 amssymb.sty    2013/01/14 v3.01 AMS font symbols
  amsthm.sty    2004/08/06 v2.20
mdframed.sty    2013/07/01 1.9b: mdframed
  xparse.sty    2016/01/19 v6377 L3 Experimental document command parser
   expl3.sty    2016/01/19 v6377 L3 programming layer (loader) 
expl3-code.tex    2016/01/19 v6377 L3 programming layer 
l3pdfmode.def    2015/11/11 v6250 L3 Experimental driver: PDF mode
zref-abspage.sty    2012/04/04 v2.24 Module abspage for zref (HO)
zref-base.sty    2012/04/04 v2.24 Module base for zref (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)
 auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)
atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)
needspace.sty    2010/09/12 v1.3d reserve vertical space
md-frame-0.mdf    2013/07/01\ 1.9b: md-frame-0
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)
 intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (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)
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)
  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)
bookmark.sty    2011/12/02 v1.24 PDF bookmarks (HO)
bkm-pdftex.def    2011/12/02 v1.24 bookmark driver for pdfTeX (HO)
 english.lbx    2015/12/22 v3.2 biblatex localization (PK/JW/AB)
   t1ptm.fd    2001/06/04 font definitions for T1/ptm.
supp-pdf.mkii
  mt-ptm.cfg    2006/04/20 v1.7 microtype config. file: Times (RS)
    main.bbl
 nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)
background.png    Graphic file (type png)
   t1pag.fd    2001/06/04 font definitions for T1/pag.
ot1ztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OT1/ztmcm.
omlztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OML/ztmcm.
omsztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OMS/ztmcm.
omxztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OMX/ztmcm.
  ot1ptm.fd    2001/06/04 font definitions for OT1/ptm.
  mt-msa.cfg    2006/02/04 v1.1 microtype config. file: AMS symbols (a) (RS)
  mt-msb.cfg    2005/06/01 v1.0 microtype config. file: AMS symbols (b) (RS)
  omsptm.fd    
  t1cmtt.fd    1999/05/25 v2.5h Standard LaTeX font definitions
Pictures/chapter_head_1.pdf
Pictures/chapter_head_2.pdf
Pictures/chapter_head_2.pdf
Pictures/chapter_head_1.pdf
Pictures/placeholder.jpg
Pictures/chapter_head_1.pdf
    main.ind
Pictures/chapter_head_1.pdf
 ***********

答案1

作为克里斯蒂安·胡普弗建议,这是我的 MiKTeX 发行版过时的问题,如 所示\listfiles。我的发行版无法同步,我必须重新安装它才能工作。重新安装后,模板完美运行。

相关内容