I've found out how to use the thmtools package to make lists of theorems. My questions on this are:

  1. How do I change the title, given that \renewcommand{\listoftheoremname}{...} gives a LaTeX error: \listoftheoremname undefined error?
  2. How do I make multiple lists of different kinds of theorems with different titles?
  3. Adding [name=xxx,label=thm:...] after \begin{yyy} (xxx is a title for the theorem, ... a label appearing in the list, yyy the theorem kind) labels a theorem. If I try to put any maths beyond superscript and subscript (for now I've only tried \mathbb) into a label, I get a missing \endcsname inserted error related to a line of the .aux files. How do I solve that? MWE:

    \begin{defi}[name=$\mathbb R$,label=thm:$\mathbb R$definizione]  
    Ah beh, s\`i beh.  

which gives:
Error message in TeXShop Console.
The same error is obtained by placing a \ref in a label. In fact, \mathbb gives problems anywhere in those [], just like trying to put $(0,1)$ there, because of that comma.

  1. (should be 4) And finally, I'm using theorems with [subsection] numbering. Now, in the list, the number overlaps the theorem kind (i.e. I get overlapping Definizione (Spazio Metrico)). How do I solve that?
  • 1
    For the first point try this solution: tex.stackexchange.com/a/52896/31058 . The name of the variable is \listtheoremname and not \listoftheoremname. – Ludovic C. Dec 27 '13 at 10:39
  • 1
    Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – egreg Dec 27 '13 at 10:41
  • Then there is an issue with latex-community.org/forum/viewtopic.php?f=19&t=17679, since there it says \listoftheoremname. The other link's way it works. – MickG Dec 27 '13 at 11:08
  • 1
    If an answer to a forum is wrong, there's little one can do, except reporting the error in the forum. Since the package documentation mentions \listtheoremname, do you trust a forum better? – egreg Dec 27 '13 at 11:14

This could get you started; but without a clear set of specifications from you it's difficult to be more precise.




\renewcommand{\listtheoremname}{List of theorems}

\renewcommand{\listtheoremname}{List of definitions}


\begin{definition}[Nice numbers]
A number is \emph{nice} if it looks beautiful.

\begin{theorem}[About $C^{1}(0,1)$]
The set $C^{1}(0,1)$ is interesting.


enter image description here

  • This perfectly solves the first two points. I had no idea one could use \renewcommand inside the document, I thought it was confined to the preamble. Thanks @egreg. Just one questions: why use the package amsthm? And why \declaretheorem and not \newtheorem? Is there any difference? – MickG Dec 27 '13 at 11:21
  • @MickG I always use amsthm because of the predefined theorem styles. As you're loading thmtools, why not using its interface, that is, \declaretheorem? – egreg Dec 27 '13 at 11:22
  • You also can define new commands in your preamble, such as \newcommand{\listofdefinitions}{\renewcommand{\listtheoremname}{List of definitions}\listoftheorems[ignoreall,show=definition]}, in order to have a slighly more readable source file. – Bernard Dec 27 '13 at 11:40
  • I'll answer myself on points 3-4: 3) It seems the shorthands generate problems even here, as every time something must be transfered to a file different from tex and aux (toc, loe, whatever). Maybe it's my TeX distribution that's out of date and presents bugs that produce this effect. Anyway removing the shorthands has solved the problem (apparently, at least). 4) The list shows the name, not the label. – MickG Dec 27 '13 at 15:44
  • OK just kidding: \mathbb still gives problems. – MickG Dec 27 '13 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.