
처음에는 정리 환경을 정의하고 싶습니다.번호 없이, 그래서 다음 코드를 시도했습니다.
\LoadClass[a4paper]{article}
\RequirePackage{amsmath,amssymb,amsthm}
\RequirePackage{thmtools}
\declaretheoremstyle[]{testbox}
\declaretheorem[style=testbox,name=Theorem]{theo}
\renewcommand{\thetheo}{} %Cancelling the number
\begin{document}
\begin{theo}
Content.
\end{theo}
\end{document}
잘 작동한다. 그런 다음 그것을 확장하려고했습니다.
\LoadClass[a4paper]{article}
\RequirePackage{amsmath,amssymb,amsthm}
\RequirePackage{thmtools}
\declaretheoremstyle[]{testbox}
\newcommand{\newtestbox}[2]{
\declaretheorem[style=testbox,name=#1]{#2}
\renewcommand{\the#2}{} %Error
}
\newtestbox{Theorem}{theo}
\begin{document}
\begin{theo}
Content.
\end{theo}
\end{document}
\the#2
그러나 이제는 그것이 잘못된 형식의 반격으로 인식되는 것 같습니다 . 어떻게 하면 제대로 사용할 수 있나요? 이야기가 너무 길었다면 죄송합니다.
답변1
사용하십시오 numbered=no
(thmtools 매뉴얼의 3페이지).
\documentclass{article}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{thmtools}
\declaretheoremstyle[]{testbox}
\declaretheorem[
style=testbox,
numbered=no,
name=Theorem,
]{theo}
\begin{document}
\begin{theo}
Content.
\end{theo}
\end{document}
numbered=no
없이 얻는 (잘못된) 출력과 비교하십시오 \renewcommand{\thetheo}{}
.
답변2
당신은 말할 수 있습니다 :
\LoadClass[a4paper]{article}
\RequirePackage{amsmath,amssymb,amsthm}
\RequirePackage{thmtools}
\declaretheoremstyle[]{testbox}
\newcommand{\newtestbox}[2]{
\declaretheorem[style=testbox,name=#1]{#2}
\expandafter\renewcommand\csname the#2\endcsname{} %Error
}
\newtestbox{Theorem}{theo}
\begin{document}
\begin{theo}
Content.
\end{theo}
\end{document}