diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
11 files changed, 174 insertions, 132 deletions
diff --git a/Master/texmf-dist/tex/latex/projlib/ProjLib.sty b/Master/texmf-dist/tex/latex/projlib/ProjLib.sty index 3a5c706cbc5..d2a7ad69144 100644 --- a/Master/texmf-dist/tex/latex/projlib/ProjLib.sty +++ b/Master/texmf-dist/tex/latex/projlib/ProjLib.sty @@ -15,11 +15,11 @@ %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% -\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\NeedsTeXFormat{LaTeX2e}[2022-06-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {ProjLib} - {2022/04/24} {} + {2022/06/15} {} {Collective interface of the ProjLib toolkit} \keys_define:nn { ProjLib } diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-author.sty b/Master/texmf-dist/tex/latex/projlib/projlib-author.sty index b52528b6c50..a081ba1d925 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-author.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-author.sty @@ -15,11 +15,11 @@ %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% -\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\NeedsTeXFormat{LaTeX2e}[2022-06-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-author} - {2022/04/24} {} + {2022/06/15} {} {Enhanced author information block} \keys_define:nn { projlib-author } @@ -34,6 +34,14 @@ \cs_if_exist:NT \subjclass { \endinput } +\prg_new_conditional:Nnn \projlib_author_if_content_empty:n { T, F, TF } + { + \hbox_set:Nn \l_tmpa_box { #1 } + \dim_compare:nNnTF { \box_wd:N \l_tmpa_box } > \c_zero_dim + { \prg_return_false: } + { \prg_return_true: } + } + \tl_new:N \g__projlib_author_font_author_tl \tl_new:N \g__projlib_author_font_institute_tl \tl_new:N \g__projlib_author_font_address_tl @@ -245,15 +253,15 @@ \makeatletter \xpatchcmd { \@maketitle } { \@date } { - \tl_if_blank:eTF { \@date } { \skip_vertical:n { -2 \baselineskip } } { \@date } - \tl_if_blank:eF { \g__projlib_author_dedicatory_tl } + \projlib_author_if_content_empty:nTF { \@date } { \skip_vertical:n { -2 \baselineskip } } { \@date } + \projlib_author_if_content_empty:nF { \g__projlib_author_dedicatory_tl } { - \tl_if_blank:eT { \@date } { \skip_vertical:n { 2 \baselineskip } } + \projlib_author_if_content_empty:nT { \@date } { \skip_vertical:n { 2 \baselineskip } } \par \skip_vertical:n { -\parskip } \skip_vertical:n { \baselineskip } \textit{ \g__projlib_author_dedicatory_tl } - \tl_if_blank:eT { \@date } + \projlib_author_if_content_empty:nT { \@date } { \skip_vertical:n { -\parskip } \skip_vertical:n { \dim_eval:n { -1.7 \baselineskip } } @@ -264,7 +272,7 @@ \hook_gput_code:nnn { cmd/maketitle/before } { projlib-author } { - \tl_if_blank:eF { \g__projlib_author_keywords_tl } + \projlib_author_if_content_empty:nF { \g__projlib_author_keywords_tl } { \projlib_author_pre_thanks:n { @@ -294,6 +302,8 @@ \cs_undefine:N \email \cs_undefine:N \dedicatory \cs_undefine:N \keywords + \cs_undefine:N \footnotemark + \NewCommandCopy \footnotemark \projlib_author_backup_footnotemark: \bool_gset_true:N \g__projlib_author_already_maketitle_bool } } diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-datetime.sty b/Master/texmf-dist/tex/latex/projlib/projlib-datetime.sty index 0ba1e30a8df..fc052ec20b8 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-datetime.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-datetime.sty @@ -15,11 +15,11 @@ %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% -\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\NeedsTeXFormat{LaTeX2e}[2022-06-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-datetime} - {2022/04/24} {} + {2022/06/15} {} {Convert numeric date-time string to natural language} \tl_new:N \g__projlib_datetime_input_format_tl @@ -40,6 +40,8 @@ } \ProcessKeysOptions { projlib-datetime } +\RequirePackage { relsize } + \bool_if:NT \l__projlib_datetime_plain_bool { \hook_gput_code:nnn { begindocument/before } { projlib-datetime } @@ -104,7 +106,7 @@ \cs_new_protected:Nn \projlib_datetime_text_superscript:n { \group_begin: - \small + \smaller \textsuperscript { #1 } \group_end: } @@ -403,8 +405,8 @@ \NewDocumentCommand \ProjLibdate { O{} m O{} } { \group_begin: - \tl_if_blank:eF { #1 } { \keys_set:nn { projlib-datetime-command } { #1 } } - \tl_if_blank:eF { #3 } { \keys_set:nn { projlib-datetime-command } { #3 } } + \tl_if_blank:oF { #1 } { \keys_set:nn { projlib-datetime-command } { #1 } } + \tl_if_blank:oF { #3 } { \keys_set:nn { projlib-datetime-command } { #3 } } \tl_set:Nx \l_tmpa_tl { \exp_args:Ne \tl_trim_spaces:n { #2 } } \regex_replace_all:nnN { \D } { - } \l_tmpa_tl \exp_args:Ne \__projlib_datetime_display_date_according_to_format:nn { \l_tmpa_tl } {} @@ -414,8 +416,8 @@ \NewDocumentCommand \ProjLibDate { O{} m O{} } { \group_begin: - \tl_if_blank:eF { #1 } { \keys_set:nn { projlib-datetime-command } { #1 } } - \tl_if_blank:eF { #3 } { \keys_set:nn { projlib-datetime-command } { #3 } } + \tl_if_blank:oF { #1 } { \keys_set:nn { projlib-datetime-command } { #1 } } + \tl_if_blank:oF { #3 } { \keys_set:nn { projlib-datetime-command } { #3 } } \tl_set:Nx \l_tmpa_tl { \exp_args:Ne \tl_trim_spaces:n { #2 } } \regex_replace_all:nnN { \D } { - } \l_tmpa_tl \exp_args:Ne \__projlib_datetime_display_date_according_to_format:nn { \l_tmpa_tl } { _uppercase } diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-draft.sty b/Master/texmf-dist/tex/latex/projlib/projlib-draft.sty index 1d62b45e366..30a0013d084 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-draft.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-draft.sty @@ -15,11 +15,11 @@ %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% -\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\NeedsTeXFormat{LaTeX2e}[2022-06-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-draft} - {2022/04/24} {} + {2022/06/15} {} {Useful commands during draft stage} \keys_define:nn { projlib-draft } @@ -132,7 +132,7 @@ } \tl_new:c { projlib_draft_DNF_font } -\tl_gset:cn { projlib_draft_DNF_font } { \small \normalfont \bfseries \ttfamily \hyphenchar\font=`\-\spaceskip=.5em ~ plus ~ .5em\xspaceskip=.5em } +\tl_gset:cn { projlib_draft_DNF_font } { \small \normalfont \bfseries } \definecolor { projlib_draft_DNF_color } { RGB } { 21, 122, 20 } @@ -140,7 +140,7 @@ \tl_new:N \g__projlib_draft_DNF_report_tl -\NewDocumentCommand \DNF { D<>{} } +\NewDocumentCommand \DNF { s D<>{} } { \noindent \group_begin: @@ -153,17 +153,19 @@ \nobreak \projlib_draft_plain_box:nn { projlib_draft_DNF_color } { - \projlib_draft_DNF_text - \nobreakspace + \IfBooleanF { #1 } { \projlib_draft_DNF_text \nobreakspace } + \group_begin: \ttfamily \# \theprojlib_draft_DNF_counter - \tl_if_blank:nF { #1 } { \, : ~ } - \tl_trim_spaces:n { #1 } + \group_end: + \tl_if_blank:nF { #2 } { : \nobreakspace } + \tl_trim_spaces:n { #2 } } \group_end: \tl_gput_right:Nn \g__projlib_draft_DNF_report_tl { \setlength { \parfillskip } { 0pt plus 1fil } \noindent + \group_begin: \ttfamily \# \, } \tl_gput_right:Nx \g__projlib_draft_DNF_report_tl @@ -172,6 +174,7 @@ } \tl_gput_right:Nn \g__projlib_draft_DNF_report_tl { + \group_end: \c_space_tl \c_space_tl $\langle$ \skip_horizontal:n { 0.1em } @@ -191,8 +194,8 @@ \skip_horizontal:n { 0.1em } $\rangle$ \nobreakspace - \tl_if_blank:nF { #1 } { : ~ } - \tl_trim_spaces:n { #1 } + \tl_if_blank:nF { #2 } { : ~ } + \tl_trim_spaces:n { #2 } \par \skip_vertical:n { -\parskip } \skip_vertical:n { .15\baselineskip } } diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-font.sty b/Master/texmf-dist/tex/latex/projlib/projlib-font.sty index 6d6fed9fa2a..cfa1d6bb5e5 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-font.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-font.sty @@ -15,11 +15,11 @@ %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% -\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\NeedsTeXFormat{LaTeX2e}[2022-06-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-font} - {2022/04/24} {} + {2022/06/15} {} {Font selection and configuration} \keys_define:nn { projlib-font } @@ -51,6 +51,7 @@ \bool_new:N \g_projlib_font_already_set_bool \bool_gset_false:N \g_projlib_font_already_set_bool +\RequirePackage { anyfontsize } \RequirePackage { setspace } \cs_new:Nn \projlib_font_set_linespacing_latin:n @@ -80,73 +81,43 @@ \bool_if:NT \l__projlib_font_palatino_bool { - \sys_if_engine_pdftex:TF - { - \RequirePackage { mathpazo } - \PassOptionsToPackage { defaultsups } { newpxtext } - \RequirePackage { newpxtext } - \cs_undefine:c { openbox } - \bool_if:NT \l__projlib_font_useosf_bool { \useosf } - } - { - \PassOptionsToPackage { warnings-off = { mathtools-colon, mathtools-overbracket } } { unicode-math } - \RequirePackage { unicode-math } - \defaultfontfeatures{ Scale=MatchLowercase, Ligatures=TeX } - \bool_if:NTF \l__projlib_font_useosf_bool - { - \setmainfont { TeXGyrePagellaX-Regular.otf } - [ - BoldFont = TeXGyrePagellaX-Bold.otf , - ItalicFont = TeXGyrePagellaX-Italic.otf , - BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf, - Numbers = OldStyle ] - } - { - \setmainfont { TeXGyrePagellaX-Regular.otf } - [ - BoldFont = TeXGyrePagellaX-Bold.otf , - ItalicFont = TeXGyrePagellaX-Italic.otf , - BoldItalicFont = TeXGyrePagellaX-BoldItalic.otf, - ] - } - \setmathfont { texgyrepagella-math.otf } - } + \RequirePackage { mathpazo } + \PassOptionsToPackage { defaultsups } { newpxtext } + \RequirePackage { newpxtext } + \cs_undefine:c { openbox } + \bool_if:NT \l__projlib_font_useosf_bool { \useosf } + \sys_if_engine_pdftex:F + { + \setsansfont { texgyreheros } + [ + Scale = MatchUppercase , + UprightFont = *-regular , + BoldFont = *-bold , + ItalicFont = *-italic , + BoldItalicFont = *-bolditalic , + ] + } \projlib_font_set_linespacing_latin:n { \setstretch { 1.07 } } \bool_gset_true:N \g_projlib_font_already_set_bool } \bool_if:NT \l__projlib_font_times_bool { - \sys_if_engine_pdftex:TF - { - \PassOptionsToPackage { defaultsups } { newtxtext } - \RequirePackage { newtxtext } - \RequirePackage { newtxmath } - \cs_undefine:c { openbox } - \bool_if:NT \l__projlib_font_useosf_bool { \useosf } - } + \PassOptionsToPackage { defaultsups } { newtxtext } + \RequirePackage { newtxtext } + \RequirePackage { newtxmath } + \cs_undefine:c { openbox } + \bool_if:NT \l__projlib_font_useosf_bool { \useosf } + \sys_if_engine_pdftex:F { - \PassOptionsToPackage { warnings-off = { mathtools-colon, mathtools-overbracket } } { unicode-math } - \RequirePackage { unicode-math } - \defaultfontfeatures{ Scale=MatchLowercase, Ligatures=TeX } - \bool_if:NTF \l__projlib_font_useosf_bool - { - \setmainfont { TeXGyreTermesX-Regular.otf } - [ - BoldFont = TeXGyreTermesX-Bold.otf , - ItalicFont = TeXGyreTermesX-Italic.otf , - BoldItalicFont = TeXGyreTermesX-BoldItalic.otf, - Numbers = OldStyle ] - } - { - \setmainfont { TeXGyreTermesX-Regular.otf } - [ - BoldFont = TeXGyreTermesX-Bold.otf , - ItalicFont = TeXGyreTermesX-Italic.otf , - BoldItalicFont = TeXGyreTermesX-BoldItalic.otf, - ] - } - \setmathfont { texgyretermes-math.otf } + \setsansfont { texgyreheros } + [ + Scale = MatchUppercase , + UprightFont = *-regular , + BoldFont = *-bold , + ItalicFont = *-italic , + BoldItalicFont = *-bolditalic , + ] } \projlib_font_set_linespacing_latin:n { \setstretch { 1.00 } } \bool_gset_true:N \g_projlib_font_already_set_bool @@ -197,17 +168,21 @@ \RequirePackage { fontspec } \bool_if:NTF \l__projlib_font_useosf_bool { - \setmainfont { LinBiolinum_R.otf } [ - BoldFont = LinBiolinum_RB.otf , - ItalicFont = LinBiolinum_RI.otf , - BoldItalicFont = LinBiolinum_RBO.otf , - Numbers = OldStyle , ] + \setmainfont { LinBiolinum_R.otf } + [ + BoldFont = LinBiolinum_RB.otf , + ItalicFont = LinBiolinum_RI.otf , + BoldItalicFont = LinBiolinum_RBO.otf , + Numbers = OldStyle , + ] } { - \setmainfont { LinBiolinum_R.otf } [ - BoldFont = LinBiolinum_RB.otf , - ItalicFont = LinBiolinum_RI.otf , - BoldItalicFont = LinBiolinum_RBO.otf , ] + \setmainfont { LinBiolinum_R.otf } + [ + BoldFont = LinBiolinum_RB.otf , + ItalicFont = LinBiolinum_RI.otf , + BoldItalicFont = LinBiolinum_RBO.otf , + ] } } \projlib_font_set_linespacing_latin:n { \setstretch { 1.05 } } diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-language.sty b/Master/texmf-dist/tex/latex/projlib/projlib-language.sty index 673652b2328..8fb7702aeea 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-language.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-language.sty @@ -15,11 +15,11 @@ %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% -\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\NeedsTeXFormat{LaTeX2e}[2022-06-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-language} - {2022/04/24} {} + {2022/06/15} {} {Multi-language configuration} \clist_const:Nn \c__projlib_language_supported_clist @@ -541,7 +541,7 @@ \hook_gput_code:nnn { begindocument } { projlib-language } { - \@ifpackageloaded { parskip } + \IfPackageLoadedTF { parskip } { \tl_gset:Nn \g_projlib_language_parindent_latin_tl { diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-logo.sty b/Master/texmf-dist/tex/latex/projlib/projlib-logo.sty index 641acd999a4..fc2407cefe5 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-logo.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-logo.sty @@ -15,11 +15,11 @@ %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% -\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\NeedsTeXFormat{LaTeX2e}[2022-06-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-logo} - {2022/04/24} {} + {2022/06/15} {} {The ProjLib logo} \keys_define:nn { projlib-logo } diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-math.sty b/Master/texmf-dist/tex/latex/projlib/projlib-math.sty index 8d7d017b06d..2b2d8c975b3 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-math.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-math.sty @@ -15,11 +15,11 @@ %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% -\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\NeedsTeXFormat{LaTeX2e}[2022-06-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-math} - {2022/04/24} {} + {2022/06/15} {} {Efficient math setup} \keys_define:nn { projlib-math } @@ -31,7 +31,7 @@ \RequirePackage { mathtools } \RequirePackage { mathrsfs } \PassOptionsToPackage { warnings-off = { mathtools-colon, mathtools-overbracket } } { unicode-math } -\@ifpackageloaded { unicode-math } {} { \RequirePackage { amssymb } } +\IfPackageLoadedTF { unicode-math } {} { \RequirePackage { amssymb } } \msg_new:nnn { projlib-math } { operator-not-define } @@ -128,7 +128,7 @@ { \clist_clear:N \l__projlib_math_shortcut_prefix_clist \tl_clear:N \l__projlib_math_shortcut_type_tl - \tl_clear:N \l__projlib_math_shortcut_style_tl + \tl_set:Nn \l__projlib_math_shortcut_style_tl { \mathrm } \keys_set:nn { projlib-math-shortcut } { #3 } \tl_if_empty:NF \l__projlib_math_shortcut_type_tl { diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-paper.sty b/Master/texmf-dist/tex/latex/projlib/projlib-paper.sty index d50c225c534..09129a2ae6f 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-paper.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-paper.sty @@ -15,11 +15,11 @@ %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% -\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\NeedsTeXFormat{LaTeX2e}[2022-06-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-paper} - {2022/04/24} {} + {2022/06/15} {} {Configuration of the paper style} \keys_define:nn { projlib-paper } @@ -125,10 +125,13 @@ \projlib_paper_set_page_color:n { paper } \projlib_paper_set_text_color:n { main-text } -\hook_gput_code:nnn { begindocument/before } { projlib-paper } +\hook_gput_code:nnn { package/tcolorbox/after } { projlib-paper } + { + \tcbset { colupper = main-text, collower = main-text } + } +\hook_gput_code:nnn { package/tikz-cd/after } { projlib-paper } { - \cs_if_exist:NT \tcbset - { \tcbset { colupper = main-text, collower = main-text } } + \tikzset { /tikz/commutative~diagrams/background~color = paper } } \endinput diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-theorem.sty b/Master/texmf-dist/tex/latex/projlib/projlib-theorem.sty index 5f528352904..45fed9d1393 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-theorem.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-theorem.sty @@ -15,11 +15,11 @@ %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% -\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\NeedsTeXFormat{LaTeX2e}[2022-06-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-theorem} - {2022/04/24} {} + {2022/06/15} {} {Configuration of theorem-like environments} \keys_define:nn { projlib-theorem } @@ -105,13 +105,13 @@ \bool_set_true:N \l__projlib_theorem_no_theorem_numbering_bool \bool_if:NF \l__projlib_theorem_no_theorems_bool { - \cs_undefine:c { theorem } - \cs_undefine:c { lemma } - \cs_undefine:c { corollary } - \cs_undefine:c { definition } - \cs_undefine:c { fact } - \cs_undefine:c { example } - \cs_undefine:c { problem } + \cs_undefine:c { theorem } \cs_undefine:c { endtheorem } + \cs_undefine:c { lemma } \cs_undefine:c { endlemma } + \cs_undefine:c { corollary } \cs_undefine:c { endcorollary } + \cs_undefine:c { definition } \cs_undefine:c { enddefinition } + \cs_undefine:c { fact } \cs_undefine:c { endfact } + \cs_undefine:c { example } \cs_undefine:c { endexample } + \cs_undefine:c { problem } \cs_undefine:c { endproblem } } } {} @@ -120,7 +120,17 @@ \cs_new_protected:Nn \projlib_theorem_preset_theorem_style:nn { - \tl_const:cn { c_crthm_theorem_style_preset_ #1 _tl } { #2 } + \str_case:nnTF { #1 } + { + { theorem-with-name } { } + { proof } { } + } + { + \tl_const:cn { c_crthm_theorem_style_preset_ #1 _inner _tl } { #2 } + } + { + \tl_const:cn { c_crthm_theorem_style_preset_ #1 _tl } { #2 } + } } \cs_generate_variant:Nn \keyval_parse:nnn { nno } @@ -129,6 +139,11 @@ { \projlib_theorem_preset_theorem_style:nn } { \l__projlib_theorem_theorem_style_tl } +\cs_if_exist:cF { c_crthm_theorem_style_preset_ proof_inner _tl } + { + \tl_const:cn { c_crthm_theorem_style_preset_ proof_inner _tl } { remark } + } + \RequirePackage { amsthm } \RequirePackage { create-theorem } @@ -142,23 +157,23 @@ \exp_args:Nv \CreateTheorem { c_projlib_theorem_supported_clist } { numberless, create starred version } } { - \tl_if_blank:eTF \l__projlib_theorem_theorem_numbering_tl + \tl_if_blank:oTF \l__projlib_theorem_theorem_numbering_tl { \cs_if_exist:cTF { c@chapter } { % with \chapter - \CreateTheorem {theorem} { parent counter = chapter, create starred version } + \CreateTheorem { theorem } { parent counter = chapter, create starred version } } { % without \chapter - \CreateTheorem {theorem} { parent counter = section, create starred version } + \CreateTheorem { theorem } { parent counter = section, create starred version } } } { \tl_if_eq:NnTF \l__projlib_theorem_theorem_numbering_tl { * } { - \CreateTheorem {theorem} { create starred version } + \CreateTheorem { theorem } { create starred version } } { - \CreateTheorem {theorem} { parent counter = \l__projlib_theorem_theorem_numbering_tl, create starred version } + \CreateTheorem { theorem } { parent counter = \l__projlib_theorem_theorem_numbering_tl, create starred version } } } @@ -166,8 +181,12 @@ } } +\newcounter { theorem-with-name } +\newcounter { proof } +\crthm_counter_alias:nn { theorem-with-name } { theorem } + \tl_new:N \l_projlib_theorem_name_of_theorem_with_name_tl -\CreateTheorem { theorem-with-name_inner } { name = { heading = { \l_projlib_theorem_name_of_theorem_with_name_tl } }, create-starred-version } +\CreateTheorem { theorem-with-name_inner } { name = { heading = { \l_projlib_theorem_name_of_theorem_with_name_tl } }, create-starred-version, shared-counter=theorem-with-name } \NewDocumentEnvironment { theorem-with-name } { m O{} } { @@ -186,6 +205,35 @@ \end { theorem-with-name_inner* } } +\SetTheoremBinding { theorem-with-name } { theorem-with-name_inner } +\SetTheoremBinding { theorem-with-name* } { theorem-with-name_inner* } + +\tl_new:N \l_projlib_theorem_name_of_proof_tl +\CreateTheorem { proof_inner } { name = { heading = { \l_projlib_theorem_name_of_proof_tl } }, create-starred-version, qed, shared-counter = proof } + +\cs_undefine:c { proof } +\cs_undefine:c { endproof } + +\NewDocumentEnvironment { proof } { O{\proofname} } + { + \tl_set:Nn \l_projlib_theorem_name_of_proof_tl { #1 } + \begin { proof_inner } + } + { + \end { proof_inner } + } +\NewDocumentEnvironment { proof* } { O{\proofname} } + { + \tl_set:Nn \l_projlib_theorem_name_of_proof_tl { #1 } + \begin { proof_inner* } + } + { + \end { proof_inner* } + } + +\SetTheoremBinding { proof } { proof_inner } +\SetTheoremBinding { proof* } { proof_inner* } + \cs_new_protected:Nn \projlib_theorem_disable_theorem_numbering:n { \clist_map_inline:nn { #1 } @@ -222,7 +270,7 @@ \projlib_theorem_switch_theorem_numbering:n { #1 } } -\SwitchTheoremNumbering { theorem-with-name } +\SwitchTheoremNumbering { theorem-with-name, proof } \AddLanguageSetting [ schinese ] { diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-titlepage.sty b/Master/texmf-dist/tex/latex/projlib/projlib-titlepage.sty index 2874ec816bb..a79e5ff329a 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-titlepage.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-titlepage.sty @@ -15,11 +15,11 @@ %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% -\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\NeedsTeXFormat{LaTeX2e}[2022-06-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-titlepage} - {2022/04/24} {} + {2022/06/15} {} {Commands for rendering the title page} \keys_define:nn { projlib-titlepage } @@ -104,10 +104,11 @@ \cs_new_protected:Nn \projlib_titlepage_render_with_style_simple: { \begin{tikzpicture}[overlay,remember~picture] + \fill[color=white] ($(current~page.south~west)$) rectangle ($(current~page.north~east)$); \fill[color=titlepage-main] ($(current~page.south~west)$) rectangle ($(current~page.north~east)+(0,-.3\paperheight)$); \node[text~width=.3\paperwidth,text~height=.2\paperheight] at ($(current~page.north~west)+(.27\paperwidth,-.15\paperheight)$) { \l_projlib_titlepage_logo_tl }; - \node[text~width=.8\paperwidth,text~height=.4\paperheight] at ($(current~page.north~west)+(.52\paperwidth,-.33\paperheight)$) {\textcolor{paper}{\fontsize{24pt}{28pt}\selectfont\sffamily\textsc{ \l_projlib_titlepage_title_tl }\\[1.5em]\fontsize{18pt}{22pt}\selectfont{ \l_projlib_titlepage_subtitle_tl }}}; - \node[text~width=.3\paperwidth,text~height=.3\paperheight] at ($(current~page.south)+(.2\paperwidth,.3\paperheight)$) {\color{paper}\begin{flushright}\fontsize{16pt}{18pt}\selectfont\textsc{ \l_projlib_titlepage_author_tl }\\[1em]\fontsize{12pt}{14pt}\selectfont \l_projlib_titlepage_date_tl \end{flushright} }; + \node[text~width=.8\paperwidth,text~height=.4\paperheight] at ($(current~page.north~west)+(.52\paperwidth,-.33\paperheight)$) {\textcolor{white}{\fontsize{24pt}{28pt}\selectfont\sffamily\textsc{ \l_projlib_titlepage_title_tl }\\[1.5em]\fontsize{18pt}{22pt}\selectfont{ \l_projlib_titlepage_subtitle_tl }}}; + \node[text~width=.3\paperwidth,text~height=.3\paperheight] at ($(current~page.south)+(.2\paperwidth,.3\paperheight)$) {\color{white}\begin{flushright}\fontsize{16pt}{18pt}\selectfont\textsc{ \l_projlib_titlepage_author_tl }\\[1em]\fontsize{12pt}{14pt}\selectfont \l_projlib_titlepage_date_tl \end{flushright} }; \end{tikzpicture} } |