为什么 hyperref/hpdftex.def v6.81u 会导致我出现错误?

为什么 hyperref/hpdftex.def v6.81u 会导致我出现错误?

背景信息:我正在使用 TeXlive 2010(在 ArchLinux x86_64 上,虽然是通过 TUG/CTAN 安装的,而不是从 Arch repos 安装的)。我每天都用 tlmgr 更新我的系统。直到今天一切都很好,也许与最近的更新有关,特别是 hyperref 包的 v6.81u(以及文件 hpdftex.def)。现在,即使是这个简单的文档:

  \documentclass{article}
  \usepackage{hyperref}
  \begin{document}
  Hello world.
  \end{document}

引发以下错误:

  (/usr/local/texlive/2010/texmf-dist/tex/latex/hyperref/hpdftex.def
  File: hpdftex.def 2010/11/22 v6.81u Hyperref driver for pdfTeX
  /usr/local/texlive/2010/texmf-dist/tex/latex/hyperref/hpdftex.def:35: Undefined
   control sequence.
  \pdf@ifdraftmode ->\ifnum \pdf@draftmode 
                                           =\ltx@one \expandafter \ltx@firstof...
  l.35 \pdf@ifdraftmode
                       {%
  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.

有其他人遇到过这个问题吗?是软件包版本不兼容吗?如果我在代码开头添加 \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)
  hyperref.sty    2010/11/22 v6.81u Hypertext links for LaTeX
   ltxcmds.sty    2010/04/26 v1.7 LaTeX kernel commands for general use (HO)
     ifpdf.sty    2010/01/28 v2.1 Provides the ifpdf switch (HO)
  pdftexcmds.sty    2010/04/01 v0.9 Utility functions of pdfTeX for LuaTeX (HO)
  infwarerr.sty    2010/04/08 v1.3 Providing info/warning/message (HO)
  ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
    keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
  kvsetkeys.sty    2010/03/01 v1.9 Key value parser (HO)
  etexcmds.sty    2010/01/28 v1.3 Prefix for e-TeX command names (HO)
  pdfescape.sty    2010/03/01 v1.9 Provides hex, PDF name and string conversions 
  (HO)
    ifvtex.sty    2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)
   ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
   hycolor.sty    2009/12/12 v1.6 Color options of hyperref/bookmark (HO)
  xcolor-patch.sty    2009/12/12 xcolor patch
  letltxmacro.sty    2008/06/24 v1.3 Let assignment for LaTeX macros (HO)
  kvoptions.sty    2010/02/22 v3.7 Keyval support for LaTeX options (HO)
    pd1enc.def    2010/11/22 v6.81u Hyperref: PDFDocEncoding definition (HO)
   intcalc.sty    2007/09/27 v1.1 Expandable integer calculations (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.
    bitset.sty    2007/09/28 v1.0 Data type bit set (HO)
  bigintcalc.sty    2007/11/11 v1.1 Expandable big integer calculations (HO)
  atbegshi.sty    2010/03/25 v1.12 At begin shipout hook (HO)
   hpdftex.def    2010/11/22 v6.81u Hyperref driver for pdfTeX
  atveryend.sty    2010/03/24 v1.5 Hooks at very end of document (HO)
  rerunfilecheck.sty    2010/03/16 v1.6 Rerun checks for auxiliary files (HO)
  uniquecounter.sty    2009/12/18 v1.1 Provides unlimited unique counter (HO)
   nameref.sty    2010/04/30 v2.40 Cross-referencing by name of section
  refcount.sty    2008/08/11 v3.1 Data extraction from references (HO)
  gettitlestring.sty    2009/12/18 v1.3 Cleanup title references (HO)
   scratch.out
   scratch.out
   ***********

如果有人认为有帮助的话我很乐意上传完整的日志。

答案1

抱歉给您敲响警钟,但我刚刚再次升级,问题似乎已在版本 v6.81v 中得到解决。不过,明智的做法是:小心 v6.81u。

再具体一点:

hyperref.sty 2010/11/26 v6.81v Hypertext links for LaTeX

hpdftex.def 2010/11/26 v6.81v Hyperref driver for pdfTeX

运行良好,但 2010/11/22 的 v6.81u 却不行(至少对我来说)。

相关内容