summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-11-07 03:03:06 +0000
committerNorbert Preining <norbert@preining.info>2024-11-07 03:03:06 +0000
commita7aabeea547fa94e5a0fa9c8a5044236c45ec04b (patch)
tree19f4570cd1a5bf1a2bb2f6fd569bf235aa0fe374 /macros/latex
parentf1ae29b8a3b909322a78bc7bd75a5cbaca0fd75f (diff)
CTAN sync 202411070303
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-en.pdfbin523936 -> 539696 bytes
-rw-r--r--macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-en.tex30
-rw-r--r--macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-fr.pdfbin519983 -> 540801 bytes
-rw-r--r--macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-fr.tex32
-rw-r--r--macros/latex/contrib/coloredbelts/tex/coloredbelts.sty36
-rw-r--r--macros/latex/contrib/coloredbelts/tex/judobelt-blue-brown.pdfbin0 -> 2582 bytes
-rw-r--r--macros/latex/contrib/coloredbelts/tex/judobelt-blue-purple.pdfbin0 -> 2558 bytes
-rw-r--r--macros/latex/contrib/coloredbelts/tex/judobelt-brown-black.pdfbin0 -> 2555 bytes
-rw-r--r--macros/latex/contrib/coloredbelts/tex/judobelt-green-blue.pdfbin0 -> 2564 bytes
-rw-r--r--macros/latex/contrib/coloredbelts/tex/judobelt-orange-green.pdfbin0 -> 2555 bytes
-rw-r--r--macros/latex/contrib/coloredbelts/tex/judobelt-purple-brown.pdfbin0 -> 2559 bytes
-rw-r--r--macros/latex/contrib/coloredbelts/tex/judobelt-white-yellow.pdfbin0 -> 2542 bytes
-rw-r--r--macros/latex/contrib/coloredbelts/tex/judobelt-yellow-orange.pdfbin0 -> 2545 bytes
-rw-r--r--macros/latex/contrib/easybook/README.md2
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx96
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin650514 -> 650699 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex16
-rw-r--r--macros/latex/contrib/inlinegraphicx/README.md5
-rw-r--r--macros/latex/contrib/inlinegraphicx/doc/inlinegraphicx-doc.pdfbin0 -> 158388 bytes
-rw-r--r--macros/latex/contrib/inlinegraphicx/doc/inlinegraphicx-doc.tex267
-rw-r--r--macros/latex/contrib/inlinegraphicx/doc/test_inlinegraphicx.pdfbin0 -> 47985 bytes
-rw-r--r--macros/latex/contrib/inlinegraphicx/tex/inlinegraphicx.sty48
-rw-r--r--macros/latex/contrib/keytheorems/CHANGELOG.md6
-rw-r--r--macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdfbin152757 -> 160412 bytes
-rw-r--r--macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex96
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex11
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex2
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex2
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-beamer-support.tex126
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex2
-rw-r--r--macros/latex/contrib/keytheorems/tex/keytheorems.sty374
-rw-r--r--macros/latex/contrib/sjtutex/sjtutex.dtx30
-rw-r--r--macros/latex/contrib/sjtutex/sjtutex.pdfbin725422 -> 726617 bytes
-rw-r--r--macros/latex/required/amsmath/README.md2
-rw-r--r--macros/latex/required/amsmath/amsbsy.pdfbin174946 -> 174946 bytes
-rw-r--r--macros/latex/required/amsmath/amscd.pdfbin179948 -> 179948 bytes
-rw-r--r--macros/latex/required/amsmath/amsgen.pdfbin178193 -> 178193 bytes
-rw-r--r--macros/latex/required/amsmath/amsldoc.pdfbin508207 -> 508207 bytes
-rw-r--r--macros/latex/required/amsmath/amsmath.dtx66
-rw-r--r--macros/latex/required/amsmath/amsmath.pdfbin422294 -> 420374 bytes
-rw-r--r--macros/latex/required/amsmath/amsopn.pdfbin140093 -> 140093 bytes
-rw-r--r--macros/latex/required/amsmath/amstext.pdfbin217504 -> 217504 bytes
-rw-r--r--macros/latex/required/amsmath/amsxtra.pdfbin113560 -> 113560 bytes
-rw-r--r--macros/latex/required/amsmath/changes.txt9
-rw-r--r--macros/latex/required/amsmath/subeqn.pdfbin109740 -> 109740 bytes
-rw-r--r--macros/latex/required/amsmath/technote.pdfbin147459 -> 147459 bytes
-rw-r--r--macros/latex/required/amsmath/testmath.pdfbin454643 -> 454643 bytes
47 files changed, 925 insertions, 333 deletions
diff --git a/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-en.pdf b/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-en.pdf
index c87afa6ee2..ef7077bd42 100644
--- a/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-en.pdf
+++ b/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-en.tex b/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-en.tex
index 8a86ee0214..e9fec45263 100644
--- a/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-en.tex
+++ b/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-en.tex
@@ -37,8 +37,8 @@
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.0}
-\def\TPdate{30/10/2023}
+\def\TPversion{0.1.1}
+\def\TPdate{04/11/2024}
\def\HtRet{0.45}\def\LgRect{1.5}
\usepackage{tcolorbox}
@@ -101,7 +101,7 @@
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!10]
\hfill
-{\Huge\ColorBelt[Hauteur=2cm]{red}}
+{\Huge\ColorBelt[Height=2cm]{red}~\ColorBelt[Height=2cm]{yellow-orange}}
\hfill~
\bigskip
@@ -110,7 +110,7 @@
\bigskip
-\hfill{\Huge\rotatebox[origin=c]{45}{\ColorBelt{green}}\:\rotatebox[origin=c]{-45}{\ColorBelt{blue}}}\hfill~
+\hfill{\Huge\rotatebox[origin=c]{45}{\ColorBelt{green}}\:\rotatebox[origin=c]{-45}{\ColorBelt{blue}}\:\rotatebox[origin=c]{45}{\ColorBelt{purple-brown}}}\hfill~
\end{tcolorbox}
\vfill~
@@ -127,6 +127,10 @@ The idea is to display a pictogram like "colored judo's belt" to present skills,
The pictograms are \textit{vectorial} \MontreCode{pdf}, made with a \MontreCode{svg}, diffused in CC BY-SA 3.0 (\url{https://fr.wikipedia.org/wiki/Fichier:Judo_yellow_belt.svg}).
+\medskip
+
+I want to thank Sascha Christmann for his help with bi-color belts (both versions aren't equal sized, so be careful with \MontreCode{scale}).
+
\subsection{Loading}
The package loads within the preamble, with \MontreCode{\textbackslash usepackage\{coloredbelts\}}.
@@ -145,7 +149,8 @@ Each pictogram is named like \MontreCode{judobelt-<color>.pdf}, so that they can
\begin{demohigh}[language=latex/latex3,style/main=cyan!10,style/code=cyan!10,style/demo=cyan!10]
\includegraphics[height=5cm]{judobelt-yellow.pdf}\par
-\includegraphics[width=4cm]{judobelt-pink.pdf}
+\includegraphics[width=4cm]{judobelt-pink.pdf}\par
+\includegraphics[width=3cm]{judobelt-orange-green.pdf}
\end{demohigh}
\subsection{Usage}
@@ -184,7 +189,15 @@ Available colors are :
\item \ColorBelt{brown} : \texttt{brown} ;
\item \ColorBelt{purple} : \texttt{purple} ;
\item \ColorBelt{gray} : \texttt{gray} ;
- \item \ColorBelt{black} : \texttt{black}.
+ \item \ColorBelt{black} : \texttt{black} ;
+ \item \ColorBelt{white-yellow} : \texttt{white-yellow} ;
+ \item \ColorBelt{yellow-orange} : \texttt{yellow-orange} ;
+ \item \ColorBelt{orange-green} : \texttt{orange-green} ;
+ \item \ColorBelt{green-blue} : \texttt{green-blue} ;
+ \item \ColorBelt{purple-brown} : \texttt{purple-brown} ;
+ \item \ColorBelt{blue-brown} : \texttt{blue-brown} ;
+ \item \ColorBelt{blue-purple} : \texttt{blue-purple} ;
+ \item \ColorBelt{brown-black} : \texttt{brown-black}.
\end{itemize}
\medskip
@@ -210,13 +223,16 @@ Available colors are :
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
\ColorBelt*[scale=0.25]{orange}\par
-\ColorBelt*[scale=0.15]{yellow}
+\ColorBelt*[scale=0.15]{yellow}\par
+\ColorBelt*[scale=0.3]{green-blue}
\end{demohigh}
\vfill
\section{History}
+\verb|v0.1.1|~:~~~~Bi-color belts
+
\verb|v0.1.0|~:~~~~Initial version
\vspace*{15mm}
diff --git a/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-fr.pdf b/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-fr.pdf
index 2085bc5f88..3ad825d020 100644
--- a/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-fr.pdf
+++ b/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-fr.tex b/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-fr.tex
index 1d57ceaa05..1d60432c77 100644
--- a/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-fr.tex
+++ b/macros/latex/contrib/coloredbelts/doc/coloredbelts-doc-fr.tex
@@ -36,8 +36,8 @@
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.0}
-\def\TPdate{30 octobre 2023}
+\def\TPversion{0.1.1}
+\def\TPdate{04 novembre 2024}
\def\HtRet{0.45}\def\LgRect{1.5}
\usepackage{tcolorbox}
@@ -100,7 +100,7 @@
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!10]
\hfill
-{\Huge\CeintureCouleur[Hauteur=2cm]{red}}
+{\Huge\CeintureCouleur[Hauteur=2cm]{red}~\CeintureCouleur[Hauteur=2cm]{jaune-orange}}
\hfill~
\bigskip
@@ -109,7 +109,7 @@
\bigskip
-\hfill{\Huge\rotatebox[origin=c]{45}{\CeintureCouleur{vert}}\:\rotatebox[origin=c]{-45}{\CeintureCouleur{bleu}}}\hfill~
+\hfill{\Huge\rotatebox[origin=c]{45}{\CeintureCouleur{vert}}\:\rotatebox[origin=c]{-45}{\CeintureCouleur{bleu}}\:\rotatebox[origin=c]{45}{\CeintureCouleur{violet-marron}}}\hfill~
\end{tcolorbox}
\vfill~
@@ -126,6 +126,10 @@ L'idée est de pouvoir intégrer, dans un document \LaTeX, un pictogramme type \
Les logos sont au format (vectoriel) \MontreCode{pdf}, et ont été obtenus à partir d'un fichier \MontreCode{svg}, diffusé sous licence CC BY-SA 3.0 (\url{https://fr.wikipedia.org/wiki/Fichier:Judo_yellow_belt.svg}). Le fichier a servi de base pour les différents coloris.
+\medskip
+
+Je remercie Sascha Christmann pour sa contibrution aux ceintures bicolores (les deux versions n'ont pas les mêmes dimensions initiales, donc attention avec l'utilisation d'un \MontreCode{scale}).
+
\subsection{Chargement}
Le package se charge dans le préambule, via \MontreCode{\textbackslash usepackage\{coloredbelts\}}.
@@ -140,11 +144,12 @@ Les seuls packages chargés sont \MontreCode{graphicx}, \MontreCode{calc} et \Mo
\subsection{Masque de nommage des fichiers}
-Chaque logo est nommé sous la forme \MontreCode{judobelt-<couleur>.pdf}, de sorte que les pictogrammes peuvent être insérés directement via la commande \MontreCode{\textbackslash includegraphics} \textit{classique}.
+Chaque logo est nommé sous la forme \MontreCode{judobelt-<couleur(s)>.pdf}, de sorte que les pictogrammes peuvent être insérés directement via la commande \MontreCode{\textbackslash includegraphics} \textit{classique}.
\begin{demohigh}[language=latex/latex3,style/main=cyan!10,style/code=cyan!10,style/demo=cyan!10]
\includegraphics[height=5cm]{judobelt-yellow.pdf}\par
-\includegraphics[width=4cm]{judobelt-pink.pdf}
+\includegraphics[width=4cm]{judobelt-pink.pdf}\par
+\includegraphics[width=3cm]{judobelt-orange-green.pdf}
\end{demohigh}
\subsection{Fonctionnement}
@@ -183,7 +188,15 @@ Les couleurs diponibles sont :
\item \CeintureCouleur{marron} : \texttt{marron} ;
\item \CeintureCouleur{violet} : \texttt{violet} ;
\item \CeintureCouleur{gris} : \texttt{gris} ;
- \item \CeintureCouleur{noir} : \texttt{noir}.
+ \item \CeintureCouleur{noir} : \texttt{noir} ;
+ \item \CeintureCouleur{blanc-jaune} : \texttt{blanc-jaune} ;
+ \item \CeintureCouleur{jaune-orange} : \texttt{jaune-orange} ;
+ \item \CeintureCouleur{orange-vert} : \texttt{orange-vert} ;
+ \item \CeintureCouleur{vert-bleu} : \texttt{vert-bleu} ;
+ \item \CeintureCouleur{violet-marron} : \texttt{violet-marron} ;
+ \item \CeintureCouleur{bleu-marron} : \texttt{bleu-marron} ;
+ \item \CeintureCouleur{bleu-violet} : \texttt{bleu-violet} ;
+ \item \CeintureCouleur{marron-noir} : \texttt{marron-noir}.
\end{itemize}
\medskip
@@ -209,13 +222,16 @@ Les couleurs diponibles sont :
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
\CeintureCouleur*[scale=0.25]{orange}\par
-\CeintureCouleur*[scale=0.15]{yellow}
+\CeintureCouleur*[scale=0.15]{yellow}\par
+\CeintureCouleur*[scale=0.3]{vert-bleu}
\end{demohigh}
\vfill
\section{Historique}
+\verb|v0.1.1|~:~~~~Couleur "duo"
+
\verb|v0.1.0|~:~~~~Version initiale
\vspace*{15mm}
diff --git a/macros/latex/contrib/coloredbelts/tex/coloredbelts.sty b/macros/latex/contrib/coloredbelts/tex/coloredbelts.sty
index 06d65693a4..84a7734c07 100644
--- a/macros/latex/contrib/coloredbelts/tex/coloredbelts.sty
+++ b/macros/latex/contrib/coloredbelts/tex/coloredbelts.sty
@@ -1,11 +1,13 @@
% Author : C. Pierquet
% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
% licence svg : CC BY-SA 3.0 https://fr.wikipedia.org/wiki/Fichier:Judo_yellow_belt.svg
+% : Tks to Sascha Christmann for "in betweeen" colors
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{coloredbelts}[2023/10/27 0.1.0 Colored Judo's belts]
+\ProvidesPackage{coloredbelts}[2024/11/04 0.1.1 Colored Judo's belts]
%====HISTORIQUE
+% v 0.1.1 Couleurs duo
% v 0.1.0 Version initiale
%====BASE
@@ -48,6 +50,22 @@
\IfStrEq{#3}{gray}{\def\tmp@ceinture@couleur{gray}}{}%
\IfStrEq{#3}{noir}{\def\tmp@ceinture@couleur{black}}{}%
\IfStrEq{#3}{black}{\def\tmp@ceinture@couleur{black}}{}%
+ \IfStrEq{#3}{white-yellow}{\def\tmp@ceinture@couleur{white-yellow}}{}%
+ \IfStrEq{#3}{blanc-jaune}{\def\tmp@ceinture@couleur{white-yellow}}{}%
+ \IfStrEq{#3}{yellow-orange}{\def\tmp@ceinture@couleur{yellow-orange}}{}%
+ \IfStrEq{#3}{jaune-orange}{\def\tmp@ceinture@couleur{yellow-orange}}{}%
+ \IfStrEq{#3}{orange-green}{\def\tmp@ceinture@couleur{orange-green}}{}%
+ \IfStrEq{#3}{orange-vert}{\def\tmp@ceinture@couleur{orange-green}}{}%
+ \IfStrEq{#3}{green-blue}{\def\tmp@ceinture@couleur{green-blue}}{}%
+ \IfStrEq{#3}{vert-bleu}{\def\tmp@ceinture@couleur{green-blue}}{}%
+ \IfStrEq{#3}{purple-brown}{\def\tmp@ceinture@couleur{purple-brown}}{}%
+ \IfStrEq{#3}{violet-marron}{\def\tmp@ceinture@couleur{purple-brown}}{}%
+ \IfStrEq{#3}{blue-brown}{\def\tmp@ceinture@couleur{blue-brown}}{}%
+ \IfStrEq{#3}{bleu-marron}{\def\tmp@ceinture@couleur{blue-brown}}{}%
+ \IfStrEq{#3}{blue-purple}{\def\tmp@ceinture@couleur{blue-purple}}{}%
+ \IfStrEq{#3}{bleu-violet}{\def\tmp@ceinture@couleur{blue-purple}}{}%
+ \IfStrEq{#3}{brown-black}{\def\tmp@ceinture@couleur{brown-black}}{}%
+ \IfStrEq{#3}{marron-noir}{\def\tmp@ceinture@couleur{brown-black}}{}%
%étoilée := includegraphics simple
\IfBooleanTF{#1}%
{%
@@ -98,6 +116,22 @@
\IfStrEq{#3}{gray}{\def\tmp@ceinture@couleur{gray}}{}%
\IfStrEq{#3}{noir}{\def\tmp@ceinture@couleur{black}}{}%
\IfStrEq{#3}{black}{\def\tmp@ceinture@couleur{black}}{}%
+ \IfStrEq{#3}{white-yellow}{\def\tmp@ceinture@couleur{white-yellow}}{}%
+ \IfStrEq{#3}{blanc-jaune}{\def\tmp@ceinture@couleur{white-yellow}}{}%
+ \IfStrEq{#3}{yellow-orange}{\def\tmp@ceinture@couleur{yellow-orange}}{}%
+ \IfStrEq{#3}{jaune-orange}{\def\tmp@ceinture@couleur{yellow-orange}}{}%
+ \IfStrEq{#3}{orange-green}{\def\tmp@ceinture@couleur{orange-green}}{}%
+ \IfStrEq{#3}{orange-vert}{\def\tmp@ceinture@couleur{orange-green}}{}%
+ \IfStrEq{#3}{green-blue}{\def\tmp@ceinture@couleur{green-blue}}{}%
+ \IfStrEq{#3}{vert-bleu}{\def\tmp@ceinture@couleur{green-blue}}{}%
+ \IfStrEq{#3}{purple-brown}{\def\tmp@ceinture@couleur{purple-brown}}{}%
+ \IfStrEq{#3}{violet-marron}{\def\tmp@ceinture@couleur{purple-brown}}{}%
+ \IfStrEq{#3}{blue-brown}{\def\tmp@ceinture@couleur{blue-brown}}{}%
+ \IfStrEq{#3}{bleu-marron}{\def\tmp@ceinture@couleur{blue-brown}}{}%
+ \IfStrEq{#3}{blue-purple}{\def\tmp@ceinture@couleur{blue-purple}}{}%
+ \IfStrEq{#3}{bleu-violet}{\def\tmp@ceinture@couleur{blue-purple}}{}%
+ \IfStrEq{#3}{brown-black}{\def\tmp@ceinture@couleur{brown-black}}{}%
+ \IfStrEq{#3}{marron-noir}{\def\tmp@ceinture@couleur{brown-black}}{}%
%étoilée := includegraphics simple
\IfBooleanTF{#1}%
{%
diff --git a/macros/latex/contrib/coloredbelts/tex/judobelt-blue-brown.pdf b/macros/latex/contrib/coloredbelts/tex/judobelt-blue-brown.pdf
new file mode 100644
index 0000000000..ee212bd73d
--- /dev/null
+++ b/macros/latex/contrib/coloredbelts/tex/judobelt-blue-brown.pdf
Binary files differ
diff --git a/macros/latex/contrib/coloredbelts/tex/judobelt-blue-purple.pdf b/macros/latex/contrib/coloredbelts/tex/judobelt-blue-purple.pdf
new file mode 100644
index 0000000000..246c1e7df7
--- /dev/null
+++ b/macros/latex/contrib/coloredbelts/tex/judobelt-blue-purple.pdf
Binary files differ
diff --git a/macros/latex/contrib/coloredbelts/tex/judobelt-brown-black.pdf b/macros/latex/contrib/coloredbelts/tex/judobelt-brown-black.pdf
new file mode 100644
index 0000000000..5dc4db6d01
--- /dev/null
+++ b/macros/latex/contrib/coloredbelts/tex/judobelt-brown-black.pdf
Binary files differ
diff --git a/macros/latex/contrib/coloredbelts/tex/judobelt-green-blue.pdf b/macros/latex/contrib/coloredbelts/tex/judobelt-green-blue.pdf
new file mode 100644
index 0000000000..11eccd2499
--- /dev/null
+++ b/macros/latex/contrib/coloredbelts/tex/judobelt-green-blue.pdf
Binary files differ
diff --git a/macros/latex/contrib/coloredbelts/tex/judobelt-orange-green.pdf b/macros/latex/contrib/coloredbelts/tex/judobelt-orange-green.pdf
new file mode 100644
index 0000000000..e23cbe5c33
--- /dev/null
+++ b/macros/latex/contrib/coloredbelts/tex/judobelt-orange-green.pdf
Binary files differ
diff --git a/macros/latex/contrib/coloredbelts/tex/judobelt-purple-brown.pdf b/macros/latex/contrib/coloredbelts/tex/judobelt-purple-brown.pdf
new file mode 100644
index 0000000000..6259c44467
--- /dev/null
+++ b/macros/latex/contrib/coloredbelts/tex/judobelt-purple-brown.pdf
Binary files differ
diff --git a/macros/latex/contrib/coloredbelts/tex/judobelt-white-yellow.pdf b/macros/latex/contrib/coloredbelts/tex/judobelt-white-yellow.pdf
new file mode 100644
index 0000000000..e3e5aae220
--- /dev/null
+++ b/macros/latex/contrib/coloredbelts/tex/judobelt-white-yellow.pdf
Binary files differ
diff --git a/macros/latex/contrib/coloredbelts/tex/judobelt-yellow-orange.pdf b/macros/latex/contrib/coloredbelts/tex/judobelt-yellow-orange.pdf
new file mode 100644
index 0000000000..b55863b31e
--- /dev/null
+++ b/macros/latex/contrib/coloredbelts/tex/judobelt-yellow-orange.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md
index c7a2aae1f7..cadaeb3921 100644
--- a/macros/latex/contrib/easybook/README.md
+++ b/macros/latex/contrib/easybook/README.md
@@ -1,5 +1,5 @@
# The `easybook` document class
-Easily typesetting Chinese theses or books (v2024ha)
+Easily typesetting Chinese theses or books (v2024hb)
## Abstract
`easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of `book` and `article` document class. Combined with the general framework design of the theses of many universities in China, providing multiple commands and interfaces allows users to easily customize the theses templates. Its basic macro package `easybase` can also be used with `ctex` and standard document classes.
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 655cc1b9a3..c82866c447 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
%<*class>
-\ProvidesExplClass{easybook}{2024/11/05}{2024ha}
+\ProvidesExplClass{easybook}{2024/11/06}{2024hb}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -302,7 +302,7 @@
%</class>
%<*package>
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/11/05}{2024ha}
+\ProvidesExplPackage{easybase}{2024/11/06}{2024hb}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -731,13 +731,13 @@
{ \tl_clear:N \l__eb_fntext_after_tl }
{ \tl_set:Nn \l__eb_fntext_after_tl {#2} }
}
-\cs_new_protected:Npn \eb_fnmarktext_counter_pifont:N #1
+\cs_new_protected:Npn \eb_fnnormal_counter_pifont:N #1
{ \ding{\int_eval:n { 171 + #1 }} }
-\cs_new_protected:Npn \eb_fnmarktext_counter_pifont_neg:N #1
+\cs_new_protected:Npn \eb_fnnormal_counter_pifont_neg:N #1
{ \ding{\int_eval:n { 181 + #1 }} }
-\cs_new_protected:Npn \eb_fnmarktext_counter_pisans:N #1
+\cs_new_protected:Npn \eb_fnnormal_counter_pisans:N #1
{ \ding{\int_eval:n { 191 + #1 }} }
-\cs_new_protected:Npn \eb_fnmarktext_counter_pisans_neg:N #1
+\cs_new_protected:Npn \eb_fnnormal_counter_pisans_neg:N #1
{ \ding{\int_eval:n { 201 + #1 }} }
\cs_new:Npn \eb_fnt_map_symbols_list:n #1
{
@@ -775,25 +775,25 @@
\UseFntSymbsList{empty}
\cs_set_eq:NN \DefineFntSymbols \SetFntSymbsList
\cs_set_eq:NN \setfntsymbol \UseFntSymbsList
-\tl_new:N \l__eb_fnmarktext_tmpa_tl
-\tl_new:N \l__eb_fnmarktext_tmpb_tl
-\cs_new_protected:Npn \eb_fnmarktext_normal_label_set:Nn #1#2
+\tl_new:N \l__eb_fnnormal_tmpa_tl
+\tl_new:N \l__eb_fnnormal_tmpb_tl
+\cs_new_protected:Npn \eb_fnnormal_normal_label_set:Nn #1#2
{
- \tl_set:Nn \l__eb_fnmarktext_tmpa_tl {#2}
+ \tl_set:Nn \l__eb_fnnormal_tmpa_tl {#2}
\cs_set:Npx #1
{
- \str_case:VnT \l__eb_fnmarktext_tmpa_tl
+ \str_case:VnT \l__eb_fnnormal_tmpa_tl
{
{ plain }
{ \exp_not:N \int_use:N }
{ pifont }
- { \eb_fnmarktext_counter_pifont:N }
+ { \eb_fnnormal_counter_pifont:N }
{ pifont* }
- { \eb_fnmarktext_counter_pifont_neg:N }
+ { \eb_fnnormal_counter_pifont_neg:N }
{ pisans }
- { \eb_fnmarktext_counter_pisans:N }
+ { \eb_fnnormal_counter_pisans:N }
{ pisans* }
- { \eb_fnmarktext_counter_pisans_neg:N }
+ { \eb_fnnormal_counter_pisans_neg:N }
}
{ \exp_not:N \c@footnote }
}
@@ -815,9 +815,9 @@
c = \exp_args:NV \zhnumber,
s = \eb_int_to_symbols:n
}
-\cs_new_protected:Npn \eb_fnmarktext_short_label_set:Nn #1#2
+\cs_new_protected:Npn \eb_fnnormal_short_label_set:Nn #1#2
{
- \tl_set:Nn \l__eb_fnmarktext_tmpb_tl {#2}
+ \tl_set:Nn \l__eb_fnnormal_tmpb_tl {#2}
\clist_map_inline:nn
{ A,a,1,I,i,c,s }
{
@@ -825,8 +825,8 @@
{
\regex_replace_once:nnN {##1}
{ \c{eb_footnote_int_trans:n}\0 }
- \l__eb_fnmarktext_tmpb_tl
- \cs_set:Npx #1 { \l__eb_fnmarktext_tmpb_tl }
+ \l__eb_fnnormal_tmpb_tl
+ \cs_set:Npx #1 { \l__eb_fnnormal_tmpb_tl }
\clist_map_break:
}
{
@@ -865,7 +865,7 @@
{ \tl_set:Nn \l__eb_footnote_value_tl {#1} }
}
}
-\cs_new_protected:Npn \eb_fnmarktext_move_set:nnn #1#2#3
+\cs_new_protected:Npn \eb_fnnormal_move_set:nnn #1#2#3
{
\str_if_eq:nnTF {#1} { match }
{
@@ -884,7 +884,7 @@
}
}
-\tl_new:N \l__eb_fnmarktext_format_tl
+\tl_new:N \l__eb_fnnormal_format_tl
\tl_new:N \l__eb_fncustom_format_tl
\clist_new:N \l__eb_footnote_value_clist
\ctex_define:nn { hdr }
@@ -901,33 +901,35 @@
fntext-pos .initial:n = super,
fntext-code .code:n = \eb_assign_fntext_code:n {#1},
fntext-code .initial:n = { ,\tl_if_eq:NnF \l__eb_fntext_position_tl { super } { ~ } },
- fnmarktext-format .code:n = \eb_fnboth_format_set:nn {#1} { marktext },
+ fnnormal-format .code:n = \eb_fnboth_format_set:nn {#1} { normal },
fncustom-format .code:n = \eb_fnboth_format_set:nn {#1} { custom },
- fnboth-format .meta:n = { fnmarktext-format = {#1},fncustom-format = {#1} },
+ fnmarktext-format .meta:n = { fnnormal-format = {#1} },
+ fnboth-format .meta:n = { fnnormal-format = {#1},fncustom-format = {#1} },
footnotetype .multichoices:nn =
{ plain,hang,bottom,para,flush }
{ \eb_footnote_value_handle:n {#1} },
footnotetype .value_required:n = true,
footnotetype/default .meta:n = { footnotetype = plain },
footnotetype .initial:n = hang,
- fnmark-vmove .code:n = \eb_fnmarktext_move_set:nnn {#1} { mark } { v },
- fnmark-hmove .code:n = \eb_fnmarktext_move_set:nnn {#1} { mark } { h },
- fntext-vmove .code:n = \eb_fnmarktext_move_set:nnn {#1} { text } { v },
+ fnmark-vmove .code:n = \eb_fnnormal_move_set:nnn {#1} { mark } { v },
+ fnmark-hmove .code:n = \eb_fnnormal_move_set:nnn {#1} { mark } { h },
+ fntext-vmove .code:n = \eb_fnnormal_move_set:nnn {#1} { text } { v },
fnmark-vmove .initial:n = 0pt,
fnmark-hmove .initial:n = 0pt,
fntext-vmove .initial:n = 0pt,
fnmark-num .choices:nn =
{ plain,pifont,pifont*,pifont-sans,pifont-sans* }
- { \eb_fnmarktext_normal_label_set:Nn \theupfootnote {#1} },
+ { \eb_fnnormal_normal_label_set:Nn \theupfootnote {#1} },
fnmark-num .value_required:n = true,
- fnmark-num/unknown .code:n = \eb_fnmarktext_short_label_set:Nn \theupfootnote {#1},
+ fnmark-num/unknown .code:n = \eb_fnnormal_short_label_set:Nn \theupfootnote {#1},
fntext-num .choices:nn =
{ plain,pifont,pifont*,pifont-sans,pifont-sans* }
- { \eb_fnmarktext_normal_label_set:Nn \thefootnote {#1} },
+ { \eb_fnnormal_normal_label_set:Nn \thefootnote {#1} },
fntext-num .value_required:n = true,
- fntext-num/unknown .code:n = \eb_fnmarktext_short_label_set:Nn \thefootnote {#1},
- fnmarktext-num .meta:n = { fntext-num = {#1},fnmark-num = {#1} },
- fnmarktext-num .initial:n = plain,
+ fntext-num/unknown .code:n = \eb_fnnormal_short_label_set:Nn \thefootnote {#1},
+ fnnormal-num .meta:n = { fntext-num = {#1},fnmark-num = {#1} },
+ fnnormal-num .initial:n = plain,
+ fnmarktext-num .meta:n = { fnnormal-num = {#1} },
unknown .code:n = \eb_msg_deprecated_option:n { hdr }
}
@@ -1190,33 +1192,33 @@
\ProvideDocumentCommand{\super}{mo}{\textsuperscript{#1}}
\providecommand{\spbset}{\use_none:n}
-\NewDocumentCommand{\eb@fnmarktext@super}{sm}
+\NewDocumentCommand{\eb@fnnormal@super}{sm}
{
\IfBooleanTF{#1}
{\super{#2}[vmove = \l__eb_fntext_vmove_tl,nohmove]}
{
- \super{\l__eb_fnmarktext_format_tl{#2}}[
+ \super{\l__eb_fnnormal_format_tl{#2}}[
vmove = \l__eb_fnmark_vmove_tl,
hmove = \l__eb_fnmark_hmove_tl
]
}
}
\bool_set_true:N \l__eb_normal_footnote_bool
-\bool_new:N \l__eb_fnmarktext_format_match_bool
+\bool_new:N \l__eb_fnnormal_format_match_bool
\bool_new:N \l__eb_fncustom_format_match_bool
\cs_new_protected:Npn \ifnormalfnt #1#2
{ \bool_if:NTF \l__eb_normal_footnote_bool {#1} {#2} }
-\cs_new:Npn \eb_fnmarktext_format_clear:n #1
+\cs_new:Npn \eb_fnnormal_format_clear:n #1
{
\bool_if:cTF { l__eb_fn#1_format_match_bool }
- { \tl_clear:N \l__eb_fnmarktext_format_tl }
+ { \tl_clear:N \l__eb_fnnormal_format_tl }
{ \spbset{spcmd = { }} }
}
-\cs_new_protected:Npn \eb_fnmarktext_format_initial:
+\cs_new_protected:Npn \eb_fnnormal_format_initial:
{
\bool_if:NTF \l__eb_normal_footnote_bool
- { \eb_fnmarktext_format_clear:n { marktext } }
- { \eb_fnmarktext_format_clear:n { custom } }
+ { \eb_fnnormal_format_clear:n { normal } }
+ { \eb_fnnormal_format_clear:n { custom } }
\eb@font@footnote
}
\cs_new_protected:Npn \defupfntmark #1
@@ -1227,18 +1229,18 @@
{ \tl_if_eq:NnTF \@mpfn { footnote } }
\defupfntmark
{
- \eb_fnmarktext_format_initial:
- \eb@fnmarktext@super{\notminipage{\@the@up@fnmark}{\@thefnmark}}
+ \eb_fnnormal_format_initial:
+ \eb@fnnormal@super{\notminipage{\@the@up@fnmark}{\@thefnmark}}
}
\defdownfntmark
{
- \eb_fnmarktext_format_initial:
+ \eb_fnnormal_format_initial:
\tl_if_eq:NnTF \l__eb_fntext_position_tl { super }
- { \eb@fnmarktext@super* }
+ { \eb@fnnormal@super* }
{ \use:n }
{
\tl_use:N \l__eb_fntext_before_tl
- { \l__eb_fnmarktext_format_tl{\@thefnmark} }
+ { \l__eb_fnnormal_format_tl{\@thefnmark} }
}
\tl_use:N \l__eb_fntext_after_tl
}
@@ -1261,7 +1263,7 @@
\bool_if:NF \l__eb_fncustom_format_match_bool
{
\tl_set_eq:NN
- \l__eb_fnmarktext_format_tl \l__eb_fncustom_format_tl
+ \l__eb_fnnormal_format_tl \l__eb_fncustom_format_tl
}
}
\NewDocumentCommand{\Footnote}{O{#2}m+m}
@@ -2973,7 +2975,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/11/05}{2024ha}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/11/06}{2024hb}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 4d465bdcf1..0f19aa17b3 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 2653263ac3..5a348891c2 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024ha,
- date = 2024/11/05,
+ version = v2024hb,
+ date = 2024/11/06,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
@@ -792,7 +792,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\end{cnltxlist}
\subsection[脚注]{脚注\smodule{hdr}}
-模块 \module*{hdr} 还可以灵活调整脚注编号和内容的格式。格式主要包括脚注标记的编号类型、字体、附加符号和对齐方式等,以及脚注内容的首行缩进、行距和字体等。基本思想是提供常规和自定义(\code{fncustom})两种脚注标记,常规脚注的标记分为正文(\code{fnmark})和内容(\code{fntext})标记两种,且两者编号类型分离,自定义脚注的标记默认与其共享格式。目前脚注模块基本兼容 \pkg*{footmisc} 宏包。
+模块 \module*{hdr} 还可以灵活调整脚注编号和内容的格式。格式主要包括脚注标记的编号类型、字体、附加符号和对齐方式等,以及脚注内容的首行缩进、行距和字体等。基本思想是提供常规(\code{fnnormal})和自定义(\code{fncustom})两种脚注标记,常规脚注标记又分为正文(\code{fnmark})和内容(\code{fntext})标记,默认情况下正文和内容标记编号类型分离但格式一致,自定义标记与常规标记格式一致。目前脚注模块基本兼容 \pkg*{footmisc} 宏包。
\begin{cnltxlist}
\keychoice{footnotetype}{plain,\fbox{hang},flush,bottom}
脚注的类型。悬挂缩进 \code{hang} 是默认值,\code{plain} 是原始的类型,\code{flush} 使脚注内容标记位于脚注首行边缘外侧并右对齐。当存在浮动环境排版时,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端。其中 \code{bottom} 是复合选项,可以与前三种类型重复或复合使用:
@@ -834,7 +834,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\end{cnltxlist}
\keychoice{fntext-num}{\fbox{plain},pifont,pifont*,pisans,pisans*,\optpath*{short num}}
脚注内容标记编号的类型。用法与 \option{fnmark-num} 一样,所以脚注内容与正文标记编号类型\textbf{可以不同}。
- \keychoice{fnmarktext-num}{\fbox{plain},pifont,pifont*,pisans,pisans*,\optpath*{short num}}
+ \keychoice{fnnormal-num}{\fbox{plain},pifont,pifont*,pisans,pisans*,\optpath*{short num}}
同时设定脚注正文标记编号 \option{fnmark-num} 与脚注内容标记编号 \option{fntext-num} 的类型。目前脚注编号类型选项对于迷你页环境 \env*{minipage} 无效,其中的脚注保持默认英文字母的编号类型。
\keychoice{fnmark-vmove}{\optpath*{fixed length},match}\Default{0pt}
脚注正文标记的垂直偏移。可以设为刚性长度,或用 \code{match} 匹配 \option{spvmove} 全局的值。
@@ -842,15 +842,15 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
脚注正文标记的水平偏移。可以设为刚性长度,或用 \code{match} 匹配 \option{sphmove} 全局的值。
\keychoice{fntext-vmove}{\optpath*{fixed length},match}\Default{0pt}
脚注内容标记的垂直偏移。可以设为刚性长度,或用 \code{match} 匹配 \option{spvmove} 全局的值。
- \keychoice{fnmarktext-format}{\optpath*{format code},match}
- 默认脚注标记的格式,选项 \code{match} 可以匹配 \option{spcmd} 全局的值。一般配合 \keyis{fnmarktext-num}{plain} 原生编号形式使用,例如用 \pkg*{circledtext} 宏包的带圈字符命令 \cs{circledtext} 给脚注标记添加圆圈:
+ \keychoice{fnnormal-format}{\optpath*{format code},match}
+ 常规脚注标记的格式,选项 \code{match} 可以匹配 \option{spcmd} 全局的值。一般配合 \keyis{fnnormal-num}{plain} 原生编号形式使用,例如用 \pkg*{circledtext} 宏包的带圈字符命令 \cs{circledtext} 给脚注标记添加圆圈:
\begin{ctexexam}
\usepackage{circledtext}
\circledtextset{resize = real,width = 0.5em}
\ebhdrset
{
fntext-pos = normal,
- fnmarktext-format = \circledtext
+ fnnormal-format = \circledtext
}
\end{ctexexam}
\command{defupfntmark}[\marg{正文标记格式}]
@@ -884,7 +884,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\end{ctexexam}
\end{cnltxlist}
\keychoice{fnboth-format}{\optpath*{format code},match}
- 同时设定默认脚注标记 \option{fnmarktext-format} 和自定义脚注标记 \option{fncustom-format} 的格式。两种脚注标记匹配上标格式 \option{spcmd} 的值是独立的,使用 \code{match} 则可以同时匹配。会覆盖 \module*{font} 模块脚注字体选项 \option{footnote} 相同类型的命令,最后一个格式命令可以带有一个参数接受脚注标记。
+ 同时设定常规脚注标记 \option{fnnormal-format} 和自定义脚注标记 \option{fncustom-format} 的格式。两种脚注标记匹配上标格式 \option{spcmd} 的值是独立的,使用 \code{match} 则可以同时匹配。会覆盖 \module*{font} 模块脚注字体选项 \option{footnote} 相同类型的命令,最后一个格式命令可以带有一个参数接受脚注标记。
\keyval{fnpara-format}{格式代码}
脚注内容文本的格式。会覆盖 \module*{font} 模块脚注字体选项 \option{footnote} 相同类型的命令,最后一个格式命令可以带有一个参数接受脚注内容文本。
\kvsplit{fntext-code}{前代码,后代码}
diff --git a/macros/latex/contrib/inlinegraphicx/README.md b/macros/latex/contrib/inlinegraphicx/README.md
new file mode 100644
index 0000000000..0bc0572b53
--- /dev/null
+++ b/macros/latex/contrib/inlinegraphicx/README.md
@@ -0,0 +1,5 @@
+inlinegraphicx is a package with 'inline graphicx insertion', with automatic size and position.
+-----------------------------------------------------------------------------------------------
+Author : Cédric Pierquet
+email : cpierquet@outlook.fr
+Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt \ No newline at end of file
diff --git a/macros/latex/contrib/inlinegraphicx/doc/inlinegraphicx-doc.pdf b/macros/latex/contrib/inlinegraphicx/doc/inlinegraphicx-doc.pdf
new file mode 100644
index 0000000000..a75191f277
--- /dev/null
+++ b/macros/latex/contrib/inlinegraphicx/doc/inlinegraphicx-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/inlinegraphicx/doc/inlinegraphicx-doc.tex b/macros/latex/contrib/inlinegraphicx/doc/inlinegraphicx-doc.tex
new file mode 100644
index 0000000000..45bd45caa2
--- /dev/null
+++ b/macros/latex/contrib/inlinegraphicx/doc/inlinegraphicx-doc.tex
@@ -0,0 +1,267 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
+
+\documentclass[11pt,a4paper]{ltxdoc}
+\usepackage{bera}
+\usepackage{inconsolata}
+\usepackage[T1]{fontenc}
+\usepackage[scale=0.875]{cabin}
+\usepackage{inlinegraphicx}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\usepackage{tabularray}
+\usepackage{fontawesome5}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [inlinegraphicx]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+\usepackage{hologo}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\let\TikZ\tikzlogo
+
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=2cm]{geometry}
+\setlength{\parindent}{0pt}
+\def\TPversion{0.1.0}
+\def\TPdate{06/11/2024}
+\usepackage{tcolorbox}
+\usepackage{pgffor}
+\tcbuselibrary{breakable,skins,hooks,listingsutf8}
+%\usepackage{soul}
+%\sethlcolor{lightgray!25}
+
+\lstset{
+ language=[LaTeX]TeX,%
+ basicstyle=\ttfamily,%
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={inlinegraphicx,calc,simplekv,graphicx},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\inlinegraphics,\includegraphics},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={scale,strut},%
+ keywordstyle={\color{orange!75!black}}
+}
+
+\newtcblisting{DemoCode}[1]{%
+ enhanced,width=\linewidth,%
+ bicolor,size=title,%
+ colback=cyan!10!white,%
+ colbacklower=cyan!5!white,%
+ colframe=cyan!75!black,%
+ listing options={%
+ breaklines=true,%
+ breakatwhitespace=true,%
+ style=tcblatex,basicstyle=\small\ttfamily,%
+ tabsize=4,%
+ commentstyle={\itshape\color{gray}},
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={\usepackage,\includegraphics,xstring,listofitems,tikz,calc,simplekv,graphicx,\readlist,\showitems,\xintFor,\xintSeq,\draw,\node},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={euromoney},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\inlinegraphics,\includegraphics},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={scale,strut},%
+ keywordstyle={\color{orange!75!black}}
+ },%
+ #1
+}
+
+\newtcbinputlisting\DemoCodeFile[1]{%
+ enhanced,width=\linewidth,%
+ bicolor,size=title,%
+ colback=lightgray!10!white,%
+ colbacklower=lightgray!5!white,%
+ colframe=lightgray!75!black,%
+ listing options={%
+ breaklines=true,%
+ breakatwhitespace=true,%
+ style=tcblatex,
+ basicstyle=\scriptsize\ttfamily,%
+ tabsize=4,%
+ commentstyle={\itshape\color{gray}},%
+ %lastline=148
+ },%
+ breakable,
+ listing only,%
+ listing file={#1}
+}
+
+\NewDocumentCommand\ShowCode{ m }{%
+ \colorbox{lightgray!50}{\lstinline!#1!}%
+}
+
+\begin{document}
+
+\thispagestyle{empty}
+
+\begin{center}
+ \begin{minipage}{0.88\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \renewcommand{\arraystretch}{1.25}%
+ \begin{tabular}{c}
+ {\Huge \texttt{inlinegraphicx}}\\
+ \\
+ {\LARGE Includegraphics, with an} \\
+ {\LARGE automatic inline positioning.} \\
+ \\
+ {\small \texttt{Version \TPversion{} -- \TPdate}}
+ \end{tabular}
+ \end{center}
+ \end{tcolorbox}
+ \end{minipage}
+\end{center}
+
+\begin{center}
+ \begin{tabular}{c}
+ \texttt{Cédric Pierquet}\\
+ {\ttfamily c pierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://github.com/cpierquet/inlinegraphicx}} \\
+ \end{tabular}
+\end{center}
+
+\hrule
+
+\vfill
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+{Inline insertion, \inlinegraphics{example-image-16x10} with automatic adjustments.}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\sffamily{\LARGE Inline insertion, \inlinegraphics{example-image-16x10} with automatic adjustments.}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+{Inline insertion, \inlinegraphics*{example-image-16x10} with automatic adjustments but without depth.}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\scalebox{2.25}[2.25]{Inline \inlinegraphics[scale=0.825]{example-image-16x10} proof with small resizing.}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\sffamily{\LARGE Inline insertion, (\inlinegraphics[strut={()}]{example-image-16x10}) with automatic adjustments and choice of optimal height.}
+\end{tcolorbox}
+
+\vfill~
+
+\vspace*{5mm}
+
+\pagebreak
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+%\hrule
+
+\pagebreak
+
+\section{Loading, useful packages}
+
+In order to load \ShowCode{inlinegraphicx}, simply use:
+
+\begin{DemoCode}{listing only}
+\usepackage{inlinegraphicx}
+\end{DemoCode}
+
+Loaded packages are \ShowCode{graphicx}, \ShowCode{simplekv} and \ShowCode{calc}.
+
+\section{Usage}
+
+The purpose of this package is to provide command, based on \ShowCode{\\includegraphics}, to insert graphic elements \textit{inline}, with automatic positioning and scaling.
+
+\smallskip
+
+The code determines (total)height and, if necessary, depth of letters in the current font, in order to position the image correctly :
+
+\begin{itemize}
+ \item (total)height is given by (total)height of {\setlength\fboxsep{0pt}\fbox{qH}} in the current font ;
+ \item depth is given by depth of {\setlength\fboxsep{0pt}\fbox{qH}} in the current font.
+\end{itemize}
+
+In order to adjust manually size/positioning, \ShowCode{[keys]} are available.
+
+\begin{DemoCode}{text only}
+\includegraphics[scale=3]{test_inlinegraphicx}
+\end{DemoCode}
+
+\section{The macro}
+
+\subsection{Arguments}
+
+The macro for inline insertion is \ShowCode{\\inlinegraphics}.
+
+\begin{DemoCode}{listing only}
+\inlinegraphics(*)[scale=...,strut=...]{image}
+\end{DemoCode}
+
+The starred version remove depth positioning, wheres normal version include depth.
+
+Available keys are:
+
+\begin{itemize}
+ \item \ShowCode{scale}: re-scaling of compute height (default \ShowCode{1}) ;
+ \item \ShowCode{strut}: characters for height/depth (default \ShowCode{qH}).
+\end{itemize}
+
+\subsection{Examples}
+
+\begin{DemoCode}{}
+Inline insertion, \inlinegraphics{example-image-16x10} with automatic adjustments.
+
+Inline insertion, \inlinegraphics[scale=0.75]{example-image-16x10} with automatic adjustments and scaling.
+
+Inline insertion, \inlinegraphics*{example-image-16x10} with automatic adjustments and without depth.
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\scalebox{3}[3]{Inline (\inlinegraphics[strut={()}]{example-image-16x10}) q\inlinegraphics{example-image-16x10}H insertion}.
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\sffamily{\Huge Inline (\inlinegraphics[strut={()}]{example-image-16x10}) q\inlinegraphics{example-image-16x9}H insertion}.
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\ttfamily{\LARGE Inline (\inlinegraphics[strut={(É)}]{example-image-16x10}É) q\inlinegraphics{example-image-16x10}H insertion}.
+\end{DemoCode}
+
+\pagebreak
+
+\section{History}
+
+\texttt{0.1.0: Initial version}
+
+\section{The code}
+
+\DemoCodeFile{inlinegraphicx.sty}
+
+\end{document}
diff --git a/macros/latex/contrib/inlinegraphicx/doc/test_inlinegraphicx.pdf b/macros/latex/contrib/inlinegraphicx/doc/test_inlinegraphicx.pdf
new file mode 100644
index 0000000000..77bf604f35
--- /dev/null
+++ b/macros/latex/contrib/inlinegraphicx/doc/test_inlinegraphicx.pdf
Binary files differ
diff --git a/macros/latex/contrib/inlinegraphicx/tex/inlinegraphicx.sty b/macros/latex/contrib/inlinegraphicx/tex/inlinegraphicx.sty
new file mode 100644
index 0000000000..d4b696c2e4
--- /dev/null
+++ b/macros/latex/contrib/inlinegraphicx/tex/inlinegraphicx.sty
@@ -0,0 +1,48 @@
+% Author : C. Pierquet
+% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{inlinegraphicx}[2024/11/06 0.1.0 Insert inline graphicx]
+
+%====HISTORY
+% v 0.1.0 Initial version
+
+%====BASE
+\RequirePackage{graphicx}
+\RequirePackage{calc}
+\RequirePackage{simplekv}
+
+%====DIMENSIONS
+\newlength{\totheightinlinegraphicx}
+\newlength{\depthinlinegraphicx}
+\newlength{\inlinedepthgraphicsscale}
+
+%====KEYS
+\defKV[inlinegraphics]{scale=\def\inlinegraphicsscale{#1},strut=\def\inlinegraphicstrut{#1}}
+\setKVdefault[inlinegraphics]{scale=1,strut={qH}}
+
+%====MACRO
+\NewDocumentCommand\inlinegraphics{ s O{} m }{%
+ %1 = no depth/raisebox
+ %2 = keys (scale + strut)
+ %3 = file
+ \restoreKV[inlinegraphics]%
+ \setKV[inlinegraphics]{#2}%
+ \IfBooleanTF{#1}%
+ {%
+ \settoheight{\totheightinlinegraphicx}{\hbox{\inlinegraphicstrut}}%
+ \includegraphics[height=\inlinegraphicsscale\totheightinlinegraphicx]{#3}%
+ }%
+ {%
+ \settototalheight{\totheightinlinegraphicx}{\hbox{\inlinegraphicstrut}}%
+ \settodepth{\depthinlinegraphicx}{\hbox{\inlinegraphicstrut}}%
+ \xdef\inlinegraphicsinvscale{\fpeval{0.5*(1-\inlinegraphicsscale)}}%
+ \setlength{\inlinedepthgraphicsscale}%
+ {\dimexpr\depthinlinegraphicx-\inlinegraphicsinvscale\totheightinlinegraphicx\relax}%
+ \raisebox{-\inlinedepthgraphicsscale}{%
+ \includegraphics[height=\inlinegraphicsscale\totheightinlinegraphicx]{#3}%
+ }%
+ }%
+}
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/keytheorems/CHANGELOG.md b/macros/latex/contrib/keytheorems/CHANGELOG.md
index de5d3ac354..264b5ab071 100644
--- a/macros/latex/contrib/keytheorems/CHANGELOG.md
+++ b/macros/latex/contrib/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/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf
index 59baedc317..fba3279b98 100644
--- a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf
+++ b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex
index 2af490c35e..464d92e2d2 100644
--- a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex
+++ b/macros/latex/contrib/keytheorems/doc/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}
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex
index 69d70e3149..b5b2b87683 100644
--- a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex
@@ -27,10 +27,6 @@
headindent = \@acmplainindent,
notefont = \@acmplainnotefont,
postheadspace = .5em,
- spaceabove =
- .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
- spacebelow =
- .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
}
\keys_define:nn { keytheorems/thmstyle }
{
@@ -81,12 +77,5 @@
}
}
}
- { % the amsart defaults
- \prop_gput_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
- {
- spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
- spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
- }
- }
\file_input_stop: \ No newline at end of file
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex
index 262e41db1b..0471de9cc9 100644
--- a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex
@@ -10,8 +10,6 @@
{
headfont = \scshape,
headindent = \parindent,
- spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
- spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
}
\keys_define:nn { keytheorems/thmstyle }
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex
index e941bf6c08..03867f28ca 100644
--- a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex
@@ -10,8 +10,6 @@
{
headfont = \scshape,
headindent = \parindent,
- spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
- spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
}
\keys_define:nn { keytheorems/thmstyle }
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-beamer-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-beamer-support.tex
index 7500327148..734c5e36df 100644
--- a/macros/latex/contrib/keytheorems/tex/class-support/keythms-beamer-support.tex
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-beamer-support.tex
@@ -9,7 +9,7 @@
{
\protect\listofkeytheorems\space not~supported~with~beamer
}
-\RenewDocumentCommand \listofkeytheorems { o }
+\RenewDocumentCommand \listofkeytheorems { +o }
{
\msg_warning:nn { keytheorems } { beamer-listof }
}
@@ -25,52 +25,100 @@
preheadhook = \def\inserttheoremblockenv{exampleblock},
}
}
-\keys_define:nn { keytheorems/thm }
- { % redefine key to include \thm@headsep
- tcolorbox-no-titlebar .meta:n =
+
+\cs_set_protected:Npn \__keythms_thm_tcbcode:nn #1#2
+ { % #1 = name, #2 = tcolorbox keys
+ \__keythms_thm_tcbshared:nn { #1 } { #2 }
+ \tl_gput_left:cn { g__keythms_thm_preheadfromkeys_#1_tl }
{
- tcolorbox={
- notitle,
- before~upper={
- \group_begin:
- \usebeamerfont*{block title}
- \__keythms_thm_tcboxtemphead:
- \hskip\thm@headsep
- \group_end:
- },
- #1
- }
- },
+ \cs_set:Npn \inserttheoremblockenv { keythms_beamer_tcb }
+ }
}
-\cs_set_protected:Npn \__keythms_thm_tcboxcode:nn #1#2
+\cs_set_protected:Npn \__keythms_thm_tcbnotitlebarcode:nn #1#2
{ % #1 = name, #2 = tcolorbox keys
+ \__keythms_thm_tcbshared:nn { #1 } { #2 }
+ \tl_gput_left:cn { g__keythms_thm_preheadfromkeys_#1_tl }
+ {
+ \cs_set:Npn \inserttheoremblockenv { keythms_beamer_tcbnotitlebar }
+ }
+ }
+\cs_set_protected:Npn \__keythms_thm_tcbshared:nn #1#2
+ {
\RequirePackage{tcolorbox}
+ \AddToHook{env/#1/begin}
+ { % fix labels adding extra space
+ \keys_define:nn { keytheorems/thmuse }
+ { label .code:n = \tcbset{ phantom = { \label{##1} } } }
+ }
\tcbset
{
- keythms_tcbox_#1/.style =
+ keythms_tcb_#1/.style =
{
savedelimiter=#1,
#2
}
}
- \tl_gput_left:cn { g__keythms_thm_preheadfromkeys_#1_tl }
- {
- \cs_set_protected:Npn \thm@space@setup { \thm@preskip=0pt \thm@postskip=0pt }
- \cs_set:Npn \inserttheoremblockenv { keythms_beamer_tcbox }
- }
+ \tl_if_empty:NTF \l__keythms_thm_style_tl
+ {
+ \tl_set_eq:NN \l__keythms_thm_tempstyle_tl
+ \l__keythms_thm_currentthmstyle_tl
+ }
+ { \tl_set_eq:NN \l__keythms_thm_tempstyle_tl \l__keythms_thm_style_tl }
+ \tl_gput_right:ce { g__keythms_thm_preheadfromkeys_#1_tl }
+ { % don't mess with tcolorbox defaults unless explicitly asked to in style
+ \exp_not:N \tl_put_right:cn { th@ \l__keythms_thm_tempstyle_tl }
+ { \thm@preskip=0pt \thm@postskip=0pt }
+ }
+ \tl_if_exist:cT
+ { g__keythms_thmstyle_ \l__keythms_thm_tempstyle_tl _tcbspaceabove_skip }
+ {
+ \exp_args:Ne \tcbset
+ {
+ keythms_tcb_#1/.prefix~style =
+ {
+ before~skip =
+ \skip_use:c { g__keythms_thmstyle_ \l__keythms_thm_tempstyle_tl _tcbspaceabove_skip }
+ }
+ }
+ }
+ \tl_if_exist:cT
+ { g__keythms_thmstyle_ \l__keythms_thm_tempstyle_tl _tcbspacebelow_skip }
+ {
+ \exp_args:Ne \tcbset
+ {
+ keythms_tcb_#1/.prefix~style =
+ {
+ after~skip =
+ \skip_use:c { g__keythms_thmstyle_ \l__keythms_thm_tempstyle_tl _tcbspacebelow_skip }
+ }
+ }
+ }
}
-\NewDocumentEnvironment{ keythms_beamer_tcbox }{ m d<> }
+\NewDocumentEnvironment{ keythms_beamer_tcb }{ m d<> }
{
- \cs_set:Npn \__keythms_thm_tcboxtemphead: { #1 } % for tcolorbox-no-titlebar
- \tl_if_novalue:nF { #2 } { \begin{onlyenv}<#2> }
+ \tl_if_novalue:nF { #2 } { \begin{actionenv}<#2> }
\begin{tcolorbox}[
title={\usebeamerfont*{block title} #1},
- keythms_tcbox_\l_keythms_thmuse_envname_tl
+ keythms_tcb_\l_keythms_thmuse_envname_tl
]
}
{
\end{tcolorbox}
- \tl_if_novalue:nF { #2 } { \end{onlyenv} }
+ \tl_if_novalue:nF { #2 } { \end{actionenv} }
+ }
+\NewDocumentEnvironment{ keythms_beamer_tcbnotitlebar }{ m d<> }
+ {
+ \tl_if_novalue:nF { #2 } { \begin{actionenv}<#2> }
+ \begin{tcolorbox}[ keythms_tcb_\l_keythms_thmuse_envname_tl ]
+ \group_begin:
+ \usebeamerfont*{block title} #1
+ \thmheadnl
+ \hskip\thm@headsep
+ \group_end:
+ }
+ {
+ \end{tcolorbox}
+ \tl_if_novalue:nF { #2 } { \end{actionenv} }
}
\cs_set_protected:Npn \keythms_keyify_theorem:n #1
@@ -78,6 +126,7 @@
\DeclareEnvironmentCopy { keythms_orig_#1 } { #1 }
\DeclareDocumentEnvironment { keythms_beamer_grab_#1 } { m m m +b }
{ % ##1 = keys, ##2 = note, ##3 = action spec, ##4 = theorem body
+ \__keythms_thm_prehead_code:n { #1 }
\tl_if_empty:nTF { ##3 }
{ \begin{keythms_orig_#1}[{##2}] }
{ \begin{keythms_orig_#1}[{##2}]<##3> }
@@ -136,6 +185,7 @@
\msg_warning:nnV { keytheorems } { store-reversed-not-got }
\l__keythms_thmuse_storereversed_tl
}
+ \__keythms_thm_prehead_code:n { #1 }
\hook_use:n { keytheorems/#1/restated }
\hook_use:n { keytheorems/allthms/restated }
\tl_if_empty:nTF { ##3 }
@@ -164,19 +214,21 @@
{
\tl_set:Nn \l_keythms_thmuse_envname_tl { #1 }
\keys_set:nn { keytheorems/thmuse } { ##2 }
- \tl_if_empty:NF \l__keythms_thmuse_store_tl
+ \tl_if_empty:NTF \l__keythms_thmuse_store_tl
{
- % \bool_gset_true:N \g__keythms_listof_writefile_bool % disable writing to file
- \cs_set_eq:NN \__keythms_beamer_withhooks_begin:nnnn \__keythms_beamer_grab_begin:nnnn
- \cs_set_eq:NN \__keythms_beamer_withhooks_end:n \__keythms_beamer_grab_end:n
+ \tl_if_empty:NTF \l__keythms_thmuse_storereversed_tl
+ { \__keythms_thm_prehead_code:n { #1 } }
+ {
+ % \bool_gset_true:N \g__keythms_listof_writefile_bool % disable writing to file
+ \cs_set_eq:NN \__keythms_beamer_withhooks_begin:nnnn \__keythms_beamer_grabreversed_begin:nnnn
+ \cs_set_eq:NN \__keythms_beamer_withhooks_end:n \__keythms_beamer_grabreversed_end:n
+ }
}
- \tl_if_empty:NF \l__keythms_thmuse_storereversed_tl
{
% \bool_gset_true:N \g__keythms_listof_writefile_bool % disable writing to file
- \cs_set_eq:NN \__keythms_beamer_withhooks_begin:nnnn \__keythms_beamer_grabreversed_begin:nnnn
- \cs_set_eq:NN \__keythms_beamer_withhooks_end:n \__keythms_beamer_grabreversed_end:n
+ \cs_set_eq:NN \__keythms_beamer_withhooks_begin:nnnn \__keythms_beamer_grab_begin:nnnn
+ \cs_set_eq:NN \__keythms_beamer_withhooks_end:n \__keythms_beamer_grab_end:n
}
- \__keythms_thm_prehead_code:n { #1 }
\tl_if_empty:nTF { ##3 }
{ % if ##3 empty, just pass ##1 and withhooks_begin will check if empty
\__keythms_beamer_withhooks_begin:nnVn { #1 } { ##2 }
@@ -270,7 +322,7 @@
{
\iow_shipout:Ne \@auxout
{
- \KeyThmsBeamerReversedData { \l__keythms_thmuse_storereversed_tl }
+ \token_to_str:N \KeyThmsBeamerReversedData { \l__keythms_thmuse_storereversed_tl }
{ \@currentlabel }
{ #2 }
}
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex
index 27992798e4..0140580c66 100644
--- a/macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex
@@ -20,7 +20,7 @@
\newlistof{ keythms_support_memoir_listof:w }{ thlist }
{ \l__keythms_listof_title_tl }
-\RenewDocumentCommand \listofkeytheorems { O{} }
+\RenewDocumentCommand \listofkeytheorems { +O{} }
{
\bool_gset_true:N \g__keythms_listof_writefile_bool
\group_begin:
diff --git a/macros/latex/contrib/keytheorems/tex/keytheorems.sty b/macros/latex/contrib/keytheorems/tex/keytheorems.sty
index e1483782d9..bd98b2a7e6 100644
--- a/macros/latex/contrib/keytheorems/tex/keytheorems.sty
+++ b/macros/latex/contrib/keytheorems/tex/keytheorems.sty
@@ -2,8 +2,8 @@
% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
\NeedsTeXFormat{LaTeX2e}[2023-06-01]
-\def\@keythms@date{2024-10-21}
-\def\@keythms@version{0.1.8}
+\def\@keythms@date{2024-11-05}
+\def\@keythms@version{0.2.1}
\ProvidesExplPackage{keytheorems}{\@keythms@date}{\@keythms@version}
{l3keys interface to amsthm}
@@ -15,15 +15,15 @@
\cs_generate_variant:Nn \keys_set:nn { ne }
\cs_generate_variant:Nn \msg_warning:nnn { nne }
\cs_generate_variant:Nn \tl_put_right:Nn { Ne }
- \ProvideDocumentCommand \IfPackageLoadedT { m m }
+ \ProvideDocumentCommand \IfPackageLoadedT { m +m }
{ \IfPackageLoadedTF{#1}{#2}{ } }
- \ProvideDocumentCommand \IfPackageLoadedF { m m }
+ \ProvideDocumentCommand \IfPackageLoadedF { m +m }
{ \IfPackageLoadedTF{#1}{ }{#2} }
- \ProvideDocumentCommand \IfClassLoadedT { m m }
+ \ProvideDocumentCommand \IfClassLoadedT { m +m }
{ \IfClassLoadedTF{#1}{#2}{ } }
- \ProvideDocumentCommand \IfClassLoadedWithOptionsT { m m m }
+ \ProvideDocumentCommand \IfClassLoadedWithOptionsT { m m +m }
{ \IfClassLoadedWithOptionsTF{#1}{#2}{#3}{ } }
- \ProvideDocumentCommand \IfPackageLoadedWithOptionsT { m m m }
+ \ProvideDocumentCommand \IfPackageLoadedWithOptionsT { m m +m }
{ \IfPackageLoadedWithOptionsTF{#1}{#2}{#3}{ } }
}
\RequirePackage{aliascnt}
@@ -125,6 +125,7 @@
%%% Declare Variables %%%
%%%%%%%%%%%%%%%%%%%%%%%%%
+\dim_new:N \l__keythms_tmpa_dim
\iow_new:N \g__keythms_tmpa_iow
\tl_new:N \l__keythms_tmpa_tl
@@ -139,6 +140,9 @@
\bool_new:N \l__keythms_thmuse_restating_bool
\clist_new:N \g__keythms_restatecounters_clist
\clist_new:N \l__keythms_thmstyle_savedkeys_clist
+\dim_new:N \l__keythms_thm_currparindent_dim
+\dim_new:N \l__keythms_thm_currparskip_dim
+\int_new:N \l__keythms_thm_tcbstate_int
\prop_new:N \g__keythms_thmnames_prop
\prop_new:N \g__keythms_thmstyle_defaultkeys_prop
\prop_new:N \g__keythms_thmuse_othercounters_prop
@@ -146,6 +150,8 @@
\tl_new:N \l__keythms_thm_currentthmstyle_tl
\tl_new:N \l__keythms_thm_defaultkeys_tl
\tl_new:N \l__keythms_thm_envname_tl
+\tl_new:N \l__keythms_thm_tcbkeys_tl
+\tl_new:N \l__keythms_thm_tempstyle_tl
\tl_new:N \l__keythms_thmstyle_defaultkeys_tl
\tl_new:N \l__keythms_thmstyle_lnotebrace_tl
\tl_new:N \l__keythms_thmstyle_rnotebrace_tl
@@ -167,9 +173,8 @@
\cs_gset:Npn \thekeythms_unnumbered_dummyctr { }
\cs_generate_variant:Nn \hook_gput_code:nnn { nnv }
-\cs_generate_variant:Nn \keys_precompile:nnN { nv, nVc, nnc, ne }
+\cs_generate_variant:Nn \keys_precompile:nnN { ne, nv, nnc, nVc }
\cs_generate_variant:Nn \prop_set_from_keyval:Nn { Ne }
-\prg_generate_conditional_variant:Nnn \tl_if_novalue:n { o } { T, F, TF }
%%%%%%%%%%%%%%
%%% Styles %%%
@@ -249,6 +254,7 @@
spaceabove .tl_set:N = \l__keythms_thmstyle_spaceabove_tl,
spacebelow .tl_set:N = \l__keythms_thmstyle_spacebelow_tl,
% thm keys that are saved for later
+ leftmargin .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
numbered .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
numberlike .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
numberwithin .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
@@ -259,7 +265,7 @@
preheadhook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
qed .code:n =
{ % qed needs special treatment to distinguish qed from qed={}
- \tl_if_novalue:oTF { #1 }
+ \tl_if_novalue:nTF { #1 }
{
\clist_put_right:No \l__keythms_thmstyle_savedkeys_clist
{ \l_keys_key_str }
@@ -269,7 +275,8 @@
{ \l_keys_key_str = { #1 } }
}
},
- qed .default:n = \c_novalue_tl,
+ qed .default:o = \c_novalue_tl,
+ rightmargin .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
sharenumber .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
sibling .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
tcolorbox .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
@@ -312,8 +319,8 @@
noteseparator = {~},
numberfont = \upshape,
postheadspace = 5pt plus 1pt minus 1pt,
- spaceabove = \topsep,
- spacebelow = \topsep,
+ spaceabove = {}, % empty means default (works for AMS classes too)
+ spacebelow = {}, % empty means default (works for AMS classes too)
}
\hook_gput_code:nnn { package/keytheorems/after } { . }
{ % need to defer to wait for support files
@@ -322,24 +329,24 @@
\l__keythms_thmstyle_defaultkeys_tl
}
-\NewDocumentCommand \newkeytheoremstyle { m m }
+\NewDocumentCommand \newkeytheoremstyle { m +m }
{
\cs_if_free:cTF { th@ #1 }
{ \keythms_thmstyle_declarestyle:nn { #1 } { #2 } }
{ \msg_error:nnn { keytheorems } { thmstyle-defined } { #1 } }
}
-\NewDocumentCommand \renewkeytheoremstyle { m m }
+\NewDocumentCommand \renewkeytheoremstyle { m +m }
{
\cs_if_free:cTF { th@ #1 }
{ \msg_error:nnn { keytheorems } { thmstyle-undefined } { #1 } }
{ \keythms_thmstyle_declarestyle:nn { #1 } { #2 } }
}
-\NewDocumentCommand \providekeytheoremstyle { m m }
+\NewDocumentCommand \providekeytheoremstyle { m +m }
{
\cs_if_free:cT { th@ #1 }
{ \keythms_thmstyle_declarestyle:nn { #1 } { #2 } }
}
-\NewDocumentCommand \declarekeytheoremstyle { m m }
+\NewDocumentCommand \declarekeytheoremstyle { m +m }
{
\keythms_thmstyle_declarestyle:nn { #1 } { #2 }
}
@@ -390,17 +397,27 @@
\l__keythms_thmstyle_postheadspace_tl
{ \text_expand:n { \keythms_thmstyle_headcmd:nnn{##1}{##2}{##3} } }
% Define inherit-style key
- \tl_if_exist:cF { l__keythms_thmstyle_#1_metakeys_tl }
- { \tl_new:c { l__keythms_thmstyle_#1_metakeys_tl } }
+ \tl_clear_new:c { l__keythms_thmstyle_#1_metakeys_tl }
\keys_precompile:nnc { keytheorems/thmstyle } { #2 } % use precompile instead of meta key
{ l__keythms_thmstyle_#1_metakeys_tl } % because that's sensitive to hashes
\keys_define:nn { keytheorems/thmstyle } % and we want to allow both # and ##
{ inherit-style / #1 .code:n = \tl_use:c { l__keythms_thmstyle_#1_metakeys_tl } }
- \tl_if_exist:cF { l__keythms_thmstyle_#1_savedthmkeys_tl }
- { \tl_new:c { l__keythms_thmstyle_#1_savedthmkeys_tl } }
+ \tl_clear_new:c { l__keythms_thmstyle_#1_savedthmkeys_tl }
\keys_precompile:nVc { keytheorems/thm }
\l__keythms_thmstyle_savedkeys_clist
{ l__keythms_thmstyle_#1_savedthmkeys_tl }
+ \tl_if_empty:NF \l__keythms_thmstyle_spaceabove_tl
+ {
+ \skip_zero_new:c { g__keythms_thmstyle_#1_tcbspaceabove_skip }
+ \skip_set_eq:cN { g__keythms_thmstyle_#1_tcbspaceabove_skip }
+ \l__keythms_thmstyle_spaceabove_tl
+ }
+ \tl_if_empty:NF \l__keythms_thmstyle_spacebelow_tl
+ {
+ \skip_zero_new:c { g__keythms_thmstyle_#1_tcbspacebelow_skip }
+ \skip_set_eq:cN { g__keythms_thmstyle_#1_tcbspacebelow_skip }
+ \l__keythms_thmstyle_spacebelow_tl
+ }
\cs_undefine:N \NAME % undefine to prevent conflicts
\cs_undefine:N \NUMBER
\cs_undefine:N \NOTE
@@ -444,6 +461,7 @@
\keys_define:nn { keytheorems/thm }
{
heading .meta:n = { name = {#1} },
+ leftmargin .dim_set:N = \l__keythms_thm_leftmargin_dim,
name .tl_set:N = \l__keythms_thm_name_tl,
numbered .choice:,
numbered .default:n = true,
@@ -464,52 +482,34 @@
prefoothook .tl_set:N = \l__keythms_thm_prefoothook_tl,
preheadhook .tl_set:N = \l__keythms_thm_preheadhook_tl,
qed .tl_set:N = \l__keythms_thm_qed_tl,
- qed .default:n = \c_novalue_tl,
+ qed .default:o = \c_novalue_tl,
% ^ distinguish between 'qed' and 'qed={}'
refname .tl_set:N = \l__keythms_thm_refname_tl,
Refname .tl_set:N = \l__keythms_thm_Refname_tl,
+ rightmargin .dim_set:N = \l__keythms_thm_rightmargin_dim,
sharenumber .meta:n = { sibling = {#1} },
sibling .tl_set:N = \l__keythms_thm_sibling_tl,
style .tl_set:N = \l__keythms_thm_style_tl,
style .groups:n = { style-comes-first },
- tcolorbox .tl_set:N = \l__keythms_thm_tcbkeys_tl,
+ tcolorbox .code:n =
+ {
+ \int_set:Nn \l__keythms_thm_tcbstate_int { 1 }
+ \tl_set:Nn \l__keythms_thm_tcbkeys_tl { #1 }
+ },
tcolorbox .default:n = {},
- tcolorbox-no-titlebar .meta:n =
+ tcolorbox-no-titlebar .code:n =
{
- tcolorbox={
- notitle,
- before~upper={
- \group_begin:
- \__keythms_thm_tcboxtemphead:
- \group_end:
- },
- #1
- }
+ \int_set:Nn \l__keythms_thm_tcbstate_int { 2 }
+ \tl_set:Nn \l__keythms_thm_tcbkeys_tl { #1 }
},
tcolorbox-no-titlebar .default:n = {},
title .meta:n = { name = {#1} },
within .meta:n = { parent = {#1} },
}
-% what below is unnecessary? I really don't understand this code.
-\cs_new_protected:Npn \__keythms_thm_storedeferredthmhead:n #1
- {
- \if@inlabel \indent \par \fi % eject a section head if one is pending
- \if@nobreak
- \adjust@parskip@nobreak
- \else
- \addpenalty\@beginparpenalty
- \addvspace\@topsep
- \addvspace{-\parskip}
- \fi
- % \global\@inlabeltrue % MB: if this is uncommented then spacing after sections is wrong
- \everypar\dth@everypar
- \cs_set:Npn \__keythms_thm_tcboxtemphead: { \normalfont #1 }
- \ignorespaces
- }
-
\keys_precompile:nnN { keytheorems/thm }
{
+ leftmargin = 0pt,
name = \q_no_value,
numbered = true,
parent = {},
@@ -520,40 +520,38 @@
qed = \q_no_value,
refname = \q_no_value,
Refname = \q_no_value,
+ rightmargin = 0pt,
sibling = {},
style = {},
- tcolorbox = \q_no_value,
}
\l__keythms_thm_defaultkeys_tl
\cs_new_protected:Npn \__keythms_thm_makethmhooks:n #1
{
- \hook_new:n { keytheorems/#1/prehead }
- \hook_new:n { keytheorems/#1/posthead }
- \hook_new_reversed:n { keytheorems/#1/prefoot }
- \hook_new_reversed:n { keytheorems/#1/postfoot }
+ \hook_new_pair:nn { keytheorems/#1/prehead } { keytheorems/#1/postfoot }
+ \hook_new_pair:nn { keytheorems/#1/posthead } { keytheorems/#1/prefoot }
\hook_new:n { keytheorems/#1/restated }
}
% Make generic theorem hooks
\__keythms_thm_makethmhooks:n { allthms }
-\NewDocumentCommand \newkeytheorem { m O{} }
+\NewDocumentCommand \newkeytheorem { m +O{} }
{ % #1 = name, #2 = keys
\clist_map_inline:nn { #1 } % define multiple theorems at once
{ \keythms_thm_newkeythm:nn { ##1 } { #2 } }
}
-\NewDocumentCommand \renewkeytheorem { m O{} }
+\NewDocumentCommand \renewkeytheorem { m +O{} }
{ % #1 = name, #2 = keys
\clist_map_inline:nn { #1 }
{ \keythms_thm_renewkeythm:nn { ##1 } { #2 } }
}
-\NewDocumentCommand \providekeytheorem { m O{} }
+\NewDocumentCommand \providekeytheorem { m +O{} }
{ % #1 = name, #2 = keys
\clist_map_inline:nn { #1 }
{ \keythms_thm_providekeythm:nn { ##1 } { #2 } }
}
-\NewDocumentCommand \declarekeytheorem { m O{} }
+\NewDocumentCommand \declarekeytheorem { m +O{} }
{ % #1 = name, #2 = keys
\clist_map_inline:nn { #1 }
{ \keythms_thm_declarekeythm:nn { ##1 } { #2 } }
@@ -582,6 +580,8 @@
\bool_set_false:N \l__keythms_thm_unlessunique_bool
% Set default keys
\tl_use:N \l__keythms_thm_defaultkeys_tl
+ % Initialize tcb state to zero (1 is with title bar, 2 is without title bar)
+ \int_zero:N \l__keythms_thm_tcbstate_int
% First set style so we can pick up additional thm keys, then overwrite if necessary
\keys_set_groups:nnn { keytheorems/thm } { style-comes-first } { #2 }
% Store theorem style
@@ -696,17 +696,32 @@
{ \keythms_thm_setrefnames:nV { #1 } \l__keythms_thm_refname_tl }
\quark_if_no_value:NF \l__keythms_thm_Refname_tl
{ \keythms_thm_setRefnames:nV { #1 } \l__keythms_thm_Refname_tl }
+ % Set margins if needed
+ \bool_lazy_or:nnT
+ { ! \dim_compare_p:nNn { \l__keythms_thm_leftmargin_dim } = { 0pt } }
+ { ! \dim_compare_p:nNn { \l__keythms_thm_rightmargin_dim } = { 0pt } }
+ {
+ \exp_args:NnVV \__keythms_thm_margincode:nnn { #1 }
+ \l__keythms_thm_leftmargin_dim \l__keythms_thm_rightmargin_dim
+ }
% Set up qed if needed
\quark_if_no_value:NF \l__keythms_thm_qed_tl
{
\exp_args:Nno \__keythms_thm_qedcode:nn { #1 } { \l__keythms_thm_qed_tl }
}
% Set up tcolorbox if needed
- \quark_if_no_value:NF \l__keythms_thm_tcbkeys_tl
+ \int_compare:nNnTF { \l__keythms_thm_tcbstate_int } = { 1 }
{
- \exp_args:Nno \__keythms_thm_tcboxcode:nn { #1 }
+ \exp_args:Nno \__keythms_thm_tcbcode:nn { #1 }
{ \l__keythms_thm_tcbkeys_tl }
}
+ {
+ \int_compare:nNnT { \l__keythms_thm_tcbstate_int } = { 2 }
+ {
+ \exp_args:Nno \__keythms_thm_tcbnotitlebarcode:nn { #1 }
+ { \l__keythms_thm_tcbkeys_tl }
+ }
+ }
% Set up list-of definition
\cs_set_eq:cN { l@ #1 } \keythms_listof_tocline:
% Set default list-of display command
@@ -731,59 +746,150 @@
}
\tl_use:c { g__keythms_thm_tcbpatch_#1_tl }
}
+ \cs_set_eq:NN \__keythms_thm_origtrivlist: \trivlist % for margin code below
+ }
+
+\cs_new_protected:Npn \__keythms_thm_margincode:nnn #1#2#3
+ {
+ \tl_gput_right:cn { g__keythms_thm_preheadfromkeys_#1_tl }
+ {
+ \dim_set_eq:NN \l__keythms_thm_currparindent_dim \parindent
+ \dim_set_eq:NN \l__keythms_thm_currparskip_dim \parskip
+ \cs_set_protected:Npn \trivlist
+ {
+ \list{ }
+ {
+ \dim_set:Nn \leftmargin { #2 }
+ \dim_set:Nn \rightmargin { #3 }
+ \dim_zero:N \labelwidth % trivlist does this; important for tcb-no-title
+ % need to revert some adjustments \list makes (any more?)
+ \int_gdecr:N \@listdepth % avoid changing format of inner lists
+ \dim_set_eq:NN \listparindent \l__keythms_thm_currparindent_dim
+ \dim_set_eq:NN \parsep \l__keythms_thm_currparskip_dim
+ }
+ }
+ }
+ \tl_gput_right:cn { g__keythms_thm_postheadfromkeys_#1_tl }
+ { \cs_set_eq:NN \trivlist \__keythms_thm_origtrivlist: }
}
-\cs_new_protected:Npn \__keythms_thm_tcboxcode:nn #1#2
+\cs_new_protected:Npn \__keythms_thm_tcbcode:nn #1#2
{ % #1 = name, #2 = tcolorbox keys
- \RequirePackage{tcolorbox}
\tl_gput_right:cn { g__keythms_thm_preheadfromkeys_#1_tl }
{
- \cs_set_eq:NN \deferred@thm@head \__keythms_thm_storedeferredthmhead:n
+ \cs_set_eq:NN \deferred@thm@head \__keythms_thm_storedeferred@thm@head:n
\cs_set_eq:NN \Hy@theorem@makelinktarget \use_none:n
- % ^ don't like playing with hyperref internals... but don't see around
- % it because hyperref tries to add to para hook which doesn't work
- % when title set up the way we do it
- \cs_set_protected:Npn \thm@space@setup { \thm@preskip=0pt \thm@postskip=0pt }
- % ^ to match tcolorbox defaults; shouldn't interfere with user styles
+ % % ^ don't like playing with hyperref internals... but don't see around
+ % % it because hyperref tries to add to para hook which doesn't work
+ % % when title set up the way we do it
}
- \tcbset
+ \__keythms_thm_tcbshared:nn { #1 }
{
- keythms_tcbox_#1/.style =
- {
- savedelimiter=#1,
- title={ \__keythms_thm_tcboxtemphead: },
- #2
- }
+ title={ \__keythms_thm_tcbtemphead: },
+ #2
}
\bool_if:NT \l__keythms_thm_numbered_bool
{
\tl_gset:cn { g__keythms_thm_tcbpatch_#1_tl }
{
- \IfPackageLoadedF{cleveref}
+ \IfPackageLoadedF { cleveref }
{ % hyperref doesn't patch \@thm if cleveref loaded
\tcbset
{
- keythms_tcbox_#1/.append~style = % fix hyperlinking
+ keythms_tcb_#1/.append~style = % fix hyperlinking
{ phantom={ \MakeLinkTarget*{\@currentHref} } }
}
}
}
}
\tl_gput_left:cn { g__keythms_thm_postheadfromkeys_#1_tl }
- { \begin{tcolorbox}[keythms_tcbox_#1] }
+ { \begin{tcolorbox}[keythms_tcb_#1] }
\tl_gput_right:cn { g__keythms_thm_prefootfromkeys_#1_tl }
{ \end{tcolorbox} }
}
+\cs_new_protected:Npn \__keythms_thm_tcbnotitlebarcode:nn #1#2
+ { % #1 = name, #2 = tcolorbox keys
+ \__keythms_thm_tcbshared:nn { #1 } { #2 }
+ \tl_gclear_new:c { g__keythms_thm_#1_tcbprehead_tl }
+ \tl_gset:cn { g__keythms_thm_#1_tcbprehead_tl }
+ { \begin{tcolorbox}[keythms_tcb_#1] }
+ \tl_gclear_new:c { g__keythms_thm_#1_tcbpostfoot_tl }
+ \tl_gset:cn { g__keythms_thm_#1_tcbpostfoot_tl }
+ { \end{tcolorbox} }
+ }
+\cs_new_protected:Npn \__keythms_thm_tcbshared:nn #1#2
+ {
+ \RequirePackage{tcolorbox}
+ \tcbset
+ {
+ keythms_tcb_#1/.style =
+ {
+ savedelimiter=#1,
+ #2
+ }
+ }
+ \tl_if_empty:NTF \l__keythms_thm_style_tl
+ {
+ \tl_set_eq:NN \l__keythms_thm_tempstyle_tl
+ \l__keythms_thm_currentthmstyle_tl
+ }
+ { \tl_set_eq:NN \l__keythms_thm_tempstyle_tl \l__keythms_thm_style_tl }
+ \tl_gput_right:ce { g__keythms_thm_preheadfromkeys_#1_tl }
+ { % don't mess with tcolorbox defaults unless explicitly asked to in style
+ \exp_not:N \tl_put_right:cn { th@ \l__keythms_thm_tempstyle_tl }
+ { \thm@preskip=0pt \thm@postskip=0pt }
+ }
+ \tl_if_exist:cT
+ { g__keythms_thmstyle_ \l__keythms_thm_tempstyle_tl _tcbspaceabove_skip }
+ {
+ \exp_args:Ne \tcbset
+ {
+ keythms_tcb_#1/.prefix~style =
+ {
+ before~skip =
+ \skip_use:c { g__keythms_thmstyle_ \l__keythms_thm_tempstyle_tl _tcbspaceabove_skip }
+ }
+ }
+ }
+ \tl_if_exist:cT
+ { g__keythms_thmstyle_ \l__keythms_thm_tempstyle_tl _tcbspacebelow_skip }
+ {
+ \exp_args:Ne \tcbset
+ {
+ keythms_tcb_#1/.prefix~style =
+ {
+ after~skip =
+ \skip_use:c { g__keythms_thmstyle_ \l__keythms_thm_tempstyle_tl _tcbspacebelow_skip }
+ }
+ }
+ }
+ }
+% what below is unnecessary? I really don't understand this code.
+\cs_new_protected:Npn \__keythms_thm_storedeferred@thm@head:n #1
+ {
+ \if@inlabel \indent \par \fi % eject a section head if one is pending
+ \if@nobreak
+ \adjust@parskip@nobreak
+ \else
+ \addpenalty\@beginparpenalty
+ \addvspace\@topsep
+ \addvspace{-\parskip}
+ \fi
+ % \global\@inlabeltrue % MB: if this is uncommented then spacing after sections is wrong
+ \everypar\dth@everypar
+ \cs_set:Npn \__keythms_thm_tcbtemphead: { \normalfont #1 }
+ \ignorespaces
+ }
\cs_new_protected:Npn \__keythms_thm_qedcode:nn #1#2
{ % #1 = name, #2 = symbol
\tl_gput_right:cn { g__keythms_thm_postheadfromkeys_#1_tl }
{
- \tl_if_novalue:oF { #2 } { \protected@edef\qedsymbol{#2} }
+ \tl_if_novalue:nF { #2 } { \protected@edef\qedsymbol{#2} }
\pushQED{\qed}
}
\tl_gput_left:cn { g__keythms_thm_prefootfromkeys_#1_tl }
{
- \tl_if_novalue:oF { #2 } { \protected@edef\qedsymbol{#2} }
+ \tl_if_novalue:nF { #2 } { \protected@edef\qedsymbol{#2} }
\popQED
}
}
@@ -872,7 +978,7 @@
\keythms_if_restating:F
{ \refstepcounter{ keythms_unnumbered_dummyctr } }
\IfPackageLoadedT { tcolorbox }
- { \tcbset{keythms_tcbox_#1/.append~style=nophantom} }
+ { \tcbset{keythms_tcb_#1/.append~style=nophantom} }
% ^ otherwise we try to set two identical anchors
\begin{keythms_orig_nonumber_#1}
}
@@ -902,11 +1008,6 @@
{
\property_new:nnnn { keytheorems/recordednote } { now } { }
{ \l__keythms_thmuse_note_tl }
- \cs_new:Npn \__keythms_getrecordednote:n #1
- {
- \property_ref:nn { keythms_recordednote_#1 }
- { keytheorems/recordednote }
- }
\cs_new:Npn \__keythms_thmuse_recordnote:
{
\tl_if_empty:NF \l__keythms_thmuse_note_tl
@@ -916,6 +1017,11 @@
{ keytheorems/recordednote }
}
}
+ \cs_new:Npn \__keythms_getrecordednote:n #1
+ {
+ \property_ref:nn { keythms_recordednote_#1 }
+ { keytheorems/recordednote }
+ }
}
}
@@ -956,6 +1062,7 @@
\DeclareEnvironmentCopy { keythms_orig_#1 } { #1 }
\DeclareDocumentEnvironment { keythms_grab_#1 } { m m +b }
{ % ##1 = keys, ##2 = note, ##3 = theorem body
+ \__keythms_thm_prehead_code:n { #1 }
\begin{keythms_orig_#1}[{##2}]
\clist_map_inline:Nn \g__keythms_restatecounters_clist
{
@@ -1012,6 +1119,7 @@
\msg_warning:nnV { keytheorems } { store-reversed-not-got }
\l__keythms_thmuse_storereversed_tl
}
+ \__keythms_thm_prehead_code:n { #1 }
\hook_use:n { keytheorems/#1/restated }
\hook_use:n { keytheorems/allthms/restated }
\begin{keythms_orig_#1}[{##2}]
@@ -1038,19 +1146,21 @@
{
\tl_set:Nn \l_keythms_thmuse_envname_tl { #1 }
\keys_set:nn { keytheorems/thmuse } { ##1 }
- \tl_if_empty:NF \l__keythms_thmuse_store_tl
+ \tl_if_empty:NTF \l__keythms_thmuse_store_tl
{
- \bool_gset_true:N \g__keythms_listof_writefile_bool
- \cs_set_eq:NN \__keythms_withhooks_begin:nnn \__keythms_grab_begin:nnn
- \cs_set_eq:NN \__keythms_withhooks_end:n \__keythms_grab_end:n
+ \tl_if_empty:NTF \l__keythms_thmuse_storereversed_tl
+ { \__keythms_thm_prehead_code:n { #1 } }
+ {
+ \bool_gset_true:N \g__keythms_listof_writefile_bool
+ \cs_set_eq:NN \__keythms_withhooks_begin:nnn \__keythms_grabreversed_begin:nnn
+ \cs_set_eq:NN \__keythms_withhooks_end:n \__keythms_grabreversed_end:n
+ }
}
- \tl_if_empty:NF \l__keythms_thmuse_storereversed_tl
{
\bool_gset_true:N \g__keythms_listof_writefile_bool
- \cs_set_eq:NN \__keythms_withhooks_begin:nnn \__keythms_grabreversed_begin:nnn
- \cs_set_eq:NN \__keythms_withhooks_end:n \__keythms_grabreversed_end:n
+ \cs_set_eq:NN \__keythms_withhooks_begin:nnn \__keythms_grab_begin:nnn
+ \cs_set_eq:NN \__keythms_withhooks_end:n \__keythms_grab_end:n
}
- \__keythms_thm_prehead_code:n { #1 }
\__keythms_withhooks_begin:nnV { #1 } { ##1 } \l__keythms_thmuse_note_tl
}
{
@@ -1157,6 +1267,8 @@
}
\hook_use:n { keytheorems/#1/prehead }
\hook_use:n { keytheorems/allthms/prehead }
+ \tl_if_exist:cT { g__keythms_thm_#1_tcbprehead_tl }
+ { \tl_use:c { g__keythms_thm_#1_tcbprehead_tl } }
}
\cs_new_protected:Npn \__keythms_thm_posthead_code:n #1
{ % #1 = theorem name
@@ -1182,6 +1294,8 @@
}
\cs_new_protected:Npn \__keythms_thm_postfoot_code:n #1
{ % #1 = theorem name
+ \tl_if_exist:cT { g__keythms_thm_#1_tcbpostfoot_tl }
+ { \tl_use:c { g__keythms_thm_#1_tcbpostfoot_tl } }
\hook_use:n { keytheorems/allthms/postfoot }
\hook_use:n { keytheorems/#1/postfoot }
}
@@ -1190,9 +1304,9 @@
\keythms_listof_chaptervspacehack:
\iow_shipout:Ne \@auxout
{
- \exp_not:N \@writefile { thlist }
+ \token_to_str:N \@writefile { thlist }
{
- \KeyThmsSavedTheorem{ #1 }
+ \token_to_str:N \KeyThmsSavedTheorem{ #1 }
{ \@currentlabel }
{ \@currentHref }
{ \thepage }
@@ -1206,9 +1320,9 @@
{ % #1 = theorem name, #2 = keys, #3 = body
\iow_shipout:Ne \@auxout
{
- \exp_not:N \@writefile { thlist }
+ \token_to_str:N \@writefile { thlist }
{
- \KeyThmsSavedTheoremReversed { \l__keythms_thmuse_storereversed_tl }
+ \token_to_str:N \KeyThmsSavedTheoremReversed { \l__keythms_thmuse_storereversed_tl }
{ #1 }
{ \exp_not:n { #2 } }
{ \exp_not:n { #3 } }
@@ -1255,7 +1369,7 @@
\cs_new_protected:Npn \KeyThmsContentsLine #1 { }
% ^ initially a no-op, redefined where needed; important it's protected!
-\NewDocumentCommand \addtheoremcontentsline { m m }
+\NewDocumentCommand \addtheoremcontentsline { m +m }
{
\addtocontents { thlist }
{
@@ -1266,7 +1380,7 @@
}
}
}
-\NewDocumentCommand \addtotheoremcontents { m }
+\NewDocumentCommand \addtotheoremcontents { +m }
{
\addtocontents { thlist }
{
@@ -1570,10 +1684,7 @@
\cs_set_protected:Nn \keythms_listof_listcmd:nnnnnnn
{
\tl_if_empty:nF { ##7 }
- {
- \__keythms_getthm_theorem:nnnnn
- {##1}{##2}{##5}{##6}{##7}
- }
+ { \__keythms_getthm_theorem:nnnnn {##1}{##2}{##5}{##6}{##7} }
}
},
seq .code:n =
@@ -1625,7 +1736,7 @@
}
}
-\NewDocumentCommand \keytheoremlistset { m }
+\NewDocumentCommand \keytheoremlistset { +m }
{
\keys_set:nn { keytheorems/listof } { #1 }
}
@@ -1829,7 +1940,7 @@
}
\cs_new_eq:NN \keythms_listof_tocline: \__keythms_listof_default_tocline:
-\NewDocumentCommand \listofkeytheorems { O{} }
+\NewDocumentCommand \listofkeytheorems { +O{} }
{
\bool_gset_true:N \g__keythms_listof_writefile_bool
\group_begin:
@@ -1984,7 +2095,7 @@
\cs_generate_variant:Nn \__keythms_thmuse_continues:n { V }
-\NewDocumentCommand \keytheoremset { m }
+\NewDocumentCommand \keytheoremset { +m }
{ % #1 = keys
\keys_set:nn { keytheorems } { #1 }
}
@@ -2011,11 +2122,11 @@
{
\bool_gset_true:N \g__keythms_thmtoolscompat_bool
\__keythms_overload_code: % since thmtools overwrites \newtheorem
- \ProvideDocumentCommand { \declaretheoremstyle } { O{} m }
+ \ProvideDocumentCommand { \declaretheoremstyle } { +O{} m }
{
\declarekeytheoremstyle { ##2 } { ##1 }
}
- \ProvideDocumentCommand { \declaretheorem } { O{} m }
+ \ProvideDocumentCommand { \declaretheorem } { +O{} m }
{
\newkeytheorem { ##2 } [ ##1 ]
}
@@ -2026,9 +2137,9 @@
\keythms_listof_chaptervspacehack:
\iow_shipout:Ne \@auxout
{
- \exp_not:N \@writefile { thlist }
+ \token_to_str:N \@writefile { thlist }
{
- \KeyThmsSavedTheorem{ ####1 }
+ \token_to_str:N \KeyThmsSavedTheorem{ ####1 }
{ \@currentlabel }
{ \@currentHref }
{ \thepage }
@@ -2057,9 +2168,9 @@
{ % ####1 = theorem name, ####2 = keys, ####3 = body
\iow_shipout:Ne \@auxout
{
- \exp_not:N \@writefile { thlist }
+ \token_to_str:N \@writefile { thlist }
{
- \KeyThmsSavedTheoremReversed { \l__keythms_thmuse_storereversed_tl }
+ \token_to_str:N \KeyThmsSavedTheoremReversed { \l__keythms_thmuse_storereversed_tl }
{ ####1 }
{ store*=\l__keythms_thmuse_storereversed_tl,\exp_not:n { ####2 } } % this line is changed
{ \exp_not:n { ####3 } }
@@ -2095,19 +2206,19 @@
{ % redefine since thmtools way is \renewcommand\listtheoremname{...}
title .initial:n = \listtheoremname
}
- \ProvideDocumentCommand { \addtotheorempreheadhook } { O{allthms} m }
+ \ProvideDocumentCommand { \addtotheorempreheadhook } { O{allthms} +m }
{
\addtotheoremhook [ ##1 ] { prehead } { ##2 }
}
- \ProvideDocumentCommand { \addtotheorempostheadhook } { O{allthms} m }
+ \ProvideDocumentCommand { \addtotheorempostheadhook } { O{allthms} +m }
{
\addtotheoremhook [ ##1 ] { posthead } { ##2 }
}
- \ProvideDocumentCommand { \addtotheoremprefoothook } { O{allthms} m }
+ \ProvideDocumentCommand { \addtotheoremprefoothook } { O{allthms} +m }
{
\addtotheoremhook [ ##1 ] { prefoot } { ##2 }
}
- \ProvideDocumentCommand { \addtotheorempostfoothook } { O{allthms} m }
+ \ProvideDocumentCommand { \addtotheorempostfoothook } { O{allthms} +m }
{
\addtotheoremhook [ ##1 ] { postfoot } { ##2 }
}
@@ -2448,7 +2559,7 @@
\cs_set_protected:Npn \__keythms_listof_titlecmd:n ####1 { ##1 }
},
}
- \RenewDocumentCommand \listofkeytheorems { O{} }
+ \RenewDocumentCommand \listofkeytheorems { +O{} }
{ % title command not customizable here
\bool_gset_true:N \g__keythms_listof_writefile_bool
\group_begin:
@@ -2544,15 +2655,23 @@
{
\tag_if_active:T
{
- \msg_new:nnn { keytheorems } { tcolorbox-tagging }
+ \msg_new:nnn { keytheorems } { tag-incompat-key }
{
- The~key~'tcolorbox'~does~not~currently~work~with~
+ The~key~'#1'~does~not~currently~work~with~
tagging.~Ignoring~this~key.
}
\keys_define:nn { keytheorems/thm }
{
tcolorbox .code:n =
- \msg_warning:nn { keytheorems } { tcolorbox-tagging },
+ {
+ \msg_warning:nn { keytheorems } { tag-incompat-key }
+ { tcolorbox }
+ },
+ tcolorbox-no-titlebar .code:n =
+ {
+ \msg_warning:nn { keytheorems } { tag-incompat-key }
+ { tcolorbox-no-titlebar }
+ },
}
\keys_define:nn { keytheorems/listof }
{
@@ -2571,6 +2690,17 @@
{ \makeatletter \@input { \jobname.##1 } }
},
}
+ \cs_set_protected:Npn \__keythms_thm_margincode:nnn #1#2#3
+ { % tagging code does not define theorems with lists
+ \tl_gput_right:cn { g__keythms_thm_preheadfromkeys_#1_tl }
+ {
+ \SetTemplateKeys{ block }{ display }
+ {
+ leftmargin = #2,
+ rightmargin = #3,
+ }
+ }
+ }
}
}
{ }
diff --git a/macros/latex/contrib/sjtutex/sjtutex.dtx b/macros/latex/contrib/sjtutex/sjtutex.dtx
index 095a940c0f..01f771c2f4 100644
--- a/macros/latex/contrib/sjtutex/sjtutex.dtx
+++ b/macros/latex/contrib/sjtutex/sjtutex.dtx
@@ -216,7 +216,7 @@
Please update your TeX distribution}{}}
%</class>
%<*!(driver|install)>
-%<+!driver>\GetIdInfo$Id: sjtutex.dtx ce44827 2024-10-21 00:12:31 +0800 Alexara Wu <alexarawu@outlook.com> $
+%<+!driver>\GetIdInfo$Id: sjtutex.dtx 879eea9 2024-11-06 19:54:03 +0800 Alexara Wu <alexarawu@outlook.com> $
%<class&thesis> {Thesis document class for Shanghai Jiao Tong University (SJTUTeX)}
%<class&thesis>\ProvidesExplClass{sjtuthesis}
%<class&report> {Report document class for Shanghai Jiao Tong University (SJTUTeX)}
@@ -335,7 +335,7 @@
%<font&cjk&founder&zh>\ProvidesExplFile{sjtu-cjk-font-founder-zh.def}
%<font&cjk&founder&ja> {Founder CJK fonts definition for Japanese (SJTUTeX)}
%<font&cjk&founder&ja>\ProvidesExplFile{sjtu-cjk-font-founder-ja.def}
-%<!driver> {\ExplFileDate}{2.1.4}{\ExplFileDescription}
+%<!driver> {\ExplFileDate}{2.1.5}{\ExplFileDescription}
%</!(driver|install)>
%
%<*driver>
@@ -343,7 +343,7 @@
\documentclass{ctxdoc}
\newcommand{\sjtutex}{SJTU\TeX}
\expandafter\def\csname ver@\jobname.dtx\endcsname
- {2024/10/21 v2.1.4 SJTUTeX}
+ {2024/11/06 v2.1.5 SJTUTeX}
\usepackage{float}
\usepackage{multirow}
\usepackage{longtable}
@@ -4830,7 +4830,7 @@
%<*thesis>
\@@_engine_case:nnn
{
- \NewDocumentEnvironment { SJTU@CJK@FTS } { m b }
+ \NewDocumentEnvironment { SJTU@CJK@FTS } { m }
{
\mode_leave_vertical:
\bool_set_false:N \l_@@_tmp_bool
@@ -4844,25 +4844,31 @@
\bool_set_true:N \l_@@_tmp_bool
}
}
- \hbox_to_wd:nn {#1} {#2}
- } { }
+ \use:e { \exp_not:N \tex_hbox:D to \dim_eval:n {#1} }
+ \bgroup \ignorespaces
+ }
+ { \egroup }
}
{
- \NewDocumentEnvironment { SJTU@CJK@FTS } { m b }
+ \NewDocumentEnvironment { SJTU@CJK@FTS } { m }
{
\mode_leave_vertical:
\cs_set:Npn \CJKglue
{ \skip_horizontal:n { \c_zero_dim plus 1 filll } }
- \hbox_to_wd:nn {#1} {#2}
- } { }
+ \use:e { \exp_not:N \tex_hbox:D to \dim_eval:n {#1} }
+ \bgroup \ignorespaces
+ }
+ { \egroup }
}
{
- \NewDocumentEnvironment { SJTU@CJK@FTS } { m b }
+ \NewDocumentEnvironment { SJTU@CJK@FTS } { m }
{
\mode_leave_vertical:
\ltjsetparameter { kanjiskip = { \c_zero_dim plus 1 filll } }
- \hbox_to_wd:nn {#1} {#2}
- } { }
+ \use:e { \exp_not:N \tex_hbox:D to \dim_eval:n {#1} }
+ \bgroup \ignorespaces
+ }
+ { \egroup }
}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/sjtutex/sjtutex.pdf b/macros/latex/contrib/sjtutex/sjtutex.pdf
index 44ed7415c7..1f99883c43 100644
--- a/macros/latex/contrib/sjtutex/sjtutex.pdf
+++ b/macros/latex/contrib/sjtutex/sjtutex.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/README.md b/macros/latex/required/amsmath/README.md
index d3432970d2..e69baaaecd 100644
--- a/macros/latex/required/amsmath/README.md
+++ b/macros/latex/required/amsmath/README.md
@@ -1,7 +1,7 @@
The amsmath bundle for LaTeX
============================
-Release 2024-11-01
+Release 2024-11-01a
Overview
--------
diff --git a/macros/latex/required/amsmath/amsbsy.pdf b/macros/latex/required/amsmath/amsbsy.pdf
index 4e33855357..e2c08c4edb 100644
--- a/macros/latex/required/amsmath/amsbsy.pdf
+++ b/macros/latex/required/amsmath/amsbsy.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amscd.pdf b/macros/latex/required/amsmath/amscd.pdf
index 46c639df89..2e9324d250 100644
--- a/macros/latex/required/amsmath/amscd.pdf
+++ b/macros/latex/required/amsmath/amscd.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsgen.pdf b/macros/latex/required/amsmath/amsgen.pdf
index 930477d17c..fb58bb4076 100644
--- a/macros/latex/required/amsmath/amsgen.pdf
+++ b/macros/latex/required/amsmath/amsgen.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsldoc.pdf b/macros/latex/required/amsmath/amsldoc.pdf
index e600454b7a..c65772883e 100644
--- a/macros/latex/required/amsmath/amsldoc.pdf
+++ b/macros/latex/required/amsmath/amsldoc.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsmath.dtx b/macros/latex/required/amsmath/amsmath.dtx
index 9d45cc2f9d..591d175642 100644
--- a/macros/latex/required/amsmath/amsmath.dtx
+++ b/macros/latex/required/amsmath/amsmath.dtx
@@ -81,11 +81,11 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macrocode}
\DeclareRelease{}{1994-06-01}{amsmath-2018-12-01.sty}
\DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty}
-\DeclareCurrentRelease{}{2024-10-30}
+\DeclareCurrentRelease{}{2019-04-01}
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesPackage{amsmath}[2024/10/30 v2.17s AMS math features]
+\ProvidesPackage{amsmath}[2024/11/05 v2.17t AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
@@ -1002,10 +1002,6 @@ Foreign command \@backslashchar#1;\MessageBreak
\let\DOTSI\relax
\let\DOTSB\relax
\let\DOTSX\relax
-% \end{macrocode}
-% In the definitions below, special \cs{uccode}s are used to generate macros
-% with arguments delimited by catcode 12 letters as returned by \cs{meaning}.
-% \begin{macrocode}
{\uccode`7=`\\ \uccode`8=`m \uccode`9=`a \uccode`0=`t \uccode`!=`h
\uppercase{%
\gdef\math@#1#2#3#4#5#6\math@{\gtest@false\ifx 7#1\ifx 8#2%
@@ -1043,13 +1039,6 @@ Foreign command \@backslashchar#1;\MessageBreak
}
\fi
% \end{macrocode}
-% \changes{v2.17s}{2024/10/30}{guard against primitive if (gh/1448)}
-% \begin{macrocode}
-{\uccode`7=`\\ \uccode`(=`i \uccode`)=`f
- \uppercase{\gdef\testif@#1#2#3#4\testif@{%
- \ifx7#1\ifx(#2\ifx)#3\@tempswafalse\fi\fi\fi}
-}}
-% \end{macrocode}
% \begin{macrocode}
\newcount\classnum@
\def\getmathch@#1.#2\getmathch@{\classnum@#1 \divide\classnum@4096
@@ -1098,14 +1087,6 @@ Foreign command \@backslashchar#1;\MessageBreak
\ifx9#2 \@xp\@xp\@xp\zap@to@space\fi}}}
\def\zap@to@space#1 {}
% \end{macrocode}
-%
-% \changes{v2.17r}{2024/06/29}{macro added to strip \cs{protected} (gh/1265)}
-% \begin{macrocode}
-{\uccode`9=`\p %
- \uppercase{\gdef\stripprotected@#1#2#3\relax{%
- \ifx9#2 \@xp\@xp\@xp\zap@to@space\fi}}}
-% \end{macrocode}
-%
% \begin{macrocode}
\def\keybin@{\gtest@true
\ifx\@let@token+\else\ifx\@let@token=\else
@@ -1158,43 +1139,15 @@ Foreign command \@backslashchar#1;\MessageBreak
\gdef\thedots@{\dotsb@}%
\else
% \end{macrocode}
-% In case \cs{@let@token} is a robust \LaTeXe{} command, i.e.,
-% expands to \cs{protect}
-% \verb*=\somename =, we save the \cs{meaning} of
-% \verb*=\somename = in \cs{meaning@} (possibly followed by some dots that have
-% not been consumed as arguments during the expansion).
-% Otherwise, we save the
-% \cs{meaning} of \cs{@let@token} in \cs{meaning@}. The dots at the end
-% as well as the space are
-% used in later parts of the checking (this could probably be cleaned up a bit).
-% \changes{v2.15d}{2016/06/28}{Add space token to prevent runaway
-% argument error}
-% \changes{v2.17r}{2024/06/29}{Drop \cs{protect} if present (gh/1265)}
-% \changes{v2.17s}{2024/10/30}{skip protect testif detect primitive if (gh/1448)}
+% \changes{v2.15d}{2016/06/28}{Add space token to prevent runaway argument error}
% \begin{macrocode}
\xdef\meaning@{\meaning\@let@token. .........}%
- \@tempswatrue
- \@xp\testif@\meaning@....\testif@
- \if@tempswa
- \begingroup
- \def\protect{\protect}% % make it a quark
- \xdef\meaning@{\@xp\stripprotect@\@let@token.........\stripprotect@. .........}%
- \endgroup
- \fi
-% \end{macrocode}
-% In previous versions \verb|\long| macros were not seen by the lookahead.
+% \end{macrocode}
+% In previous versions \verb|\long| macros were not seen by the lokkahead.
% That was bad as this file uses \verb|\(re)newcommand| for \verb|\implies| etc.
% \begin{macrocode}
\xdef\meaning@@{\@xp\striplong@\meaning@\relax\meaning@}%
% \end{macrocode}
-% Until now \cs{protected} macros also stopped the lookahead, e.g.,
-% $\cong$ wasn't recognized correctly for that reason.
-%
-% \changes{v2.17r}{2024/06/29}{Handle \cs{protected} macros in
-% lookahead for dots (gh/1265)}
-% \begin{macrocode}
- \xdef\meaning@@{\@xp\stripprotected@\meaning@@\relax\meaning@@}%
-% \end{macrocode}
% \begin{macrocode}
\@xp\math@\meaning@\math@
\ifgtest@ % if \mathxxx test
@@ -1255,15 +1208,6 @@ Foreign command \@backslashchar#1;\MessageBreak
\thedots@}
% \end{macrocode}
%
-% The helper to generate the meaning of \cs{\@let@token}, or of its
-% first-level expansion with \cs{protect} removed.
-% \changes{v2.17r}{2024/06/29}{Drop \cs{protect} if present (gh/1265)}
-% \begin{macrocode}
-\def\stripprotect@#1#2\stripprotect@{\ifx#1\protect
- \meaning#2\else \meaning\@let@token \fi}
-
-% \end{macrocode}
-%
% The \qc{\=} character is necessary in the two \cs{let} assignments
% in \cs{boldsymboldots@}, because the symbol we are making
% bold might be an \qc{\=} sign.
diff --git a/macros/latex/required/amsmath/amsmath.pdf b/macros/latex/required/amsmath/amsmath.pdf
index 838fe9ccb0..38eac89a60 100644
--- a/macros/latex/required/amsmath/amsmath.pdf
+++ b/macros/latex/required/amsmath/amsmath.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsopn.pdf b/macros/latex/required/amsmath/amsopn.pdf
index 9798217f6b..b06e491ed4 100644
--- a/macros/latex/required/amsmath/amsopn.pdf
+++ b/macros/latex/required/amsmath/amsopn.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amstext.pdf b/macros/latex/required/amsmath/amstext.pdf
index 792b7e3dea..3a2f7233bf 100644
--- a/macros/latex/required/amsmath/amstext.pdf
+++ b/macros/latex/required/amsmath/amstext.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsxtra.pdf b/macros/latex/required/amsmath/amsxtra.pdf
index b5815f1f81..8164d4609b 100644
--- a/macros/latex/required/amsmath/amsxtra.pdf
+++ b/macros/latex/required/amsmath/amsxtra.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/changes.txt b/macros/latex/required/amsmath/changes.txt
index 170c7fe0d7..3a4e6fd46c 100644
--- a/macros/latex/required/amsmath/changes.txt
+++ b/macros/latex/required/amsmath/changes.txt
@@ -3,6 +3,15 @@ All changes above are only part of the development branch for the next release.
================================================================================
#########################
+# 2024-11-01a Release
+#########################
+
+2024-11-05 David Carlisle <David.Carlisle@latex-project.org>
+
+ * amsmath.dtx
+ Revert last \dots change (gh/1448)
+
+#########################
# 2024-11-01 Release
#########################
diff --git a/macros/latex/required/amsmath/subeqn.pdf b/macros/latex/required/amsmath/subeqn.pdf
index d8cc65b799..10f73e1448 100644
--- a/macros/latex/required/amsmath/subeqn.pdf
+++ b/macros/latex/required/amsmath/subeqn.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/technote.pdf b/macros/latex/required/amsmath/technote.pdf
index 0961de1fd4..f36424ece9 100644
--- a/macros/latex/required/amsmath/technote.pdf
+++ b/macros/latex/required/amsmath/technote.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/testmath.pdf b/macros/latex/required/amsmath/testmath.pdf
index 7ddc2526f1..59806dcb51 100644
--- a/macros/latex/required/amsmath/testmath.pdf
+++ b/macros/latex/required/amsmath/testmath.pdf
Binary files differ