
저는 SIAM Latex 템플릿을 사용하고 있으며 다른 모든 유사 환경(기본적으로 모두 형제임)과 구별되는 번호가 부여된 thm 유사 환경을 만들고 싶었습니다.
나는 내 정의에 따라 그를 형제자매로 "제거"하는 방법을 알 수 없으며 공식 문서에서 이를 수행하는 방법에 대한 설명을 찾을 수 없습니다.시암 가이드.
구체적으로, 나는 내가 원하는 동작을 얻기 위해 이 코드 블록을 수정하고 싶습니다. 누군가 이 수정에 도움을 줄 수 있다면 감사하겠습니다.
\newsiamthm{puzzle}{Puzzle}
\renewcommand*\thepuzzle{\Roman{puzzle}
답변1
명령은 \newsiamthm
다음과 같이 정의됩니다.
\newcommand{\newsiamthm}[2]{
\theoremstyle{plain}
\theoremheaderfont{\normalfont\sc}
\theorembodyfont{\normalfont\itshape}
\theoremseparator{.}
\theoremsymbol{}
\newtheorem{#1}[theorem]{#2}
}
이는 이 명령으로 정의된 환경과 같은 모든 정리에는 자체 카운터가 없으며, theorem
(또는 더 정확하게는 \c@theorem
) 카운터를 사용한다는 의미입니다.
퍼즐 환경에 대해 동일한 형식을 원하지만 독립적인 카운터를 사용하려면 다음과 같이 고유한 매크로를 생성하세요.
\newcommand{\newindthm}[2]{
\theoremstyle{plain}
\theoremheaderfont{\normalfont\sc}
\theorembodyfont{\normalfont\itshape}
\theoremseparator{.}
\theoremsymbol{}
\newtheorem{#1}{#2}
}
이제 로 사용할 수 있습니다 \newindthm{puzzle}{Puzzle}
.
여기에 예가 있습니다.
\documentclass{siamart220329}
\newcommand{\newindthm}[2]{
\theoremstyle{plain}
\theoremheaderfont{\normalfont\sc}
\theorembodyfont{\normalfont\itshape}
\theoremseparator{.}
\theoremsymbol{}
\newtheorem{#1}{#2}
}
\newindthm{puzzle}{Puzzle}
\begin{document}
\begin{theorem}
Test
\end{theorem}
\begin{puzzle}
Test
\end{puzzle}
\end{document}
다음과 같은 출력이 있습니다.