muzimuzhi / thmtools

New home for LaTeX package bundle thmtools
LaTeX Project Public License v1.3c
18 stars 3 forks source link

\listoftheorems: swap thm name and number #5

Closed muzimuzhi closed 4 years ago

muzimuzhi commented 4 years ago

From this TeX-SX question: https://tex.stackexchange.com/q/555412

Currently, \listoftheorems always typeset

\numberline{1} Theorem ... 
\numberline{2} Definition ...
\numberline{3} Definition ...

but user might want

Theorem 1 ...
Definition 2 ...
Definition 3 ...
\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools}

\declaretheorem{theorem}
\declaretheorem[sibling=theorem]{definition}

\begin{document}
\section{Section}
\begin{theorem}[Named Theorem]
\end{theorem}

\begin{definition}[Named Definition]
\end{definition}

\begin{definition}
\end{definition}

\listoftheorems
\end{document}