6

I'm using the krantz.cls to write a book, and I ran into an error with the hyperref package. Here is a minimal example (test.tex):

\documentclass{krantz}
\usepackage{hyperref}
\begin{document}
\chapter{Introduction}
\end{document}

When I compile it with pdflatex test.tex, I get this error:

Runaway argument?
{Introduction}]{[}{Introduction}]{Introduction} \end {document} 
! File ended while scanning use of \Hy@org@chapter.
<inserted text> 
                \par 
<*> test.tex

Without hyperref, it compiles fine. I appreciate if anyone can tell me why this happens and how to fix it.

$ 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]

Update

I contacted the author of this LaTeX class and the problem was solved. See the corrected krantz.cls.

3
  • Seems to be an error in the class; contact the author. Commented Dec 8, 2012 at 13:37
  • Despite the class' claim - this is not a standard LaTeX class. In particular its internal command \@chapter used for chapters has a non-standard argument format, which hyperref therefore does not recognise. Commented Dec 8, 2012 at 18:08
  • @AndrewSwann Thanks a lot! That \@chapter is exactly what I want to know; at least I know the direction to fix it now.
    – Yihui Xie
    Commented Dec 8, 2012 at 18:11

0

Browse other questions tagged .