
我正在使用 SIAM Latex 模板,並且我想創建一個類似 thm 的環境,該環境與所有其他類似 tho 的環境(預設都是同級環境)具有不同的編號。
我無法弄清楚如何將 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}
其輸出如下