summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-09-12 21:50:25 +0000
committerKarl Berry <karl@freefriends.org>2024-09-12 21:50:25 +0000
commit3c662f5f96a2800694995c8974031765059e5657 (patch)
treeb60ec1dce6ce257a9b4ca113aaddb65a41098e77 /Master/texmf-dist/doc
parenta6464ab447f5da29c2ef1b54d57ad1750c7b2a4a (diff)
keytheorems (12sep24)
git-svn-id: svn://tug.org/texlive/trunk@72266 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/latex/keytheorems/README.md615
-rw-r--r--Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdfbin0 -> 523379 bytes
-rw-r--r--Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex929
3 files changed, 1544 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/keytheorems/README.md b/Master/texmf-dist/doc/latex/keytheorems/README.md
new file mode 100644
index 00000000000..205c7aab8b5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/keytheorems/README.md
@@ -0,0 +1,615 @@
+# keytheorems
+
+A LaTeX package to use [`amsthm`](https://www.ctan.org/pkg/amsthm)
+with a key-value interface. Meant to emulate most of the functionality of
+[`thmtools`](https://www.ctan.org/pkg/thmtools) but written in expl3. If you
+find a bug please open an issue or pull request.
+
+## Sample document
+```tex
+\documentclass{article}
+\usepackage{amssymb,amsmath}
+\usepackage{keytheorems}
+\usepackage{hyperref}
+
+\newkeytheoremstyle{mystyle}{
+ % <insert options>
+ }
+\newkeytheorem{theorem}[
+ style=mystyle,
+ parent=section
+ ]
+\newkeytheorem{remark}[
+ style=remark,
+ numbered=no
+ ]
+
+\begin{document}
+
+\section{Some theorems}
+
+\begin{theorem}[
+ note=Strong Bertini over $\mathbb{C}$,
+ label=strongbertini
+ ]
+Let $X$ be a smooth complex variety and let $\mathfrak{D}$ be a positive
+dimensional linear system on $X$. Then the general element of $\mathfrak{D}$ is
+smooth away from the base locus $B_{\mathfrak{D}}$. That is, the set
+ \[\{H\in\mathfrak{D}\mid D_H \text{ is smooth away from } B_{\mathfrak{D}}\}\]
+is a Zariski dense open subset of $\mathfrak{D}$.
+\end{theorem}
+
+\begin{remark}
+In fact, \autoref{strongbertini} holds over any algebraically closed field of
+characteristic zero.
+\end{remark}
+
+\begin{theorem}[Bertini over any field]
+Let $X\subset\mathbb{P}_k^n$ be a smooth projective variety over a field $k$.
+Then the set of hyperplanes $H\subseteq\mathbb{P}_k^n$ such that $X\cap H$ is
+smooth is a Zariski dense open subset of $(\mathbb{P}_k^n)^*$.
+\end{theorem}
+
+\listofkeytheorems
+
+%%% compare with
+%\listofkeytheorems[ignoreall,show=theorem]
+%\listofkeytheorems[swapnumber]
+%\listofkeytheorems[title=BLUB]
+%\listofkeytheorems[print-body] % needs 'store-all' package option
+
+\end{document}
+```
+
+## Documentation
+There is a list of commands and keys offered by the package
+[here](https://github.com/mbertucci47/keytheorems/blob/main/doc/keytheorems-doc.pdf).
+More of a reference document than documentation.
+
+## Differences with thmtools
+
+Some of the code is a direct translation from thmtools but a few things are changed:
+- The only backend supported is amsthm, and it is loaded by the package. As I understand it,
+ [`ntheorem`](https://www.ctan.org/pkg/ntheorem) has quite a few bugs and no active development, and
+ if you're just using the kernel `\newtheorem` then you don't need a package like this.
+- Theorem hooks use the kernel hooks. Thus unlike the `prefoot` and `postfoot` hooks of
+ thmtools, all code chunks are added to hooks in the order declared (unless given a
+ distinct label; then the chunks are reversed). The order of generic/specific hooks
+ remains the same. Furthermore, the command for adding to theorem hooks is `\addtotheoremhook{<hook name>}{<theorem name>}`.
+- thmtools changes some style settings to be default that are different from
+ amsthm defaults, but only if a custom style is called. Example:
+ ```tex
+ \declaretheoremstyle[spaceabove=20pt]{mythmsty}
+ \declaretheorem[style=mythmsty]{mythm}
+ ```
+
+ is different from just
+
+ ```tex
+ \declaretheorem{mythm}
+ ```
+
+ as in the former, `bodyfont` is `\normalfont`, not the default `\itshape`.
+ This package keeps the defaults unless a key is specifically given.
+- There is no `restatable` environment except with package option `thmtools-compat`. Use the
+ `store` (alias `restate`) key.
+- Rather than `restate=foo` defining a command `\foo*`, theorems are retrieved with `\getkeytheorem{foo}`.
+ For just the theorem body, use `\getkeytheorem[body]{foo}`. Also, this retrieval
+ can happen even before the theorem is stated since keytheorems writes the contents
+ to a file.
+- The `shaded` and `thmbox` keys are only available with the package option `thmtools-compat`,
+ and they are emulated with [`tcolorbox`](https://www.ctan.org/pkg/tcolorbox). Instead there's
+ an interface to tcolorbox with the `tcolorbox={<options>}` and `tcolorbox-no-titlebar={<options>}` key.
+ The `mdframed` key is not implemented.
+- You can reuse styles with the `inherit-style` key.
+- With thmtools, the command `\newtheorem{<envname>}{<heading>}` is changed to behave like
+ `\declaretheorem[name=<heading>]{<envname>}`. This is not the default here. Instead either
+ only use the new interface or load the package with option `overload`.
+- All new keys (see doc for descriptions):
+ - global (load-time or in `\keytheoremset`): `overload`, `thmtools-compat`, `store-all`, `restate-counters`, `continues-code`, `qed-symbol`, `auto-translate`
+ - keys for theorem envs: `note` (alias `name`), `short-note`, `continues*`, `store` (alias `restate`), `seq`
+ - declaring theorems (in `\newkeytheorem`): `tcolorbox`, `tcolorbox-no-titlebar`
+ - declaring styles (in `\newkeytheoremstyle`): `inherit-style`
+ - list of theorems (in `\keytheoremlistset` and `\listofkeytheorems`): `onlynumbered`, `seq`, `title-code`, `no-title`, `note-code`, `print-body`, `no-continues`, `no-chapter-skip`, `chapter-skip-length`
+
+## thmtools issues resolved by keytheorems
+Issues from the thmtools [github page](https://github.com/muzimuzhi/thmtools),
+with corresponding keytheorems code that shows the issue resolved.
+### [\listoftheorems: filter out restated ones #7](https://github.com/muzimuzhi/thmtools/issues/7)
+keytheorems does not list restated theorems in the `\listofkeytheorems`.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}[store=foo]
+text
+\end{theorem}
+
+\getkeytheorem{foo}
+
+\listofkeytheorems
+
+\end{document}
+```
+
+### [\listoftheorems: hide title #8](https://github.com/muzimuzhi/thmtools/issues/8)
+keytheorems provides the `no-title` key.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{axiom}
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\listofkeytheorems[ignoreall,show=axiom]
+\listofkeytheorems[ignoreall,show=theorem,no-title]
+
+\begin{axiom}
+some axiom
+\end{axiom}
+
+\begin{theorem}
+some theorem
+\end{theorem}
+
+\begin{axiom}
+another axiom
+\end{axiom}
+
+\begin{theorem}
+another theorem
+\end{theorem}
+
+\end{document}
+```
+
+### [Case in point: the tcolorbox key #9](https://github.com/muzimuzhi/thmtools/issues/9)
+keytheorems provides the `tcolorbox` and `tcolorbox-no-titlebar` keys.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{theorem}[
+ tcolorbox={
+ colback=blue!10,
+ colframe=blue!75
+ }
+ ]
+\newkeytheorem{corollary}[
+ tcolorbox-no-titlebar={colback=red!10}
+ ]
+
+\begin{document}
+
+\begin{theorem}
+some theorem
+\end{theorem}
+
+\begin{corollary}
+some corollary
+\end{corollary}
+
+\end{document}
+```
+
+### [thm-listof: document \thmtformatoptarg, new list option? #14](https://github.com/muzimuzhi/thmtools/issues/14)
+keytheorems provides the `note-code` key for `\listofkeytheorems` and
+`\keytheoremlistset`.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}[my heading]
+some theorem
+\end{theorem}
+
+\listofkeytheorems[note-code={ [\textit{#1}]}]
+
+\end{document}
+```
+
+### [Style inheritance in thmtools #15](https://github.com/muzimuzhi/thmtools/issues/15)
+keytheorems provides the `inherit-style` key.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheoremstyle{mysty1}{notefont=\itshape}
+\newkeytheoremstyle{mysty2}{inherit-style=mysty1,bodyfont=\normalfont}
+\newkeytheorem{theorem}[style=mysty1]
+\newkeytheorem{corollary}[style=mysty2]
+
+\begin{document}
+
+\begin{theorem}[my heading]
+some theorem
+\end{theorem}
+
+\begin{corollary}[my heading]
+some corollary
+\end{corollary}
+
+\end{document}
+```
+
+### [Restate without theorem headings (head + note) #19](https://github.com/muzimuzhi/thmtools/issues/19)
+Use `\getkeytheorem[body]{foo}`.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}[store=hello]
+Hello!
+\end{theorem}
+
+\getkeytheorem{hello}
+
+\section{\getkeytheorem[body]{hello}}
+
+\end{document}
+```
+
+### [Option clash: numbered=no and thmbox #25](https://github.com/muzimuzhi/thmtools/issues/25)
+Fixed with keytheorem's implementation of the `thmbox` key with `thmtools-compat`.
+```tex
+\documentclass{article}
+\usepackage[thmtools-compat]{keytheorems}
+
+\declaretheorem[numbered=no, name=TheoremA, ]{mytheo1}
+\declaretheorem[ name=TheoremB, thmbox=M]{mytheo2}
+\declaretheorem[numbered=no, name=TheoremC, thmbox=M]{mytheo3}
+
+\begin{document}
+
+\begin{mytheo1}
+ test1
+\end{mytheo1}
+
+\begin{mytheo2}
+ test2
+\end{mytheo2}
+
+\begin{mytheo3}
+ test3
+\end{mytheo3}
+
+\end{document}
+```
+
+### [Skip the title of the theorem but leave the []. #30](https://github.com/muzimuzhi/thmtools/issues/30)
+Fixed in keytheorems.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{Teorema}[name=Theorem]
+
+\begin{document}
+
+\begin{Teorema}
+ body
+\end{Teorema}
+
+\begin{Teorema}[]
+ body
+\end{Teorema}
+
+\begin{Teorema}[title]
+ body
+\end{Teorema}
+
+\end{document}
+```
+
+### [too much space with restatable #40](https://github.com/muzimuzhi/thmtools/issues/40)
+Fixed in keytheorems.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+\usepackage{kantlipsum}
+
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}
+\kant[2][1]
+\end{theorem}
+
+\begin{theorem}[store=foo]
+\kant[1][2]
+\end{theorem}
+
+\begin{theorem}
+\kant[2][1]
+\end{theorem}
+
+\getkeytheorem{foo}
+
+\end{document}
+```
+
+### [restate key with no name leads to (,) in restated title #41](https://github.com/muzimuzhi/thmtools/issues/41)
+Fixed in keytheorems.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+\usepackage{kantlipsum}
+
+\newkeytheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}[restate=foo]
+\kant[1][2]
+\end{theorem}
+
+\getkeytheorem{foo}
+
+\begin{theorem}[restate=foobar,name=Heading]
+\kant[2][1]
+\end{theorem}
+
+\getkeytheorem{foobar}
+
+\end{document}
+```
+### [[Help Wanted] Print all Theorems? #43](https://github.com/muzimuzhi/thmtools/issues/43)
+Use the `store-all` load-time option with `\listofkeytheorems[print-body]`.
+```tex
+\documentclass{article}
+\usepackage[store-all]{keytheorems}
+
+\newkeytheorem{theorem}
+\newkeytheorem{lemma}
+
+\begin{document}
+
+\begin{theorem}
+some theorem
+\end{theorem}
+
+\begin{lemma}
+some lemma
+\end{lemma}
+
+\listofkeytheorems[print-body]
+
+\end{document}
+```
+
+### [qed option without value fails in \declaretheoremstyle #47](https://github.com/muzimuzhi/thmtools/issues/47)
+Fixed in keytheorems.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheoremstyle{mythmsty}{qed}
+\newkeytheorem{theorem}[style=mythmsty]
+
+\begin{document}
+
+\begin{theorem}
+Text
+\end{theorem}
+
+\end{document}
+```
+
+### [prefoot and postfoot hooks called twice with restate key #54](https://github.com/muzimuzhi/thmtools/issues/54)
+Fixed in keytheorems.
+```tex
+\documentclass{article}
+\usepackage{keytheorems}
+
+\newkeytheorem{theorem}
+
+\addtotheoremhook{prehead}{PREHEAD}
+\addtotheoremhook{posthead}{POSTHEAD}
+\addtotheoremhook{prefoot}{PREFOOT}
+\addtotheoremhook{postfoot}{POSTFOOT}
+
+\begin{document}
+
+\begin{theorem}
+body text
+\end{theorem}
+
+\begin{theorem}[store=foo]
+body text
+\end{theorem}
+
+\end{document}
+```
+
+### [restate key incompatible with beamer #58](https://github.com/muzimuzhi/thmtools/issues/58)
+```tex
+\documentclass{beamer}
+\setbeamertemplate{theorems}[numbered]
+\usepackage{keytheorems}
+
+\newkeytheorem{MyTheorem}
+
+\begin{document}
+
+\begin{frame}
+\begin{MyTheorem}[restate=foo]
+text
+\end{MyTheorem}
+
+\getkeytheorem{foo}
+\end{frame}
+
+\end{document}
+```
+
+## Things to do
+
+- Clean up the code. Things are out of order, poorly named, etc.
+- Add more error messages.
+- thmtools features not yet implemented
+ - labels pointing to restated theorem, not original
+ - real [`beamer`](https://ctan.org/pkg/beamer) support
+ - certainly more
+- For a complete list, see [`keytheorems-ideas.txt`](https://github.com/mbertucci47/keytheorems/blob/main/keytheorems-ideas.txt)
+
+## Notes/issues on thmtools, not on Github
+
+### continues with unless unique and restate
+Should this be numbered or not?
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheorem[numbered=unless unique]{theorem}
+
+\begin{document}
+
+\begin{theorem}[label=foo]
+bla
+\end{theorem}
+
+\begin{theorem}[continues=foo]
+bla
+\end{theorem}
+
+\end{document}
+```
+It does the correct thing when a parent counter is given and is split across that counter.
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheorem[numbered=unless unique,parent=section]{theorem}
+
+\begin{document}
+
+\begin{theorem}[label=foo]
+bla
+\end{theorem}
+
+\section{bla}
+
+\begin{theorem}[continues=foo]
+bla
+\end{theorem}
+
+\end{document}
+```
+Also adds a number if restated, which seems wrong.
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheorem[numbered=unless unique]{theorem}
+
+\begin{document}
+
+\begin{restatable}{theorem}{foo}
+bla
+\end{restatable}
+
+\foo*
+
+\end{document}
+```
+
+### qed in both `\declaretheoremstyle` and `\declaretheorem`
+One would expect the one in `\declaretheorem` to overwrite, but because the code just adds to the hooks without checking,
+it's additive.
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheoremstyle[qed=$\clubsuit$]{mysty}
+\declaretheorem[style=mysty,qed]{theorem}
+
+\begin{document}
+
+\begin{theorem}
+bla
+\end{theorem}
+
+\end{document}
+```
+
+### restate incompatible with thmbox
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheorem[thmbox]{theorem}
+
+\begin{document}
+
+\begin{theorem}[restate=foo]
+bla
+\end{theorem}
+
+\foo*
+
+\end{document}
+```
+
+### adding to listoftheorems doesn't work as expected
+```tex
+\documentclass{article}
+\usepackage{amsthm,thmtools}
+
+\declaretheorem{theorem}
+
+\begin{document}
+
+\begin{theorem}
+bla
+\end{theorem}
+
+\addcontentsline{loe}{section}{some text}
+
+\begin{theorem}
+bla
+\end{theorem}
+
+\listoftheorems
+
+\end{document}
+```
+
+### new theorem styles do not preserve "plain" keys
+With keytheorems, this is handled only for the AMS classes and acmart.
+```tex
+\documentclass{amsbook}
+\usepackage{thmtools}
+
+\declaretheoremstyle[bodyfont=\upshape]{upsty}
+\declaretheorem{theorem}
+\declaretheorem[style=upsty]{lemma}
+
+\begin{document}
+
+\begin{theorem}
+blub
+\end{theorem}
+
+\begin{lemma}
+blub
+\end{lemma}
+
+\end{document}
+```
+## License
+Released under the LaTeX Project Public License v1.3c or later. See https://www.latex-project.org/lppl.txt. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdf b/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdf
new file mode 100644
index 00000000000..935d96b6cf3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex b/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex
new file mode 100644
index 00000000000..e63783a70f7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex
@@ -0,0 +1,929 @@
+% !TeX program = txs:///pdflatex/[--shell-escape] | txs:///makeindex | txs:///pdflatex/[--shell-escape] | txs:///view-pdf
+\PassOptionsToPackage{hyperindex}{hyperref}
+\PassOptionsToPackage{dvipsnames}{xcolor}
+\documentclass{ltxdoc}
+\usepackage{geometry}
+\geometry{margin=1in}
+\usepackage{tcolorbox}
+\tcbuselibrary{documentation,minted}
+\tcbset{
+ listing engine=minted,
+ minted language=latex,
+ }
+\ifTUTeX\else
+\usepackage{lmodern}
+\usepackage[T1]{fontenc}
+\fi
+\usetikzlibrary{cd}
+\usepackage{booktabs}
+\usepackage{keytheorems}
+\usepackage{cleveref}
+\usepackage{amssymb}
+
+\def\version{0.1.1}
+
+\title{%
+ \pkg{keytheorems} package \\[1ex]
+ \large version \version \\[1ex]
+ \href{https://github.com/mbertucci47/keytheorems}
+ {\texttt{github.com/mbertucci47/keytheorems}}
+ }
+\author{Matthew Bertucci}
+
+\newkeytheoremstyle{breaksty}{break}
+
+\newkeytheorem{theorem}
+\newkeytheorem{mythm}[name=Some Name]
+\newkeytheorem{theorem*}[name=Theorem,numbered=false]
+\newkeytheorem{conjecture}[parent=section]
+\newkeytheorem{lemma}[sibling=theorem]
+\newkeytheorem{test}[
+ preheadhook=PREHEAD,
+ postheadhook=POSTHEAD,
+ prefoothook=PREFOOT,
+ postfoothook=POSTFOOT
+]
+\newkeytheorem{prop}[
+ name=Proposition,
+ refname={proposition,propositions},
+ Refname={Proposition,Propositions}
+ ]
+\newkeytheorem{example}[qed]
+\newkeytheorem{solution}[qed=$\clubsuit$]
+\newkeytheorem{remark}[style=remark]
+\tcbset{
+ defstyle/.style={arc=0mm,colback=blue!5!white,colframe=blue!75!black},
+ }
+\newkeytheorem{corollary}[tcolorbox]
+\newkeytheorem{definition}[
+ style=definition,
+ tcolorbox={defstyle}
+ ]
+\newkeytheorem{boxcor}[
+ tcolorbox-no-titlebar={colback=red!10},
+ name=Corollary,
+ sibling=corollary,
+ ]
+\newkeytheorem{observation}[style=breaksty]
+
+\MakeShortVerb{\|}
+\newcommand{\env}{\texttt}
+\newcommand{\hook}{\texttt}
+\NewCommandCopy{\braces}{\brackets}
+\newcommand{\bracks}[1]{\texttt{[#1]}}
+\newcommand{\ttbraces}[1]{\braces{\texttt{#1}}}
+%\tcbset{index gather commands=false}
+\tcbset{
+ color command=BrickRed,
+ color key=Fuchsia,
+ color value=teal,
+ before doc body={%
+ \setlength{\parindent}{15pt}
+ \noindent
+ },
+ }
+\tcbset{
+ withpreamble/.style = {
+ before upper = {%
+ {\ttfamily\itshape \% preamble}%
+ \vspace{-0.7\baselineskip}%
+ \tcbusetemplisting%
+ {\ttfamily\itshape \% document}%
+ \vspace{-0.7\baselineskip}%
+ }
+ }
+ }
+
+\NewTCBListing{keythmscode}{ O{} }
+ {
+ colback=yellow!10!white,
+ colframe=blue!50!black,
+ boxrule=0.4pt,
+ listing side text,
+ #1
+ }
+
+\NewTCBListing{keycode}{ }
+ {
+ colback=yellow!10!white,
+ colframe=blue!50!black,
+ boxrule=0.4pt,
+ listing side text,
+ }
+\newtcolorbox{notebox}[1][]{enhanced,
+ before skip balanced=2mm,after skip balanced=4mm,
+ boxrule=0.4pt,left=5mm,right=2mm,top=1mm,bottom=1mm,
+ colback=red!20,
+ colframe=red!40!black,
+ sharp corners,rounded corners=southeast,arc is angular,arc=3mm,
+ underlay={%
+ \path[fill=tcbcolback!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
+ \path[draw=tcbcolframe,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
+ \path[fill=red!40!black,draw=none] (interior.south west) rectangle node[white]{\LARGE\bfseries !} ([xshift=4mm]interior.north west);
+ },
+ drop fuzzy shadow,#1}
+\makeindex
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+An \pkg{expl3}-implementation of a key-value interface to \pkg{amsthm}, implementing most of the functionality provided by \pkg{thmtools}. Several issues encountered with \pkg{thmtools} are avoided (see the README for a list) and a few new features are added.
+\end{abstract}
+
+\tableofcontents
+
+\section{Dependencies}
+
+Without using the \refKey{tcolorbox} or \refKey{tcolorbox-no-titlebar} options, the package loads the \pkg{aliascnt}, \pkg{amsthm}, \pkg{refcount}, and \pkg{translations} packages. A \LaTeX{} kernel no older than 2023-06-01 is required; if older than 2024-06-01, \pkg{nameref} is required.
+
+\section{Global Options}
+
+\begin{docCommand}{keytheoremset}
+ {\marg{options}}
+Every key in this section can be given as a package option with \cs{usepackage}\bracks{\meta{options}}\ttbraces{keytheorems} or in \cs{keytheoremset}\marg{options}, with the exception that \refKey{continues-code} can only be used in the latter.
+\end{docCommand}
+
+\begin{docKey}{overload}
+ {}
+ {initially unset}
+Redefines \cs{newtheorem} to internally use the \pkg{keytheorems} machinery. The syntax remains the same. This is automatically set by \refKey{thmtools-compat}.
+\end{docKey}
+
+\begin{docKey}{thmtools-compat}
+ {}
+ {initially unset}
+For compatibility with \pkg{thmtools} syntax. Currently defines the commands in the left column below. The right column lists the corresponding \pkg{keytheorems} replacement that should be used in new documents.
+\begin{center}
+\begin{tabular}{cc}
+\pkg{thmtools} command & \pkg{keytheorems} replacement \\
+\toprule
+\docAuxCommand*{declaretheorem} & \refCom{newkeytheorem} \\
+\docAuxCommand*{declaretheoremstyle} & \refCom{newkeytheoremstyle} \\
+\docAuxCommand*{listoftheorems} & \refCom{listofkeytheorems} \\
+\begin{tabular}{c}
+\docAuxCommand*{addtotheorempreheadhook}\\
+\docAuxCommand*{addtotheorempostheadhook}\\
+\docAuxCommand*{addtotheoremprefoothook}\\
+\docAuxCommand*{addtotheorempostfoothook}\\
+\end{tabular} & \refCom{addtotheoremhook} \\
+\docAuxEnvironment*{restatable} environment & \refKey{store} key
+\end{tabular}
+\end{center}
+Also defined are the \docAuxKey*{shaded} and \docAuxKey*{thmbox} keys, implemented internally with \pkg{tcolorbox} rather than the \pkg{shadethm} and \pkg{thmbox} packages, respectively.
+\end{docKey}
+
+\begin{docKey}{store-all}
+ {}
+ {initially unset}
+Tells \pkg{keytheorems} to grab the body of each theorem so it can later be
+printed with the \refKey{print-body} option of \refCom{listofkeytheorems}. Note that this means a theorem body
+\emph{cannot} contain verbatim material.
+\end{docKey}
+
+\begin{docKey}{restate-counters}
+ {=\marg{comma-list of counters}}
+ {initially \ttbraces{equation}}
+Additional counters whose values are preserved when a theorem is restated. This key does not reset the list, so you don't need to include |equation| in \meta{comma-list}.
+\end{docKey}
+
+\begin{docKey}{continues-code}
+ {=\meta{code with \textup{\texttt{\#1}}}}
+ {initially \cs{GetTranslation}\ttbraces{keythms\string_continues}\cs{pageref}\ttbraces{\#1}}
+The code used to typeset the note produced by the \refKey{continues} key. If English or an unknown language is used, defaults to \texttt{continuing from p.}\cs{,}\cs{pageref}\ttbraces{\#1}. Currently (likely inaccurate!) translations exist for French, German, and Spanish.
+\end{docKey}
+
+\begin{docKey}{qed-symbol}
+ {=\meta{symbol}}
+ {initially \cs{openbox}}
+Redefines \cs{qedsymbol} to be \meta{symbol}.
+\end{docKey}
+
+\begin{docKey}{auto-translate}
+ {\colOpt{=true\textbar false}}
+ {default |true|, initially |true|}
+If |false|, \pkg{keytheorems} does not automatically translate the title text for \refCom{listofkeytheorems} and the note produced by the \refKey{continues} key. These texts can be manually customized with the \refKey{title} and \refKey{continues-code} keys, respectively.
+\end{docKey}
+
+\section{Defining Theorems}
+
+\begin{docCommand}{newkeytheorem}
+ {\marg{env name}\oarg{options}}
+Defines a theorem environment \meta{env name} which itself takes a few options (see \autoref{in-doc-keys}). You can also declare multiple theorems at once by replacing \meta{env name} with a comma-list of names, e.g. \cs{newkeytheorem}\ttbraces{theorem,lemma,proposition}\bracks{\meta{options}}.
+
+By default, the theorem's printed name is a title-cased \meta{env name}. This can be changed with the \refKey{thm/name} key. All \meta{options} are described in subsections \ref{thm-thmtools-keys} and \ref{thm-added-keys}.
+\end{docCommand}
+
+\begin{tcbwritetemp}
+\newkeytheorem{theorem}
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{theorem}
+Some text
+\end{theorem}
+\end{keythmscode}
+
+\subsection{Keys available to theorem environments} \label{in-doc-keys}
+
+As in \pkg{amsthm}, theorems can take an optional argument that contains a note or heading.
+
+\begin{keythmscode}[]
+\begin{theorem}[some heading]
+Some text
+\end{theorem}
+\end{keythmscode}
+
+Alternatively, the optional argument may contain any of the following keys.
+
+\begin{docKey}{note}
+ {=\meta{text}}
+ {initially unset}
+Alias \docAuxKey[][doc label=thmuse/name]{name}. This is the key-value equivalent of the optional argument described above. This syntax, however, allows the argument to contain other keys.
+
+\begin{keythmscode}[]
+\begin{theorem}[some heading]
+Some text
+\end{theorem}
+\begin{theorem}[note=another heading]
+Some more text
+\end{theorem}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{short-note}
+ {=\meta{text}}
+ {initially unset}
+Alias \docAuxKey{short-name}. This replaces the value of \refKey{note} when displayed in \refCom{listofkeytheorems}.
+\end{docKey}
+
+\begin{docKey}{label}
+ {=\meta{label name}}
+ {initially unset}
+This is the key-value equivalent of |\begin{theorem}| \cs{label}\marg{label name}.
+
+\begin{keythmscode}[]
+\begin{theorem}[label=foo]
+Some text
+\end{theorem}
+\ref{foo}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{continues}
+ {\sarg=\meta{label name}}
+ {initially unset}
+Pick up a theorem where you left off. The theorem number remains the same. The printed text can be customized with the \refKey{continues-code} option. The starred version also copies the theorem note, if it exists.
+
+\begin{keythmscode}[]
+\begin{theorem}[continues=foo]
+\dots and some more text.
+\end{theorem}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{store}
+ {=\meta{tag}}
+ {initially unset}
+Alias \docAuxKey{restate}. Stores the the theorem to be restated at any point in the document with \refCom{getkeytheorem}.
+
+\begin{keythmscode}[]
+\begin{theorem}[store=blub]
+A theorem worth restating.
+\end{theorem}
+More brilliant mathematics.
+\getkeytheorem{blub}
+\end{keythmscode}
+
+A theorem given this key \emph{cannot} contain verbatim material or other unexpected catcodes, such as a \pkg{tikz-cd} diagram. The latter issue can be averted with the \texttt{ampersand-replacement} key.
+
+\begin{tcbwritetemp}
+\usepackage{tikz}
+\usetikzlibrary{cd}
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{lemma}[store=diagram]
+Some commutative diagram:
+\[\begin{tikzcd}[ampersand replacement=\&]
+X\times_S Y \ar[r] \ar[d] \& X \ar[d] \\
+Y \ar[r] \& S
+\end{tikzcd}\]
+\end{lemma}
+\dots
+\getkeytheorem{diagram}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{listhack}
+ {=\docValue*{true}\textbar\docValue*{false}}
+ {initially |false|}
+Meant only to be used with the \refKey{break} style key for a theorem starting with a list. Compare:
+
+\begin{tcbwritetemp}
+\newkeytheoremstyle{breaksty}{break}
+\newkeytheorem{observation}[style=breaksty]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{observation}
+\begin{enumerate}
+\item First item
+\end{enumerate}
+\end{observation}
+
+\begin{observation}[listhack=true]
+\begin{enumerate}
+\item First item
+\end{enumerate}
+\end{observation}
+\end{keythmscode}
+
+Note that the value |true| must be explicitly set so that |listhack| is not interpreted as the note text.
+\end{docKey}
+
+\begin{docKey}[][doc label=thm/seq]{seq}
+ {=\meta{name}}
+ {initially unset}
+Adds the theorem to a custom sequence \meta{name} that can then be listed with \cs{listofkeytheorems}\bracks{seq=\meta{name}}. See \refKey{listof/seq} for more details.
+\end{docKey}
+
+\subsection{Keys inherited from \pkg{thmtools}} \label{thm-thmtools-keys}
+
+These are the \oarg{options} available to \cs{newkeytheorem}. Except for \refKey{thm/name} and \refKey{style}, each key below can also be used in \refCom{newkeytheoremstyle}. For more description, see the \href{https://ctan.org/pkg/thmtools}{\pkg{thmtools}} package.
+
+\begin{docKey}[][doc label=thm/name]{name}
+ {=\meta{display name}}
+ {initially title-cased \meta{env name}}
+Aliases \docAuxKey{title} and \docAuxKey{heading}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{mythm}[name=Some Name]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{mythm}
+Some text
+\end{mythm}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{numbered}
+ {=\docValue*{true}\textbar\docValue*{false}\textbar \docValue{unless-unique}}
+ {default |true|, initially |true|}
+For compatibility with \pkg{thmtools}, also accepts the values \docValue*{yes}, \docValue*{no}, and \docValue*{unless unique}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{theorem*}[
+ name=Theorem, numbered=false
+ ]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{theorem*}
+An unnumbered theorem.
+\end{theorem*}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{parent}
+ {=\meta{counter}}
+ {initially unset}
+Aliases \docAuxKey{numberwithin} and \docAuxKey{within}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{conjecture}[parent=section]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{conjecture}
+The first number is the section.
+\end{conjecture}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{sibling}{=\meta{counter}}{initially unset}
+Aliases \docAuxKey{numberlike} and \docAuxKey{sharenumber}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{lemma}[sibling=theorem]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{lemma}
+This shares its counter with
+\texttt{theorem}.
+\end{lemma}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{style}
+ {=\meta{style name}}
+ {initially unset}
+Accepts any \meta{style name} defined by \refCom{newkeytheoremstyle}, as well as any of the predefined \pkg{amsthm} styles: \docValue{plain}, \docValue{definition}, and \docValue{remark}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{remark}[style=remark]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{remark}
+Some text
+\end{remark}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKeys}[
+ doc parameter = {=\meta{code}},
+ doc description = initially unset,
+ ]
+ {
+ { doc name = preheadhook },
+ { doc name = postheadhook },
+ { doc name = prefoothook },
+ { doc name = postfoothook },
+ }
+Details in \autoref{keythms-hooks}.
+
+\begin{tcbwritetemp}
+\newkeytheorem{test}[
+ preheadhook=PREHEAD,
+ postheadhook=POSTHEAD,
+ prefoothook=PREFOOT,
+ postfoothook=POSTFOOT
+]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{test}
+Some text
+\end{test}
+\end{keythmscode}
+
+\end{docKeys}
+
+\begin{docKey}{refname}
+ {=\meta{ref name} \textrm{or} \brackets{\meta{singular name},\meta{plural name}}}
+ {initially \meta{display name}}
+If a single string, then the name used by \pkg{hyperref}'s \cs{autoref} and \pkg{cleveref}'s \cs{cref}. If two strings separated by a comma, then the second string is the plural form used by \cs{cref}.
+\end{docKey}
+
+\begin{docKey}{Refname}
+ {=\meta{ref name} \textrm{or} \brackets{\meta{singular name},\meta{plural name}}}
+ {initially \meta{display name}}
+Same as \refKey{refname} but for \docAuxCommand{Autoref} and \cs{Cref}. Note that \cs{Autoref} is defined by \pkg{keytheorems}, but requires \pkg{hyperref} to work.
+
+\begin{tcbwritetemp}
+\newkeytheorem{prop}[
+ name=Proposition,
+ refname={proposition,propositions},
+ Refname={Proposition,Propositions}
+ ]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{prop}[label=abc]
+Some text
+\end{prop}
+\begin{prop}[label=def]
+Some more text
+\end{prop}
+\begin{theorem}
+Consider \cref{abc,def}.
+\Autoref{abc} \dots
+\end{theorem}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{qed}
+ {\colOpt{=\meta{symbol}}}
+ {default \cs{openbox}, initially unset}
+Adds \colOpt{\meta{symbol}} to the end of the theorem body. If no value is given, the symbol \openbox\ is used.
+
+\begin{tcbwritetemp}
+\newkeytheorem{example}[qed]
+\newkeytheorem{solution}[qed=$\clubsuit$]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{example}
+Some text
+\end{example}
+\begin{solution}
+Some more text
+\end{solution}
+\end{keythmscode}
+
+\end{docKey}
+
+\subsection{Keys added by \pkg{keytheorems}} \label{thm-added-keys}
+
+\begin{docKey}{tcolorbox}
+ {\colOpt{=\marg{tcolorbox options}}}
+ {initially unset}
+This key specifies that the theorem be placed inside a tcolorbox environment with \colOpt{\meta{options}}.
+The theorem head is typeset as a tcolorbox title; to avoid this see \refKey{tcolorbox-no-titlebar}.
+
+\begin{tcbwritetemp}
+\tcbset{
+ defstyle/.style={
+ arc=0mm,
+ colback=blue!5!white,
+ colframe=blue!75!black
+ },
+ }
+\newkeytheorem{corollary}[tcolorbox]
+\newkeytheorem{definition}[
+ style=definition,
+ tcolorbox={defstyle}
+ ]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{corollary}
+Some text
+\end{corollary}
+\begin{definition}
+Some more text
+\end{definition}
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{tcolorbox-no-titlebar}
+ {\colOpt{=\marg{tcolorbox options}}}
+ {initially unset}
+Same usage as \refKey{tcolorbox} but the theorem head is typeset as usual, not as a tcolorbox title.
+
+\begin{tcbwritetemp}
+\newkeytheorem{boxcor}[
+ tcolorbox-no-titlebar={
+ colback=red!10
+ },
+ name=Corollary,sibling=corollary
+ ]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{boxcor}
+Some text
+\end{boxcor}
+\end{keythmscode}
+
+\end{docKey}
+
+\section{Theorem Styles}
+
+\begin{docCommand}{newkeytheoremstyle}
+ {\marg{name}\marg{options}}
+This is \pkg{keytheorems}' version of \pkg{thmtools}' \cs{declaretheoremstyle}\bracks{\meta{options}}\marg{name}. Since it makes little sense to define a style with no keys, we've made the \meta{options} argument mandatory. Note that unlike \pkg{amsthm}'s \cs{newtheoremstyle}, this command will error if a style has already been defined. To overwrite an existing style, there is the analogous \docAuxCommand{renewkeytheoremstyle}. For completeness, there is also \docAuxCommand{declarekeytheoremstyle} and \docAuxCommand{providekeytheoremstyle}.
+\end{docCommand}
+
+\begin{notebox}
+For the AMS classes \cls{amsart}, \cls{amsbook}, and \cls{amsproc}, as well as the \cls{amsart}-based \cls{acmart}, the initial key values are slightly different than what's below in order to match those class's defaults.
+\end{notebox}
+
+\subsection{Keys inherited from \pkg{thmtools}}
+
+The following keys have the same meaning and syntax as the corresponding \pkg{thmtools} keys. In addition to the list below, most of the keys available to \refCom{newkeytheorem} can be used in \cs{newkeytheoremstyle}.
+
+\begin{docKey}{spaceabove}
+ {=\meta{length}}
+ {initially \cs{topsep}}
+
+\end{docKey}
+
+\begin{docKey}{spacebelow}
+ {=\meta{length}}
+ {initially \cs{topsep}}
+
+\end{docKey}
+
+\begin{docKey}{bodyfont}
+ {=\meta{font declarations}}
+ {initially \cs{itshape}}
+
+\end{docKey}
+
+\begin{docKey}{headindent}
+ {=\meta{length}}
+ {initially |0pt|}
+
+\end{docKey}
+
+\begin{docKey}{headfont}
+ {=\meta{font declarations}}
+ {initially \cs{bfseries}}
+
+\end{docKey}
+
+\begin{docKey}{headpunct}
+ {=\meta{code}}
+ {initially \ttbraces{.}}
+
+\end{docKey}
+
+\begin{docKey}{postheadspace}
+ {=\meta{length}}
+ {initially |5pt plus 1pt minus 1pt|}
+Do not use this with the \refKey{break} key.
+\end{docKey}
+
+\begin{docKey}{break}
+ {}
+ {initially unset}
+Do not use this with the \refKey{postheadspace} key.
+\end{docKey}
+
+\begin{docKey}{notefont}
+ {=\meta{font declarations}}
+ {initially \cs{fontseries}\cs{mddefault}\cs{upshape}}
+
+\end{docKey}
+
+\begin{docKey}{notebraces}
+ {=\marg{left brace}\marg{right brace}}
+ {initially \ttbraces{(}\ttbraces{)}}
+
+\end{docKey}
+
+\begin{docKey}{headstyle}
+ {=\docValue{margin}\textbar\docValue{swapnumber}\textbar\meta{code using \cs{NAME}, \cs{NUMBER}, and \cs{NOTE}}}
+ {}
+Alias \docAuxKey{headstyle}. Within \meta{code}, the commands \docAuxCommand{NAME}, \docAuxCommand{NUMBER}, and \docAuxCommand{NOTE} correspond to the formatted parts of the theorem head.
+\end{docKey}
+
+\subsection{Keys added by \pkg{keytheorems}}
+
+\begin{docKey}{inherit-style}
+ {=\meta{style name}}
+ {initially unset}
+Inherit the keys of any style declared with \refCom{newkeytheoremstyle}. Additionally, the three styles predefined by \pkg{amsthm} are possible values: \docValue{plain}, \docValue{definition}, and \docValue{remark}.
+\end{docKey}
+
+\section{Restating Theorems}
+
+When a theorem is given the \refKey{store} key, the contents of the theorem are saved and written to a |.thlist| file. At the start of the next run, this file is input at the beginning of the document and allows you to retrieve the stored theorems at any point, before or after the original theorem.
+
+\begin{docCommand}{getkeytheorem}
+ {\oarg{property}\marg{tag}}
+Retrieves the theorem given the key |store=|\meta{tag}. An optional \meta{property} can be given to retrieve only the corresponding part of the theorem. Currently only the property |body| is implemented, which retrieves the (unformatted) body of the theorem.
+
+\begin{keythmscode}[]
+\getkeytheorem{mytag}
+
+\begin{example}[store=mytag]
+Fascinating example.
+\end{example}
+
+\getkeytheorem[body]{mytag}
+\end{keythmscode}
+
+\end{docCommand}
+
+\begin{docCommand}{IfRestatingTF}
+ {\marg{true code}\marg{false code}}
+Executes \meta{true code} if being retrieved with \refCom{getkeytheorem} and \meta{false code} if in the original theorem.
+
+\begin{keythmscode}[]
+\begin{example}[store=hmm]
+I am the
+\IfRestatingTF{restated}{original}
+example!
+\end{example}
+
+\getkeytheorem{hmm}
+\end{keythmscode}
+
+\end{docCommand}
+
+\section{Listing Theorems}
+
+\begin{docCommand}{listofkeytheorems}
+ {\oarg{options}}
+
+\end{docCommand}
+
+\begin{docCommand}{keytheoremlistset}
+ {\marg{options}}
+
+\end{docCommand}
+
+\begin{keythmscode}[]
+\listofkeytheorems
+\end{keythmscode}
+
+\subsection{Keys inherited from \pkg{thmtools}}
+
+\begin{docKey}{numwidth}
+ {=\meta{length}}
+ {initially |2.3em|}
+
+\end{docKey}
+
+\begin{docKey}{ignore}
+ {=\marg{comma-list of env names}}
+ {initially unset}
+
+\end{docKey}
+
+\begin{docKey}{show}
+ {=\marg{comma-list of env names}}
+ {initially all theorems}
+
+\end{docKey}
+
+\begin{docKey}{onlynamed}
+ {\colOpt{=\marg{comma-list of env names}}}
+ {initially unset}
+
+\end{docKey}
+
+\begin{docKey}{ignoreall}
+ {}
+ {initially unset}
+
+\begin{keythmscode}[]
+\listofkeytheorems[ignoreall,show=theorem]
+\listofkeytheorems[
+ ignoreall, show=conjecture,
+ title=List of Conjectures
+ ]
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{showall}
+ {}
+ {initially set}
+
+\end{docKey}
+
+\begin{docKey}{title}
+ {=\meta{text}}
+ {initially \cs{GetTranslation}\ttbraces{keythms\string_listof\string_title}}
+Defaults to ``List of Theorems'' if English or an unknown language is used. Currently French, German, and Spanish have (likely inaccurate!) translations. A translation can be added with a GitHub pull request or manually with \cs{DeclareTranslation}\marg{lang}\ttbraces{keythms\string_listof\string_title}\marg{text}.
+\end{docKey}
+
+\begin{docKey}{swapnumber}
+ {\colOpt{=true\textbar false}}
+ {initially |false|}
+
+\end{docKey}
+
+\subsection{Keys added by \pkg{keytheorems}}
+
+\begin{docKey}{onlynumbered}
+ {\colOpt{=\marg{comma-list of env names}}}
+ {initially unset}
+Similar to \refKey{onlynamed}, but lists only those theorems which are numbered. This is useful if you'd like to exclude things like unnumbered definitions and remarks from the list of theorems.
+\end{docKey}
+
+\begin{docKey}[][doc label=listof/seq]{seq}
+ {=\meta{name}}
+ {initially unset}
+Used to list only the theorems added to the custom sequence \meta{name} with the \refKey{thm/seq} theorem key. This is the only way to fully customize which theorems appear in the list of theorems. Unlike with \refKey{show}, you do not need to use \refKey{ignoreall} to prevent theorems not in \meta{name} from being printed.
+\end{docKey}
+
+\begin{docKey}{title-code}
+ {=\meta{code with \textup{\texttt{\#1}}}}
+ {initially \cs{section*}\ttbraces{\#1}}
+If \cs{chapter} is defined, then initially this is instead \cs{chapter*}\ttbraces{\#1}.
+\end{docKey}
+
+\begin{docKey}{no-title}
+ {}
+ {initially unset}
+Suppresses the title of the list of theorems. Useful for custom ordering of the list.
+
+\begin{keythmscode}[]
+\keytheoremlistset{ignoreall}
+\listofkeytheorems[show=example]
+\listofkeytheorems[show=solution,no-title]
+\end{keythmscode}
+
+\end{docKey}
+
+\begin{docKey}{note-code}
+ {=\meta{code with \textup{\texttt{\#1}}}}
+ {initially \ttbraces{ (\#1)}}
+Formats the optional note in the list of theorems.
+\end{docKey}
+
+\begin{docKey}{print-body}
+ {}
+ {initially unset}
+Instead of listing the theorem headings, the theorems are restated with their body text. Not very useful without the \refKey{store-all} load-time option.
+\end{docKey}
+
+\begin{docKey}{no-continues}
+ {\colOpt{=true\textbar false}}
+ {initially |false|}
+Suppresses the printing of theorems given the \refKey{continues} key in the list of theorems.
+\end{docKey}
+
+\begin{docKey}{no-chapter-skip}
+ {\colOpt{=true\textbar false}}
+ {initially |false|}
+By default a small vertical space is inserted between each chapter's chunk of theorems. Setting this key to |true| removes this space.
+\end{docKey}
+
+\begin{docKey}{chapter-skip-length}
+ {=\meta{dimension}}
+ {initially |10pt|}
+Controls the amount of space inserted between chunks.
+\end{docKey}
+
+\subsection{Adding code to list of theorems}
+
+There are analogous commands to \cs{addcontentsline} and \cs{addtocontents} for
+adding entries or arbitrary code to the list of theorems.
+
+\begin{notebox}
+You \emph{must} use these commands rather than the aforementioned because the
+|.thlist| file is also used to define restated theorems and cannot contain
+unexpected code.
+\end{notebox}
+
+\begin{docCommand}{addtheoremcontentsline}
+ {\marg{level}\marg{text}}
+
+\end{docCommand}
+
+\begin{docCommand}{addtotheoremcontents}
+ {\marg{code}}
+
+\end{docCommand}
+
+\section{Theorem Hooks} \label{keythms-hooks}
+
+\begin{docCommand}{addtotheoremhook}
+ {\oarg{env name}\marg{hook name}\marg{code}}
+\meta{hook name} can be \hook{prehead}, \hook{posthead}, \hook{prefoot}, \hook{postfoot}, or \hook{restated}. If no \meta{env name} is given, the \meta{code} is added to the ``generic'' hook, i.e. applied to all theorems. As in \pkg{thmtools}, the order of hooks is as follows:
+
+\begin{center}
+ \tcbset{
+ nobeforeafter,
+ tikznode,
+ tcbox width=forced center,
+ width=2cm,
+ tcbox raise=-0.4cm,
+ size=fbox,
+ after=\;$\rightarrow$
+ }
+ \tcbox{\meta{env name}\\ \hook{prehead}}
+ \tcbox{generic\\ \hook{prehead}}
+ \tcbox[width=3.5cm,tcbox raise=-0.2cm]{\cs{begin}\brackets{\meta{env name}}}
+ \tcbox{\meta{env name}\\ \hook{posthead}}
+ \tcbox[after={}]{generic\\ \hook{posthead}}
+ \\[2ex]
+ \tcbset{before=$\rightarrow$\;}
+ \tcbox[width=2.5cm,tcbox raise=-0.2cm]{\meta{theorem body}}
+ \\[2ex]
+ \tcbset{after={}}
+ \tcbox[before={}]{generic\\ \hook{prefoot}}
+ \tcbox{\meta{env name}\\ \hook{prefoot}}
+ \tcbox[width=3.5cm,tcbox raise=-0.2cm]{\cs{end}\brackets{\meta{env name}}}
+ \tcbox{generic\\ \hook{postfoot}}
+ \tcbox{\meta{env name}\\ \hook{postfoot}}
+\end{center}
+The \hook{restated} hook is applied at the start of theorems retrieved with \cs{getkeytheorem}, before the \hook{prehead} hook. This can be useful for disabling commands such as \cs{footnote} in the restated theorems, e.g.
+\begin{dispListing}
+\addtotheoremhook{restated}{%
+ \renewcommand\footnote[2][]{}%
+ }
+\end{dispListing}
+By default, \pkg{keytheorems} disables the \cs{label} and \cs{RecordProperties} commands in restated theorems.
+
+In \pkg{thmtools}, the \hook{prefoot} and \hook{postfoot} hooks always prepend code, i.e. the code
+\begin{dispListing}
+\addtotheorempostfoothook{A}
+\addtotheorempostfoothook{B}
+\end{dispListing}
+results in |BA| after the theorem. With \pkg{keytheorems}, code is added in the order declared, meaning
+\begin{dispListing}
+\addtotheoremhook{postfoot}{A}
+\addtotheoremhook{postfoot}{B}
+\end{dispListing}
+results in |AB| after the theorem. This is the behavior of the \LaTeX{} kernel hooks that \pkg{keytheorems} uses under the hood.
+
+Right now, code added using the hook keys \refKey{preheadhook}, etc. is outermost, meaning executed first in \hook{prehead} and \hook{posthead} and last in \hook{prefoot} and \hook{postfoot}. This may change if I think of good reasons to do so\dots
+\end{docCommand}
+
+%\section{Implementation}
+%\inputminted[linenos,style=bw]{latex}{../keytheorems.sty}
+
+\printindex
+
+\end{document} \ No newline at end of file