amsthm 与 hyperref 发生冲突

amsthm 与 hyperref 发生冲突

下面的程序显示了hyperref和的问题amsthm。对我来说这不是什么问题,因为我根本不使用 ,amsthm所以我把它扔掉了,但我仍然花了很长时间才弄清楚。顺便说一句,在办公室我没有遇到这个问题。我使用 TeXworks 和 pdfLaTeX,并将所有相关软件包更新到最新版本。希望这些信息足以解决问题。

\documentclass{article}
\usepackage{amsthm}
\usepackage{hyperref}
\begin{document}
hi
\end{document}

这会导致错误:

This is pdfTeX, Version 3.1415926-1.40.11 (MiKTeX 2.9)

....  irrelevant output deleted   ....

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")
(C:\Users\Rob\AppData\Roaming\MiKTeX\2.9\tex\latex\url\url.sty)
! Undefined control sequence.
<argument> ...}}[]}\fi \@tempa }\fi \dth@everypar 
                                                  ={\@minipagefalse \global ...
l.7379 }{}

答案1

在开头添加\listfiles并比较版本。我没有收到任何错误。

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
  amsthm.sty    2004/08/06 v2.20
hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX
hobsub-hyperref.sty    2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2012/05/28 v1.13 Construct package bundles (HO)
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)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (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)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (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    2012/05/28 v1.2 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)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
  pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.
 hpdftex.def    2012/11/06 v6.83m Hyperref driver for pdfTeX
rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
 nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)
    test.out
    test.out
 ***********

还要检查软件包的路径。错误消息之前的路径看起来像是 MiKTeX 的系统和用户安装的混淆。

相关内容