答案1
我找到了我的问题的答案:
\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools}
\declaretheorem[]{definition}
% to reformat the (Name) to ''Name''
\renewcommand\thmtformatoptarg[1]{ ''#1''}
% to swap number with "Definition"
\makeatletter
\def\ll@definition{%
\thmt@thmname~
\protect\numberline{\csname the\thmt@envname\endcsname}%
\ifx\@empty
\thmt@shortoptarg
\else
\protect\thmtformatoptarg{\thmt@shortoptarg}
\fi
}
\makeatother
\begin{document}
\listoftheorems
\begin{definition}[Name]
bla
\end{definition}
\end{document}
所以我得到了:
为了缩小 1 和“名称”之间的间距,我添加了
\makeatletter
\renewcommand*{\numberline}[1]{\hb@xt@1em{#1}}
\makeatother
也许有更好的方法,我很想知道!
最后我想改变定义样式以匹配定义列表:
\declaretheoremstyle[
headfont=\bfseries,
headpunct={:},
notefont=\bfseries\itshape,
notebraces={''}{''},
%headformat=\NAME~\NUMBER \NOTE,
]{definition}
\declaretheorem[style=definition]{definition}
结果如下: