texlive[63379] Master: create-theorem (23may22)
commits+karl at tug.org
commits+karl at tug.org
Mon May 23 21:56:14 CEST 2022
Revision: 63379
http://tug.org/svn/texlive?view=revision&revision=63379
Author: karl
Date: 2022-05-23 21:56:14 +0200 (Mon, 23 May 2022)
Log Message:
-----------
create-theorem (23may22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdf
trunk/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex
trunk/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty
trunk/Master/tlpkg/tlpsrc/create-theorem.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/create-theorem/DEPENDS.txt
Added: trunk/Master/texmf-dist/doc/latex/create-theorem/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/create-theorem/DEPENDS.txt (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/create-theorem/DEPENDS.txt 2022-05-23 19:56:14 UTC (rev 63379)
@@ -0,0 +1 @@
+hard crefthe
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/create-theorem/DEPENDS.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex 2022-05-23 19:55:14 UTC (rev 63378)
+++ trunk/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex 2022-05-23 19:56:14 UTC (rev 63379)
@@ -97,7 +97,7 @@
\begin{document}
-\def\PackageVersion{2022/04/23}
+\def\PackageVersion{2022/05/22}
\title{\createtheorempackage{}\\\smallskip\itshape Initializing theorem-like environments with multilingual support}
\author{Jinwen XU}
@@ -450,6 +450,7 @@
\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 There may be inaccuracies in the translation of those preset names.
\end{itemize}
Modified: trunk/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty 2022-05-23 19:55:14 UTC (rev 63378)
+++ trunk/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty 2022-05-23 19:56:14 UTC (rev 63379)
@@ -13,7 +13,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{create-theorem}
- {2022/04/23} {}
+ {2022/05/22} {}
{Initializing theorem-like environments with multilingual support}
\keys_define:nn { create-theorem }
@@ -401,6 +401,69 @@
{ ##3 } { ##4 } { ##5 } { ##6 }
\group_end:
}
+
+ % Redefine the labelcref formats to match the numbering format
+ \cs_set:cpn { labelcref@ #1 @format } ##1##2##3
+ {
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+ \cs_set_eq:cc { labelcref@ #1 @format at first } { labelcref@ #1 @format }
+ \cs_set:cpn { labelcref@ #1 @format at second } ##1##2##3
+ {
+ \crefpairconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcref@ #1 @format at middle } ##1##2##3
+ {
+ \crefmiddleconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcref@ #1 @format at last } ##1##2##3
+ {
+ \creflastconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+
+ \crthm_define_format_long_version:nnnn { #2 } { labelcrefrange@ #1 @format } {} {}
+ \crthm_define_format_long_version:nnnn { #2 } { labelcrefrange@ #1 @format at first } {} {}
+ \cs_set:cpn { labelcrefrange@ #1 @format at second } ##1##2##3##4##5##6
+ {
+ \crefpairconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcrefrange@ #1 @format at middle } ##1##2##3##4##5##6
+ {
+ \crefmiddleconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcrefrange@ #1 @format at last } ##1##2##3##4##5##6
+ {
+ \creflastconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
}
\cs_new:Nn \crthm_define_format_short_version:nnnn
@@ -412,7 +475,9 @@
{
\cs_new:cn { crthm_format_ #2 :nnn }
{
- { #3 } ##2 { #4 } \nobreakspace { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##1 } } ##3
+ { #3 } ##2 { #4 }
+ \tl_if_blank:nF { #4 } { \nobreakspace }
+ { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##1 } } ##3
}
\cs_set_eq:cc { #2 } { crthm_format_ #2 :nnn }
}
@@ -427,7 +492,7 @@
\cs_new:cn { crthm_format_ #2 :nnnnnn }
{
{ #3 } ##3 { #4 }
- \nobreakspace \crefrangepreconjunction
+ \tl_if_blank:nF { #4 } { \nobreakspace } \crefrangepreconjunction
{ \tl_use:c { g_crthm_number_style_ #1 _tl } { ##1 } }
##4 \crefrangeconjunction
##5 { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##2 } } ##6
Modified: trunk/Master/tlpkg/tlpsrc/create-theorem.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/create-theorem.tlpsrc 2022-05-23 19:55:14 UTC (rev 63378)
+++ trunk/Master/tlpkg/tlpsrc/create-theorem.tlpsrc 2022-05-23 19:56:14 UTC (rev 63379)
@@ -0,0 +1 @@
+depend crefthe
More information about the tex-live-commits
mailing list.