我正在使用克兰茨写一本书,我在hyperref
使用包时遇到了错误。这是一个最小的例子(test.tex
):
\documentclass{krantz}
\usepackage{hyperref}
\begin{document}
\chapter{Introduction}
\end{document}
当我用它编译它时pdflatex test.tex
,出现此错误:
Runaway argument?
{Introduction}]{[}{Introduction}]{Introduction} \end {document}
! File ended while scanning use of \Hy@org@chapter.
<inserted text>
\par
<*> test.tex
如果没有hyperref
,编译会成功。如果有人能告诉我为什么会发生这种情况以及如何修复它,我将不胜感激。
$ pdflatex --version
pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
kpathsea version 6.1.0
Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.2.49; using libpng 1.2.49
Compiled with zlib 1.2.7; using zlib 1.2.7
Compiled with poppler version 0.20.4
$ head `kpsewhich hyperref.sty` -n 34 | tail -n 4
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{hyperref}
[2012/05/13 v6.82q %
Hypertext links for LaTeX]
更新
我联系了这门 LaTeX 课程的作者,问题已经解决。请参阅更正后的克兰茨。