![\listoftheorems 及其替代方案,tcbtheorems 不显示,](https://linux22.com/image/391297/%5Clistoftheorems%20%E5%8F%8A%E5%85%B6%E6%9B%BF%E4%BB%A3%E6%96%B9%E6%A1%88%EF%BC%8Ctcbtheorems%20%E4%B8%8D%E6%98%BE%E7%A4%BA%EF%BC%8C.png)
我试图在附录中的文档末尾获取定义(定理)列表。不幸的是,列表是空的。我尝试使用此处的描述但它对我不起作用。此处标记为“问题列表”的“Definitionsverzeichnis”应如下所示:我没有发现错误并且我搜索了 4 个小时也没有找到,所以这有点令人沮丧。
在使用 tcbtheorems 之前,我使用过 mdtheorems,获取定理列表毫无问题。但是,现在它不起作用了...
也许有人可以帮助我,因为 tcbtheorems 看起来真的很好,我只是想保留它们。
这是我的 MWE:
\documentclass[ngerman,12pt, listof=totocnumbered, toc=bibliographynumbered,appendixprefix = on]{scrartcl} %scrartcl article}
\usepackage[ngerman]{babel}
% preamble
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage{cleveref}
\usepackage{thmtools}
\usepackage[framemethod=tikz]{mdframed}
% definiton
\tcbset{
defstyle/.style={fonttitle=\bfseries\upshape,fontupper=\slshape,arc=0mm,colback=blue!5!white,colframe=blue!75!black},
theostyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape,colback=red!10!white,colframe=red!75!black},
}
\newtcbtheorem[number within=subsection,crefname={definition}{definitions}, list inside={qst}]{Definition}{defstyle}{def}{qst}
\newtcbtheorem[use counter from=Definition, crefname={theorem}{theorems}, list inside={qst}]{Theorem}{theostyle}{theo}{qst}
\newtcbtheorem[use counter from=Definition,crefname={corollary}{corollaries}]{Corollary}{Corollary}{theostyle}{cor}
\newtcbtheorem[use counter from=Definition]{definition}{Definition}{theorem style=plain,enhanced,colframe=blue!50!black,colback=yellow!20!white,coltitle=red!50!black,fonttitle=\upshape\bfseries,fontupper=\itshape,drop fuzzy shadow=blue!50!black!50!white,boxrule=0.4pt}{theo}
% theorem
\newtheorem{satz}{Satz}
\begin{document}
\section{hello}
\subsection{world}
\section{new section}
\subsection{new subsection for definitons}
% example definition
\begin{definition}{Hello}{labelHEY}%
\newline
a nice definition
\end{definition}
% example theorem
\begin{tcolorbox}[colback=gray!10!white,colframe=red!60!black,sharp corners=all ]
\begin{satz}
this is not a proof, just a theorem
\end{satz}
\end{tcolorbox}
% appendix,
\tcblistof[\section]{qst}{Definitionsverzeichnis}
\end{document}
非常非常感谢您的帮助和时间。
答案1
不要为同一个东西加载很多包。这只会让代码变得非常混乱。坚持只加载一个包,然后检查文档,确保参数正确。
\documentclass[ngerman,12pt, listof=totocnumbered, toc=bibliographynumbered,appendixprefix = on]{scrartcl} %scrartcl article}
\usepackage[ngerman]{babel}
% preamble
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}
\usepackage{cleveref}
% definiton
\tcbset{
defstyle/.style=
{fonttitle=\bfseries\upshape,fontupper=\slshape,arc=0mm,colback=blue!5!white,colframe=blue!75!black},
theostyle/.style=
{fonttitle=\bfseries\upshape, fontupper=\slshape,colback=red!10!white,colframe=red!75!black},
}
\newtcbtheorem[number within=subsection,
crefname={definition}{definitions},
list inside={qst}] %init
{definition} %name
{Definition} %display
{defstyle} %options
{def} %prefix
\newtcbtheorem[use counter from=definition, crefname={theorem}{theorems},
list inside={qst}]
{theorem}
{Theorem}
{theostyle}
{theo}
\begin{document}
\section{hello}
\subsection{world}
\section{new section}
\subsection{new subsection for definitons}
% example definition
\begin{definition}{Hello Definition}{labelHEY}%
a nice definition
\end{definition}
\begin{theorem}{Hello Theorem}{labelHEY}%
a nice theorem
\end{theorem}
\tcblistof[\section]{qst}{Definitionsverzeichnis}
\end{document}