summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-06-01 20:04:27 +0000
committerKarl Berry <karl@freefriends.org>2022-06-01 20:04:27 +0000
commitb0b871a84bd57524b8aa6ff2562148b111741af2 (patch)
tree92b544d15af85a551f562140dc5c32a4e80a210a
parenta2f1d482842e40f8365d390d836c8c972d92e394 (diff)
create-theorem (1jun22)
git-svn-id: svn://tug.org/texlive/trunk@63466 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdfbin126706 -> 125733 bytes
-rw-r--r--Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex3
-rw-r--r--Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty22
3 files changed, 14 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdf b/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdf
index c7c8ffa56f1..33d62ab4038 100644
--- a/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdf
+++ b/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex b/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex
index 706d2e6eac1..64b96772517 100644
--- a/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex
+++ b/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex
@@ -97,7 +97,7 @@
\begin{document}
-\def\PackageVersion{2022/05/31}
+\def\PackageVersion{2022/06/01}
\title{\createtheorempackage{}\\\smallskip\itshape Initializing theorem-like environments with multilingual support}
\author{Jinwen XU}
@@ -476,7 +476,6 @@ The code above defines two new environments \lstinline|theorem+| and \lstinline|
\begin{itemize}
\item The current mechanism does not work well for German, a problem originated in the package \textsf{crefthe}. The author plans to adopt a more refined approach in a later version so as to support the various grammatical situations in German.
\item \createtheorempackage{} modifies some undocumented internal macros of \textsf{cleveref}, so the behaviour might not be stable if \textsf{cleveref} gets updated.
- \item \createtheorempackage{} is not fully compatible with \textsf{thmtools}, especially its \texttt{autoref} module.
\item There may be inaccuracies in the translation of those preset names.
\end{itemize}
diff --git a/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty b/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty
index c41908646c0..35b07ffd323 100644
--- a/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty
+++ b/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty
@@ -13,7 +13,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{create-theorem}
- {2022/05/31} {}
+ {2022/06/01} {}
{Initializing theorem-like environments with multilingual support}
\keys_define:nn { create-theorem }
@@ -39,11 +39,6 @@
}
\ProcessKeysOptions { create-theorem }
-\hook_gput_code:nnn { package/thmtools/after } { crthm }
- {
- \let\thmt@autorefsetup\relax
- }
-
\RequirePackage { aliascnt }
\bool_if:NT \l__crthm_nameinlink_bool
@@ -54,6 +49,15 @@
\RequirePackage { crefthe }
+\IfPackageLoadedTF { thmtools }
+ {
+ \cs_gset_eq:NN \crthm_newtheorem:w \thmt@original@newtheorem
+ }
+ {
+ \cs_gset_eq:NN \crthm_newtheorem:w \newtheorem
+ }
+
+
% Users should consider appending their languages to this list as needed,
% otherwise the naming functionality may not work in monolingual documents.
\clist_new:N \g_crthm_supported_language_clist
@@ -813,10 +817,10 @@
}
\bool_if:NTF \l__crthm_creating_numberless_bool
{
- \newtheorem*{ #1 _crthm_regional } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
+ \crthm_newtheorem:w*{ #1 _crthm_regional } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
}
{
- \newtheorem { #1 _crthm_regional } [#1] { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
+ \crthm_newtheorem:w { #1 _crthm_regional } [#1] { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
}
\group_end:
\NewDocumentEnvironment { #1 } { O{} }
@@ -841,7 +845,7 @@
}
\bool_if:NT \l__crthm_creating_create_starred_bool
{
- \newtheorem*{ #1 * } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
+ \crthm_newtheorem:w*{ #1 * } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
}
\keys_set:nn { create-theorem-creating / counter-management } { #2 }
}