![newtheorem을 처음 사용한 경우 북마크 수준을 알 수 없습니다.](https://rvso.com/image/254722/newtheorem%EC%9D%84%20%EC%B2%98%EC%9D%8C%20%EC%82%AC%EC%9A%A9%ED%95%9C%20%EA%B2%BD%EC%9A%B0%20%EB%B6%81%EB%A7%88%ED%81%AC%20%EC%88%98%EC%A4%80%EC%9D%84%20%EC%95%8C%20%EC%88%98%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
아래 MWE는 로그에 다음 메시지를 생성합니다.
패키지 하이퍼참조 정보: 입력 라인 12에서 알 수 없는 thm에 대한 북마크 수준의 기본값은 0입니다.
어떻게 하면 이를 방지할 수 있나요?
\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}
두 번째 정리에 대해서는 메시지가 표시되지 않습니다. 그래서 초기화와 관련이 있다고 생각합니다 ...
추신: 태그가 부적절하다고 생각하시는 분은 theorems
언제든지 삭제해 주세요!
답변1
%% <---
해결 방법: 다음 코드 샘플에서 표시된 줄을 추가합니다 .
\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}