summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty')
-rw-r--r--Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty25
1 files changed, 14 insertions, 11 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 44ba44d9a4b..be073eddeda 100644
--- a/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty
+++ b/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty
@@ -9,11 +9,10 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-\NeedsTeXFormat{LaTeX2e}[2020-10-01]
-\RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{create-theorem}
- {2022/06/15} {}
+ {2022/07/01} {}
{Initializing theorem-like environments with multilingual support}
\keys_define:nn { create-theorem }
@@ -37,7 +36,7 @@
, no preset names .bool_set_inverse:N = \l__crthm_presetname_bool
, unknown .code:n = {}
}
-\ProcessKeysOptions { create-theorem }
+\ProcessKeyOptions [ create-theorem ]
\bool_if:NT \l__crthm_nameinlink_bool
{
@@ -212,13 +211,13 @@
% #2 = language name
% #7 = c or C
{
+ % It is assumed that when #3 is empty, so is #5
\tl_if_blank:eTF { #3 }
{
- %% The spacing here is rather strange, but I haven't came up with a better method yet
\tl_gset:cn { g_crthm_core_name_ #7 ref_article_singular_ #1 _ #2 _tl } { \skip_horizontal:n { -.75ex } }
\tl_gset:cn { g_crthm_core_name_ #7 ref_article_plural_ #1 _ #2 _tl } { \skip_horizontal:n { -.75ex } }
- \tl_gset:cn { g_crthm_name_ #7 ref_article_singular_ #1 _ #2 _tl } { \crefthemark { \skip_horizontal:n { -.5ex } } }
- \tl_gset:cn { g_crthm_name_ #7 ref_article_plural_ #1 _ #2 _tl } { \crefthemark { \skip_horizontal:n { -.5ex } } }
+ \tl_gset:cn { g_crthm_name_ #7 ref_article_singular_ #1 _ #2 _tl } { \crefthemark { \skip_horizontal:n { -.75ex } } }
+ \tl_gset:cn { g_crthm_name_ #7 ref_article_plural_ #1 _ #2 _tl } { \crefthemark { \skip_horizontal:n { -.75ex } } }
}
{
\tl_gset:cn { g_crthm_core_name_ #7 ref_article_singular_ #1 _ #2 _tl } { #3 }
@@ -610,14 +609,16 @@
\regex_split:nnN { \s* ; \s* } { #2 } { \l_tmpa_seq }
\seq_map_inline:Nn \l_tmpa_seq
{ % ####1 = existed environments
- \bool_if:NT \l_tmpa_bool
- { % use the first environment's definite article as that of the combined environment
+ % Here we use the definite article of the last environment as that of the combined environment
+ % Uncomment the lines below if you wish to use the definite article of the first environment
+ % \bool_if:NT \l_tmpa_bool
+ % {
\tl_gset:cn { g_crthm_saved_name_cref_article_singular_ #1 _ ##1 _tl } { \tl_use:c { g_crthm_core_name_cref_article_singular_ ####1 _ ##1 _tl } }
\tl_gset:cn { g_crthm_saved_name_cref_article_plural_ #1 _ ##1 _tl } { \tl_use:c { g_crthm_core_name_cref_article_plural_ ####1 _ ##1 _tl } }
\tl_gset:cn { g_crthm_saved_name_Cref_article_singular_ #1 _ ##1 _tl } { \tl_use:c { g_crthm_core_name_Cref_article_singular_ ####1 _ ##1 _tl } }
\tl_gset:cn { g_crthm_saved_name_Cref_article_plural_ #1 _ ##1 _tl } { \tl_use:c { g_crthm_core_name_Cref_article_plural_ ####1 _ ##1 _tl } }
- \bool_set_false:N \l_tmpa_bool
- }
+ % \bool_set_false:N \l_tmpa_bool
+ % }
\seq_gput_right:cn { g_crthm_name_heading_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_heading_ ####1 _ ##1 _tl } }
\seq_gput_right:cn { g_crthm_name_cref_singular_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_cref_singular_ ####1 _ ##1 _tl } }
\seq_gput_right:cn { g_crthm_name_cref_plural_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_cref_plural_ ####1 _ ##1 _tl } }
@@ -2087,9 +2088,11 @@
}
}
+\NameTheorem { definition-corollary } { combined = { definition ; corollary } }
\NameTheorem { definition-proposition } { combined = { definition ; proposition } }
\NameTheorem { definition-theorem } { combined = { definition ; theorem } }
+\NameTheorem { corollary-definition } { combined = { corollary ; definition } }
\NameTheorem { proposition-definition } { combined = { proposition ; definition } }
\NameTheorem { theorem-definition } { combined = { theorem ; definition } }