/dev/tty

„Słudzy nieużyteczni jesteśmy; wykonaliśmy to, co powinniśmy wykonać” (Łk 17,10)

I recently found quite unpleasant fact, that when I use the book document class in LaTeX, define theorems using amsthm package and number them within chapters, hyperref fails to make right links for them. The problem occurs, because when hyperref makes an anchor for a theorem, the result is definition.5, where dfn is the counter name, and 5 is the counter's value. But the same counter's value occurs in subsequent chapters, as the counter is reset when new chapter begins.

I don't know why and where exactly, but there must be something wrong in hyperref package with the definition of \theHdefinition (where definition should be replaced with the appropriate counter name). The following code in the preamble do the trick:

\newcommand{\theHdefinition}{\theHchapter.\arabic{definition}}



edit post

1 Reply to "Hyperref, theorems and numbering by chapter"

Anonimowy on 22 maja 2009 07:01

:*