我使用“mathtools package to define my theorem styles and
cleveref”来重新枚举它。但这个包确实执行了我的旧代码
\makeatletter
\AtBeginEnvironment{remark}{%
\patchcmd\@thm{\trivlist}{\list{}{\leftmargin\parindent\rightmargin
\parindent}}{}{}
\patchcmd\thmt@original@endremark{\endtrivlist}{\endlist}{}{}
}
无用。
有没有办法让定理“注释”的正文缩进?这是我的mwe
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm,thmtools}
\usepackage{lipsum}
\usepackage{cleveref}
\declaretheoremstyle[%
spaceabove=\topsep,
spacebelow=\topsep,
headfont=\small\itshape,
bodyfont=\normalfont\small,
headpunct={.---},
postheadspace=1em,
headformat=\NAME\space\NUMBER,
headindent=\parindent
% qed=$\blacktriangleleft$
]{remark}
\declaretheorem[style=remark]{remark}
\begin{document}
\begin{remark}
\lipsum[1}
\end{remark}
\end{document}
答案1
修补后cleveref
应该有所不同,因为它重新定义了\@thm
。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm,thmtools}
\usepackage{translator}
\usepackage{etoolbox}
\usepackage{cleveref}
\usepackage{lipsum}
\declaretheoremstyle[
spaceabove=\topsep,
spacebelow=\topsep,
headfont=\small\itshape,
bodyfont=\normalfont\small,
headpunct={.---},
postheadspace=1em,
headformat=\NAME\space\NUMBER,
%headindent=\parindent,
%qed=$\blacktriangleleft$,
]{remark}
\declaretheorem[style=remark,name=\translate{Remark}]{remark}
\makeatletter
\preto\remark{%
\patchcmd\cref@thmnoarg
{\trivlist}
{\list{}{\leftmargin\parindent\rightmargin\parindent}}
{}{}%
\patchcmd\cref@thmoptarg
{\trivlist}
{\list{}{\leftmargin\parindent\rightmargin\parindent}}
{}{}%
\patchcmd\thmt@original@endremark{\endtrivlist}{\endlist}{}{}%
}
\makeatother
\begin{document}
\lipsum[3]
\begin{remark}
\lipsum*[4]
\end{remark}
\lipsum[5]
\end{document}