summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/create-theorem
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-03-02 21:36:20 +0000
committerKarl Berry <karl@freefriends.org>2022-03-02 21:36:20 +0000
commit6177551a4e6315f21dc01b347a9dac5711074500 (patch)
tree94448d942dc1e8673a667ca733675db7c2f49a57 /Master/texmf-dist/tex/latex/create-theorem
parent62d7dca481d8f9ebf4998eb09f9bc17748f72ab9 (diff)
create-theorem (2mar22)
git-svn-id: svn://tug.org/texlive/trunk@62347 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/create-theorem')
-rw-r--r--Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty39
1 files changed, 26 insertions, 13 deletions
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 22e89a8d8d5..e966ff97521 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/02/27} {}
+ {2022/03/01} {}
{Initializing theorem-like environments with multilingual support}
\keys_define:nn { create-theorem }
@@ -280,7 +280,7 @@
{ % Patch the cref formats so that definite articles are placed outside the hyperlinks
\bool_if:NT \l__crthm_nameinlink_bool
{ % Use the definite article of the original language, with name's casing depends on the preposition and the article
- \crefthe_patch_format:nnnnn { 2 } { #4 ref@ #1 @format } { #4 ref@ #1 @name }
+ \crefthe_patch_format:nnnn { #4 ref@ #1 @format } { #4 ref@ #1 @name }
{ \tl_use:c { g_crthm_name_ #4 ref_article_singular_ #2 _ #3 _tl } }
{
\bool_if:NTF \g__crefthe_has_prep_bool
@@ -291,7 +291,7 @@
\tl_use:c { g_crthm_name_ #4 ref_singular_ #2 _ #3 _tl }
}
}
- \crefthe_patch_format:nnnnn { 2 } { #4 ref@ #1 @format@first } { #4 ref@ #1 @name@plural }
+ \crefthe_patch_format:nnnn { #4 ref@ #1 @format@first } { #4 ref@ #1 @name@plural }
{ \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
{
\bool_if:NTF \g__crefthe_has_prep_bool
@@ -302,7 +302,7 @@
\tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl }
}
}
- \crefthe_patch_format:nnnnn { 3 } { #4 refrange@ #1 @format } { #4 ref@ #1 @name@plural }
+ \crefthe_patch_format:nnnn { #4 refrange@ #1 @format } { #4 ref@ #1 @name@plural }
{ \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
{
\bool_if:NTF \g__crefthe_has_prep_bool
@@ -313,7 +313,7 @@
\tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl }
}
}
- \crefthe_patch_format:nnnnn { 3 } { #4 refrange@ #1 @format@first } { #4 ref@ #1 @name@plural }
+ \crefthe_patch_format:nnnn { #4 refrange@ #1 @format@first } { #4 ref@ #1 @name@plural }
{ \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
{
\bool_if:NTF \g__crefthe_has_prep_bool
@@ -325,29 +325,29 @@
}
}
%% Use the definite article of the original language, with name's casing correspond to the article
- % \crefthe_patch_format:nnnnn { 2 } { #4 ref@ #1 @format } { #4 ref@ #1 @name }
+ % \crefthe_patch_format:nnnn { #4 ref@ #1 @format } { #4 ref@ #1 @name }
% { \tl_use:c { g_crthm_name_ #4 ref_article_singular_ #2 _ #3 _tl } }
% { \tl_use:c { g_crthm_name_ #4 ref_singular_ #2 _ #3 _tl } }
- % \crefthe_patch_format:nnnnn { 2 } { #4 ref@ #1 @format@first } { #4 ref@ #1 @name@plural }
+ % \crefthe_patch_format:nnnn { #4 ref@ #1 @format@first } { #4 ref@ #1 @name@plural }
% { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
% { \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl } }
- % \crefthe_patch_format:nnnnn { 3 } { #4 refrange@ #1 @format } { #4 ref@ #1 @name@plural }
+ % \crefthe_patch_format:nnnn { #4 refrange@ #1 @format } { #4 ref@ #1 @name@plural }
% { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
% { \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl } }
- % \crefthe_patch_format:nnnnn { 3 } { #4 refrange@ #1 @format@first } { #4 ref@ #1 @name@plural }
+ % \crefthe_patch_format:nnnn { #4 refrange@ #1 @format@first } { #4 ref@ #1 @name@plural }
% { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
% { \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl } }
%% Use the definite article of the current language, with name's casing correspond to the article
- % \crefthe_patch_format:nnnnn { 2 } { #4 ref@ #1 @format } { #4 ref@ #1 @name }
+ % \crefthe_patch_format:nnnn { #4 ref@ #1 @format } { #4 ref@ #1 @name }
% { \tl_use:c { g_crthm_name_ #4 ref_article_singular_ #2 _ \languagename _tl } }
% { \tl_use:c { g_crthm_name_ #4 ref_singular_ #2 _ #3 _tl } }
- % \crefthe_patch_format:nnnnn { 2 } { #4 ref@ #1 @format@first } { #4 ref@ #1 @name@plural }
+ % \crefthe_patch_format:nnnn { #4 ref@ #1 @format@first } { #4 ref@ #1 @name@plural }
% { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ \languagename _tl } }
% { \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl } }
- % \crefthe_patch_format:nnnnn { 3 } { #4 refrange@ #1 @format } { #4 ref@ #1 @name@plural }
+ % \crefthe_patch_format:nnnn { #4 refrange@ #1 @format } { #4 ref@ #1 @name@plural }
% { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ \languagename _tl } }
% { \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl } }
- % \crefthe_patch_format:nnnnn { 3 } { #4 refrange@ #1 @format@first } { #4 ref@ #1 @name@plural }
+ % \crefthe_patch_format:nnnn { #4 refrange@ #1 @format@first } { #4 ref@ #1 @name@plural }
% { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ \languagename _tl } }
% { \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl } }
}
@@ -356,6 +356,11 @@
\NewDocumentCommand \NameTheorem { m m }
{
+ \crthm_name_theorem:nn { #1 } { #2 }
+ }
+
+\cs_new:Nn \crthm_name_theorem:nn
+ {
\tl_set:Nn \l__crthm_current_env_tl { #1 }
\newcounter { #1 }
\keys_set:nn { create-theorem-naming } { #2 }
@@ -428,6 +433,14 @@
\NewDocumentCommand \CreateTheorem { m m }
{
+ \clist_map_inline:nn { #1 }
+ {
+ \crthm_create_theorem:nn { ##1 } { #2 }
+ }
+ }
+
+\cs_new:Nn \crthm_create_theorem:nn
+ {
\tl_set:Nn \l__crthm_current_env_tl { #1 }
\bool_set_false:N \l__crthm_creating_apply_style_bool
\bool_set_false:N \l__crthm_creating_numberless_bool