6

The MWE below produces the following message in the log:

Package hyperref Info: bookmark level for unknown thm defaults to 0 on input line 12

How can I prevent this?

\documentclass{article}

\usepackage{amsmath}
\usepackage[amsmath,hyperref]{ntheorem}

\newtheorem{thm}{Theorem}

\usepackage{hyperref}

\begin{document}
  \begin{thm}
    $1+1=2$
  \end{thm}

  \begin{thm}
    $1-1=0$
  \end{thm}
\end{document}

Note that the message does not appear for the second theorem. So I suppose it has something to do with intialisation ...

PS: If anyone thinks the theorems tag is inappropriate, feel free to delete it!

1
  • It's an unharmful information message.
    – egreg
    Commented Aug 30, 2012 at 17:06

1 Answer 1

6

Solution: Add the lines marked by %% <--- in the following code sample:

\documentclass{article}

\usepackage{amsmath}
\usepackage[amsmath,hyperref]{ntheorem}

\newtheorem{thm}{Theorem}

\makeatletter                           %% <---
\providecommand*{\toclevel@thm}{0}%     %% <---
\makeatother                            %% <---

\usepackage{hyperref}

\begin{document}
  \begin{thm}
    $1+1=2$
  \end{thm}

  \begin{thm}
    $1-1=0$
  \end{thm}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .