I am new to this community, and unfamiliar with advanced latex use (e.g. creating packages, custom build scripts, post-processing scripts) so I apologize if my question seems unusual or overly simple.

How may all theorems, definitions, corollaries, etc. be restated elsewhere in the document? The following figure illustrates this goal.

Illustration of restating all theorems, definitions, etc. elsewhere in the document

I believe that my question differs from the vanilla usage of the \listoftheorems command (thmtools package) to generate a content page tying theorems, definitions, etc. to the page they're situated on.

Minimum Working Example (MWE)

I have made available a MWE in Overleaf: https://www.overleaf.com/read/vtjwpszsrnnz

This link will take you to Overleaf and provide you the means to edit the source, as well as compile directly in your browser.

There are no restrictions on the types of packages preferred, but it might be nice if discussions could consider more commonly used packages (e.g., thmtools, ams___ series).

Should you prefer editing or compiling the MWE outside of Overleaf's cloud, you may use the following LateX source code which is identical to that contained in the Overleaf link.

\usepackage{amsmath, amsthm, amssymb}

% Define the theorem environments
\newtheorem{theorem}{Theorem}[section] % Theorems are numbered within sections
\newtheorem{lemma}[theorem]{Lemma}     % Lemmas share numbering with theorems

% Create a list of theorems, lemmas, corollaries, and definitions

% Blindtext:
\newcommand{\loremipsum}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin.}



    A sequence refers to a $\mathbb{R}$ function $f$ defined on the set of natural numbers $\mathbb{N}$ where $f(n) = x_n \forall n \in \mathbb{N}$.  It is customary to denote the sequence by the symbol ${x_n}$ 


\begin{theorem}[Bolzano-Weierstrass Theorem]
    A bounded sequence $(x_n)$ in $\mathbb{R}^k$ (or $\mathbb{C}^k$) has a subsequence $(x_{n_k})$ that converges to some limit $L$ in $\mathbb{R}^k$ (or $\mathbb{C}^k$).


\begin{corollary}[Squeeze Theorem]
    Let $f$, $g$, $h$ be functions from $A \subseteq \mathbb{R}$ to $\mathbb{R}$ and let $c$ be a limit point of $A$. If
    $$f(x) \leq g(x) \leq h(x)$$
    for all $x \in A$ and
    $$\lim_{x \rightarrow c} f(x) = L = \lim_{x \rightarrow c} h(x) $$
    $$\lim_{x \rightarrow c} g(x) = L$$

\section{More Stuff}

\begin{proposition}[Continuity limit laws]
    Let $f : A \rightarrow \mathbb{R}$ and $g : A \rightarrow \mathbb{R}$ be continuous at $c \in A$. Then,
    (i) $k \cdot f(x)$ is continuous at $c$, $\forall k \in \mathbb{R}$;
    (ii) $f(x) + g(x)$ is continuous at $c$;
    (iii) $f(x) \cdot g(x)$ is continuous at $c$;


\begin{theorem}[Continuous image of a compact set is compact]
Suppose $f : A \rightarrow \mathbb{R}$ is continuous. If $A \subseteq \mathbb{R}$ is compact, then $f(A)$ is compact.


\begin{theorem}[Arzela-Ascoli Theorem]
If $(f_k)$ is uniformly bounded and equicontinuous on $A$, then $(f_k)$ contains a uniformly convergent subsequence.


\section{List of Results}

Need help for this.

% List of theorems, lemmas, corollaries, and definitions
% \listoftheorems[ignoreall,show={thm,lem,cor,defn}]

  • 1
    Well, you should not wait. Please post a MWE. Sep 1 at 12:46
  • 1
    Hi José, thank you for the reminder. I have updated this question with a MWE :)
    – davidleejy
    Sep 1 at 15:44
  • The code in this answer should do what you want
    – mbert
    Sep 1 at 20:52
  • 1
    Hi @mbert, not a problem, thanks for responding and sharing the script on stackexchange. And yes, I understand that it can take quite some effort to work a script into compatibility with some package. I'm a stranger to the Expl3 language and was wondering if it'd be not too much of a hassle to ask what the script does? Does it add a hook to the creation of the "theorem" environment so that whenever a theorem environment is instantiated, the contents within are also stored in a variable, and then when \printtheorems is called, this variable is consulted, the elements traversed and printed?
    – davidleejy
    Sep 3 at 7:35
  • 1
    You'll likely get a better answer by commenting on egreg's answer
    – mbert
    Sep 3 at 17:34

1 Answer 1


Here is a naive attempt. We define \declaretheoremx which does \declaretheorem but also defines a new environment saved<thmname> which is just a wrapper for the restatable environment that stores its contents in the csname thm-<savedthmcount>. If you don't use this environment, the theorem will not be printed in the list of theorems at the end, which is called with \printsavedtheorems.



    \section*{List of Saved Theorems}
    \foreach \NUM in {1,...,\thesavedthmcount}{\UseName{thm-\NUM}*}%










Note the \edef trick is necessary as otherwise all the restated theorems point to the last called theorem (see my question about this).

Obviously the title of \printsavedtheorems can be customized to be a chapter, add to the TOC, etc.

By the way, the extra space added by the restatable environments is a thmtools bug; see this github issue. A temporary fix is provided there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .