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!

  • It's an unharmful information message. – egreg Aug 30 '12 at 17:06
5

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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.