summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-11-06 21:22:42 +0000
committerKarl Berry <karl@freefriends.org>2024-11-06 21:22:42 +0000
commitc11d06b55738609e9da6f46f86c46745e6c4e614 (patch)
tree434728da72c60b079de7e42e62d681b96e58e43b /Master/texmf-dist/doc
parent6080a7234933e9b3c6d93a031f09d08d2e25a1c6 (diff)
keytheorems (6nov24)
git-svn-id: svn://tug.org/texlive/trunk@72780 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/latex/keytheorems/CHANGELOG.md6
-rw-r--r--Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdfbin152757 -> 160412 bytes
-rw-r--r--Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex96
3 files changed, 90 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/latex/keytheorems/CHANGELOG.md b/Master/texmf-dist/doc/latex/keytheorems/CHANGELOG.md
index de5d3ac354f..264b5ab0715 100644
--- a/Master/texmf-dist/doc/latex/keytheorems/CHANGELOG.md
+++ b/Master/texmf-dist/doc/latex/keytheorems/CHANGELOG.md
@@ -1,5 +1,10 @@
# Changelog for keytheorems package
+## [v0.2.1]
+- make several commands "long" so keyvals can contain `\par` tokens
+- add `leftmargin` and `rightmargin` keys
+- improve implementation of tcolorbox theorems
+
## [v0.1.8]
- add support for tagged PDF ([\#4](https://github.com/mbertucci47/keytheorems/issues/4))
- add tagged example file tagged-keytheorems-amsthmtest.tex
@@ -44,6 +49,7 @@
## 0.1.0 - 2024-09-04
- First release
+[v0.2.1]: https://github.com/mbertucci47/keytheorems/compare/v0.1.8...v0.2.1
[v0.1.8]: https://github.com/mbertucci47/keytheorems/compare/v0.1.7...v0.1.8
[v0.1.7]: https://github.com/mbertucci47/keytheorems/compare/v0.1.6...v0.1.7
[v0.1.6]: https://github.com/mbertucci47/keytheorems/compare/v0.1.5...v0.1.6
diff --git a/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdf b/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdf
index 59baedc317a..fba3279b980 100644
--- a/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdf
+++ 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
index 2af490c35e8..464d92e2d29 100644
--- a/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex
+++ b/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex
@@ -22,6 +22,18 @@
\usepackage{keytheorems}
\usepackage{cleveref}
+%%% TEMPORARY (https://tex.stackexchange.com/q/730126/208544)
+\RemoveFromHook{label}[firstaid/cleveref]
+\makeatletter
+\AddToHook{label}[firstaid/cleveref]
+ {\ifx
+ \@currentcounter\@empty
+ \else
+ \firstaid@cref@updatelabeldata{\@currentcounter}%<--- was missing
+ \fi}
+\makeatother
+%%% END TEMPORARY
+
\makeatletter
\newcommand\keythmsversion{\@keythms@version}
\makeatother
@@ -78,6 +90,8 @@
sibling=corollary,
]
\newkeytheorem{observation}[style=breaksty]
+\newkeytheorem{quotethm}[name=Quote Theorem,leftmargin=1cm,rightmargin=1cm]
+\newkeytheorem{indentedthm}[name=Indented Theorem,leftmargin=1cm]
\MakeShortVerb{\|}
\newcommand{\env}{\texttt}
@@ -86,7 +100,9 @@
\newcommand{\bracks}[1]{\texttt{[#1]}}
\newcommand{\ttbraces}[1]{\braces{\texttt{#1}}}
%\tcbset{index gather commands=false}
-\colorlet{ExampleBack}{yellow!10}
+\usepackage{xcolor-solarized}
+\colorlet{ExampleBack}{solarized-base3!50}
+\colorlet{ExampleBackLower}{solarized-base3}
\tcbset{
color command=BrickRed,
color key=Fuchsia,
@@ -102,8 +118,8 @@
before upper = {%
{\ttfamily\itshape \% preamble}%
\vspace{-0.7\baselineskip}%
- \tcbusetemplisting%
- {\ttfamily\itshape \% document}%
+ \tcbusetemplisting
+ \noindent{\ttfamily\itshape \% document}%
\vspace{-0.7\baselineskip}%
}
}
@@ -117,8 +133,9 @@
% listing side text,
% lower separated=false,
skin=bicolor,
- colbacklower=yellow!25,
+ colbacklower=ExampleBackLower,
breakable,
+ parbox=false, % so examples match document with indent, etc.
% enhanced,
% segmentation engine=path,
% segmentation style={solid,gray},
@@ -164,7 +181,7 @@ Several issues encountered with \pkg{thmtools} are avoided (see the README for a
\section{Dependencies}
-The package depends on the \pkg{aliascnt}, \pkg{amsthm}, \pkg{refcount}, \pkg{translations} packages.
+The package depends on the \pkg{aliascnt}, \pkg{amsthm}, \pkg{etoolbox}, \pkg{refcount}, \pkg{translations} packages.
The \refKey{tcolorbox} and \refKey{tcolorbox-no-titlebar} keys require \pkg{tcolorbox}, and the \refKey[numbered=unless-unique]{numbered} key requires the \pkg{unique} package.
A \LaTeX{} kernel no older than 2023-06-01 is required; if older than 2024-06-01, \pkg{nameref} is required.
@@ -630,6 +647,43 @@ Consider \cref{abc,def}. \Autoref{abc} \dots
\subsection{Keys added by \pkg{keytheorems}} \label{thm-added-keys}
+\begin{docKeys}[doc parameter={=\meta{length}}]
+ {
+ { doc name=leftmargin },
+ { doc name=rightmargin },
+ }
+Sets the left (respectively, right) margin of the theorem relative to the text width.
+This sets the theorem apart from the text, similar to a block quote. Code adapted from Enrico Gregorio's \TeX{} Stack Exchange answers:
+\begin{itemize}
+ \item \href{https://tex.stackexchange.com/a/67251/208544}{How to change margins in enunciation (theorem-like environment)?}
+ \item \href{https://tex.stackexchange.com/a/236407/208544}{A theoremstyle with complete indentation using amsthm}
+\end{itemize}
+\begin{tcbwritetemp}
+\newcommand{\marginthmtext}{%
+ We need some text to show off theorems with margins. }
+\newkeytheorem{quotethm}[
+ name=Quote Theorem,
+ leftmargin=1cm, rightmargin=1cm]
+\newkeytheorem{indentedthm}[name=Indented Theorem, leftmargin=1cm]
+\end{tcbwritetemp}
+
+\newcommand{\marginthmtext}{We need some text to show off theorems with margins. }
+\begin{keythmscode}[withpreamble]
+\marginthmtext\marginthmtext\marginthmtext
+
+\begin{quotethm}
+\marginthmtext\marginthmtext\marginthmtext
+\end{quotethm}
+
+\marginthmtext\marginthmtext\marginthmtext
+
+\begin{indentedthm}
+\marginthmtext\marginthmtext\marginthmtext
+\end{indentedthm}
+\end{keythmscode}
+
+\end{docKeys}
+
\begin{docKey}{tcolorbox}
{\colOpt{=\marg{tcolorbox options}}}
{initially unset}
@@ -799,6 +853,10 @@ Do not use this with the \refKey{break} key.
\end{docKey}
+\begin{notebox}
+With \refKey{tcolorbox} and \refKey{tcolorbox-no-titlebar}, the \refKey{spaceabove} and \refKey{spacebelow} keys are internally passed to \pkg{tcolorbox}'s \texttt{before skip} and \texttt{after skip}. When no explicit \texttt{spaceabove} or \texttt{spacebelow} values are given, \pkg{tcolorbox} defaults are used instead of \cs{topsep}.
+\end{notebox}
+
\subsection{Keys added by \pkg{keytheorems}}
\begin{docKey}{inherit-style}
@@ -978,7 +1036,7 @@ Setting this key to |true| removes this space.
\end{docKey}
\begin{docKey}{chapter-skip-length}
- {=\meta{dimension}}
+ {=\meta{length}}
{initially |10pt|}
Controls the amount of space inserted between chunks.
\end{docKey}
@@ -1157,7 +1215,8 @@ Some font packages, all by Michael Sharpe, offer a |theoremfont| option that red
The \LaTeX{} team has been working hard to support the creation of tagged PDFs (see \url{https://latex3.github.io/tagging-project/}).
The current |dev| formats make \pkg{amsthm} compatible with the kernel tagging code.
Most of \pkg{keytheorems} is supported too, and anything that doesn't work should be reported.
-The only things explicitly not supported are the \refKey{tcolorbox} and \refKey{tcolorbox-no-titlebar} keys.
+Explicitly not supported are the \refKey{tcolorbox} and \refKey{tcolorbox-no-titlebar} keys.
+There is only partial support for \refKey{leftmargin} and \refKey{rightmargin}, namely only the latter works.
To produce a tagged PDF, add \cs{DocumentMetadata} in the first line of your document (additional instructions are found on the Tagging Project \href{https://latex3.github.io/tagging-project/documentation/prototype-usage-instructions.html}{website}).
An example invocation might look like
@@ -1177,11 +1236,24 @@ The GitHub tests folder contains an example of a tagged PDF using \pkg{keytheore
\subsection{Public coding interfaces}
-\begin{itemize}
- \item |\l_keythms_thmuse_envname_tl|
-
- Inside theorem environments and in all theorem hooks, you have access to the theorem's environment and counter name in this token list variable.
-\end{itemize}
+\begin{docCommand}{l_keythms_thmuse_envname_tl}{}
+Inside theorem environments and in all theorem hooks, you have access to the theorem's environment and counter name in this token list variable.
+\end{docCommand}
+
+\begin{docKeys}[doc no index,color key=black]
+ {
+ {
+ doc name=keytheorems/allthms/\textmd{\meta{hook name}},
+ doc label=allthms-hook,
+ },
+ {
+ doc name=keytheorems/\textmd{\meta{envname}}/\textmd{\meta{hook name}},
+ doc label=envname-hook,
+ }
+ }
+These are the ``real'' names for the hooks described in \autoref{keythms-hooks}.
+They can be useful with \cs{AddToHookNext} or the kernel's label mechanism for hooks.
+\end{docKeys}
\section{Further examples}