diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-12 20:34:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-12 20:34:46 +0000 |
commit | a5952dd62e1608ef0fbc01ced6d9344ea5d69cb7 (patch) | |
tree | 7115de7390b92535d1ae2ca1577a3a82acfd7fda /Master/texmf-dist/tex/latex/projlib | |
parent | 65307ba55aef6eb6541ec5ac312ac8556b24e690 (diff) |
projlib (12mar22)
git-svn-id: svn://tug.org/texlive/trunk@62661 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/projlib')
10 files changed, 397 insertions, 168 deletions
diff --git a/Master/texmf-dist/tex/latex/projlib/ProjLib.sty b/Master/texmf-dist/tex/latex/projlib/ProjLib.sty index 0e0cdd3666c..cf262b3fe19 100644 --- a/Master/texmf-dist/tex/latex/projlib/ProjLib.sty +++ b/Master/texmf-dist/tex/latex/projlib/ProjLib.sty @@ -1,29 +1,64 @@ +%% +%% This is file `ProjLib.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the ProjLib Toolkit. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {ProjLib} - {2022/03/09} {} + {2022/03/11} {} {Collective interface of the ProjLib toolkit} \keys_define:nn { ProjLib } { - , unknown .code:n = { - \PassOptionsToPackage { \CurrentOption } { projlib-language } - \PassOptionsToPackage { \CurrentOption } { projlib-author } - \PassOptionsToPackage { \CurrentOption } { projlib-datetime } - \PassOptionsToPackage { \CurrentOption } { projlib-draft } - \PassOptionsToPackage { \CurrentOption } { projlib-font } - \PassOptionsToPackage { \CurrentOption } { projlib-logo } - \PassOptionsToPackage { \CurrentOption } { projlib-math } - \PassOptionsToPackage { \CurrentOption } { projlib-paper } - \PassOptionsToPackage { \CurrentOption } { projlib-theorem } - } + , author .bool_set:N = \l__projlib_main_author_bool + , author .initial:n = { false } + , author-block .bool_set:N = \l__projlib_main_author_bool + , author~block .bool_set:N = \l__projlib_main_author_bool + , author block .bool_set:N = \l__projlib_main_author_bool + , ams-fashion .bool_set:N = \l__projlib_main_amsfashion_bool + , ams-fashion .initial:n = { false } + , ams~fashion .bool_set:N = \l__projlib_main_amsfashion_bool + , ams fashion .bool_set:N = \l__projlib_main_amsfashion_bool + , unknown .code:n = { + \PassOptionsToPackage { \CurrentOption } { projlib-language } + \PassOptionsToPackage { \CurrentOption } { projlib-author } + \PassOptionsToPackage { \CurrentOption } { projlib-datetime } + \PassOptionsToPackage { \CurrentOption } { projlib-draft } + \PassOptionsToPackage { \CurrentOption } { projlib-font } + \PassOptionsToPackage { \CurrentOption } { projlib-logo } + \PassOptionsToPackage { \CurrentOption } { projlib-math } + \PassOptionsToPackage { \CurrentOption } { projlib-paper } + \PassOptionsToPackage { \CurrentOption } { projlib-theorem } + } } \ProcessKeysOptions { ProjLib } +\bool_if:NT \l__projlib_main_amsfashion_bool + { + \bool_set_true:N \l__projlib_main_author_bool + \PassOptionsToPackage { amsfashion } { projlib-author } + } + \RequirePackage { projlib-language } -\RequirePackage { projlib-author } +\bool_if:NT \l__projlib_main_author_bool + { + \RequirePackage { projlib-author } + } \RequirePackage { projlib-datetime } \RequirePackage { projlib-draft } \RequirePackage { projlib-font } diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-author.sty b/Master/texmf-dist/tex/latex/projlib/projlib-author.sty index 2ad44ff6a3e..e3929df4e51 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-author.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-author.sty @@ -1,8 +1,25 @@ +%% +%% This is file `projlib-author.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the ProjLib Toolkit. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-author} - {2022/03/09} {} + {2022/03/11} {} {Enhanced author information block} \keys_define:nn { projlib-author } @@ -35,7 +52,6 @@ \dim_set:Nn \g__projlib_author_length_sep_dim { 0.5 \baselineskip } \dim_set:Nn \g__projlib_author_length_aftersep_dim { 0.3 \baselineskip } - \bool_new:N \g__projlib_author_affil_already_exist_bool \NewCommandCopy \projlib_author_backup_author:w \author @@ -98,8 +114,9 @@ \RequirePackage { regexpatch } -\xpatchcmd { \@maketitle } { \begin{tabular}[t]{c} } {} {} { \FAIL } -\xpatchcmd { \@maketitle } { \end{tabular} } {} {} { \FAIL } +\xpatchcmd { \@maketitle } { \begin{tabular}[t]{c} } {} { + \xpatchcmd { \@maketitle } { \end{tabular} } {} {} {} +} {} \tl_set:cn {@author} {} @@ -176,7 +193,7 @@ \NewDocumentCommand \thanks { m } { - \tl_if_blank:eF { #1 } + \tl_if_blank:nF { #1 } { \hook_gput_code:nnn { cmd/@title/after } { projlib-author } { @@ -208,6 +225,7 @@ \bool_new:N \g__projlib_author_abstract_before_maketitle_bool \bool_gset_false:N \g__projlib_author_abstract_before_maketitle_bool + \msg_redirect_name:nnn { scontents } { unsupported-verbatim } { info } \RequirePackage{ scontents } \newenvsc{abstract}[store-env=projlib-author-abstract,print-env=false] @@ -243,7 +261,7 @@ \skip_vertical:n { \dim_eval:n { -1.7 \baselineskip } } } } - } {} { \FAIL } + } {} {} \makeatother \hook_gput_code:nnn { cmd/maketitle/before } { projlib-author } diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-datetime.sty b/Master/texmf-dist/tex/latex/projlib/projlib-datetime.sty index 07c1473171a..aa182abe7c0 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-datetime.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-datetime.sty @@ -1,8 +1,25 @@ +%% +%% This is file `projlib-datetime.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the ProjLib Toolkit. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-datetime} - {2022/03/03} {} + {2022/03/11} {} {Convert numeric date-time string to natural language} \tl_new:N \g__projlib_datetime_input_format_tl @@ -72,7 +89,6 @@ \projlib_datetime_set_input_format:n { #1 } } - \seq_new:N \l__projlib_datetime_date_seq \cs_new_protected:Nn \projlib_datetime_text_superscript:n @@ -83,7 +99,6 @@ \group_end: } - \cs_new:Nn \__projlib_datetime_today:n { \str_case_e:nnF { \l__projlib_datetime_output_format_tl } @@ -146,10 +161,6 @@ \group_end: } -\ProvideDocumentCommand \Thedate {} { \ProjLibdate } -\ProvideDocumentCommand \TheDate {} { \ProjLibDate } - - \cs_new_protected:Nn \projlib_datetime_display_year_month_day:n { \__projlib_datetime_display_year_month_day:en { #1 } {} @@ -194,7 +205,6 @@ } \cs_generate_variant:Nn \__projlib_datetime_display_year_month_day:nn { en } - \cs_new_protected:Nn \projlib_datetime_display_month_day_year:n { \__projlib_datetime_display_month_day_year:en { #1 } {} @@ -239,7 +249,6 @@ } \cs_generate_variant:Nn \__projlib_datetime_display_month_day_year:nn { en } - \cs_new_protected:Nn \projlib_datetime_display_day_month_year:n { \__projlib_datetime_display_day_month_year:en { #1 } {} @@ -284,7 +293,6 @@ } \cs_generate_variant:Nn \__projlib_datetime_display_day_month_year:nn { en } - \cs_new_protected:Nn \__projlib_datetime_date_parse_year_month_day:n { \regex_match:nnTF { \A \d{4}-\d{1,2}(|-\d{1,2}) \Z } { #1 } @@ -382,26 +390,30 @@ } } -\NewDocumentCommand \ProjLibdate { O{} m } +\NewDocumentCommand \ProjLibdate { O{} m O{} } { \group_begin: - \keys_set:nn { projlib-datetime-command } { #1 } - \tl_set:Nn \l_tmpa_tl { #2 } + \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_set:Nx \l_tmpa_tl { #2 } \regex_replace_all:nnN { \D } { - } \l_tmpa_tl - \__projlib_datetime_display_date_according_to_format:nn { \l_tmpa_tl } {} + \exp_args:Ne \__projlib_datetime_display_date_according_to_format:nn { \l_tmpa_tl } {} \group_end: } -\NewDocumentCommand \ProjLibDate { O{} m } + \NewDocumentCommand \ProjLibDate { O{} m O{} } { \group_begin: - \keys_set:nn { projlib-datetime-command } { #1 } - \tl_set:Nn \l_tmpa_tl { #2 } + \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_set:Nx \l_tmpa_tl { #2 } \regex_replace_all:nnN { \D } { - } \l_tmpa_tl - \__projlib_datetime_display_date_according_to_format:nn { \l_tmpa_tl } { _uppercase } + \exp_args:Ne \__projlib_datetime_display_date_according_to_format:nn { \l_tmpa_tl } { _uppercase } \group_end: } +\ProvideDocumentCommand \Thedate {} { \ProjLibdate } +\ProvideDocumentCommand \TheDate {} { \ProjLibDate } \int_new:N \l__projlib_datetime_day_of_week_day_int \int_new:N \l__projlib_datetime_day_of_week_month_int @@ -463,7 +475,6 @@ } } - \cs_new_protected:Nn \projlib_datetime_display_week:n { \__projlib_datetime_display_week_according_to_format:en { #1 } {} @@ -481,7 +492,6 @@ } \cs_generate_variant:Nn \__projlib_datetime_display_week_according_to_format:nn { en } - \cs_new_protected:Nn \projlib_datetime_calculate_week_according_to_format:n { \cs_if_exist_use:c { __projlib_datetime_date_parse_ \__projlib_datetime_input_format_to_str: :n } { #1 } @@ -492,22 +502,6 @@ } -% For each language, there are 7 groups of functions: -% 1) \projlib_datetime_display_year_month_day_<languagename>:nnn -% \projlib_datetime_display_year_month_day_uppercase_<languagename>:nnn -% 2) \projlib_datetime_display_year_month_<languagename>:nn -% \projlib_datetime_display_year_month_uppercase_<languagename>:nn -% 3) \projlib_datetime_display_month_day_<languagename>:nn -% \projlib_datetime_display_month_day_uppercase_<languagename>:nn -% 4) \projlib_datetime_display_year_<languagename>:n -% \projlib_datetime_display_year_uppercase_<languagename>:n -% 5) \projlib_datetime_display_month_<languagename>:n -% \projlib_datetime_display_month_uppercase_<languagename>:n -% 6) \projlib_datetime_display_day_<languagename>:n -% \projlib_datetime_display_day_uppercase_<languagename>:n -% 7) \projlib_datetime_display_week_<languagename>:n -% \projlib_datetime_display_week_uppercase_<languagename>:n - \cs_new:Nn \projlib_datetime_display_year_month_day_english:nnn { \projlib_datetime_display_month_day_english:nn { #2 } { #3 } @@ -605,7 +599,6 @@ \projlib_datetime_display_week_english:n { #1 } } - \cs_new:Nn \projlib_datetime_display_year_month_day_french:nnn { \projlib_datetime_display_month_day_french:nn { #2 } { #3 } @@ -737,7 +730,6 @@ } { ??? } } - \cs_new:Nn \projlib_datetime_display_year_month_day_ngerman:nnn { \projlib_datetime_display_month_day_ngerman:nn { #2 } { #3 } @@ -847,7 +839,6 @@ \projlib_datetime_display_week_ngerman:n { #1 } } - \cs_new:Nn \projlib_datetime_display_year_month_day_italian:nnn { \projlib_datetime_display_month_day_italian:nn { #2 } { #3 } @@ -966,7 +957,6 @@ } { ??? } } - \cs_new:Nn \projlib_datetime_display_year_month_day_portuguese:nnn { \projlib_datetime_display_month_day_portuguese:nn { #2 } { #3 } @@ -1085,7 +1075,6 @@ } { ??? } } - \cs_new:Nn \projlib_datetime_display_year_month_day_brazilian:nnn { \projlib_datetime_display_month_day_brazilian:nn { #2 } { #3 } @@ -1204,7 +1193,6 @@ } { ??? } } - \cs_new:Nn \projlib_datetime_display_year_month_day_spanish:nnn { \projlib_datetime_display_month_day_spanish:nn { #2 } { #3 } @@ -1323,7 +1311,6 @@ } { ??? } } - \cs_new:Nn \projlib_datetime_display_year_month_day_schinese:nnn { #1 年 #2 月 #3 日 @@ -1386,7 +1373,6 @@ \projlib_datetime_display_week_schinese:n { #1 } } - \cs_new:Nn \projlib_datetime_display_year_month_day_tchinese:nnn { #1 年 #2 月 #3 日 @@ -1449,7 +1435,6 @@ \projlib_datetime_display_week_tchinese:n { #1 } } - \cs_new:Nn \projlib_datetime_display_year_month_day_japanese:nnn { #1 年 #2 月 #3 日 @@ -1512,7 +1497,6 @@ \projlib_datetime_display_week_japanese:n { #1 } } - \cs_new:Nn \projlib_datetime_display_year_month_day_russian:nnn { \projlib_datetime_display_month_day_russian:nn { #2 } { #3 } diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-draft.sty b/Master/texmf-dist/tex/latex/projlib/projlib-draft.sty index 6c7fe818c7c..9c9fd22e01b 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-draft.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-draft.sty @@ -1,8 +1,25 @@ +%% +%% This is file `projlib-draft.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the ProjLib Toolkit. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-draft} - {2022/02/24} {} + {2022/03/11} {} {Useful commands during draft stage} \keys_define:nn { projlib-draft } diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-font.sty b/Master/texmf-dist/tex/latex/projlib/projlib-font.sty index c308c1c66d7..50ffb4258c2 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-font.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-font.sty @@ -1,8 +1,25 @@ +%% +%% This is file `projlib-font.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the ProjLib Toolkit. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-font} - {2022/03/01} {} + {2022/03/11} {} {Font selection and configuration} \keys_define:nn { projlib-font } @@ -31,6 +48,9 @@ } \ProcessKeysOptions { projlib-font } +\bool_new:N \g_projlib_font_already_set_bool +\bool_gset_false:N \g_projlib_font_already_set_bool + \RequirePackage { setspace } \cs_new:Nn \projlib_font_set_linespacing_latin:n @@ -55,26 +75,81 @@ \RequirePackage { lmodern } } \projlib_font_set_linespacing_latin:n { \setstretch { 1.00 } } + \bool_gset_true:N \g_projlib_font_already_set_bool } \bool_if:NT \l__projlib_font_palatino_bool { - \RequirePackage { mathpazo } - \PassOptionsToPackage { defaultsups } { newpxtext } - \RequirePackage { newpxtext } - \cs_undefine:c { openbox } + \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 } + } \projlib_font_set_linespacing_latin:n { \setstretch { 1.07 } } - \bool_if:NT \l__projlib_font_useosf_bool { \useosf } + \bool_gset_true:N \g_projlib_font_already_set_bool } \bool_if:NT \l__projlib_font_times_bool { - \PassOptionsToPackage { defaultsups } { newtxtext } - \RequirePackage { newtxtext } - \RequirePackage { newtxmath } - \cs_undefine:c { openbox } + \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 { 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 } + } \projlib_font_set_linespacing_latin:n { \setstretch { 1.00 } } - \bool_if:NT \l__projlib_font_useosf_bool { \useosf } + \bool_gset_true:N \g_projlib_font_already_set_bool } \bool_if:NT \l__projlib_font_garamond_bool @@ -87,7 +162,9 @@ \cs_undefine:c { openbox } \RequirePackage { ebgaramond-maths } \RequirePackage { ebgaramond } + \cs_undefine:c { Bbbk } \projlib_font_set_linespacing_latin:n { \setstretch { 1.00 } } + \bool_gset_true:N \g_projlib_font_already_set_bool } \bool_if:NT \l__projlib_font_noto_bool @@ -98,7 +175,9 @@ } \RequirePackage { anyfontsize } \RequirePackage { notomath } + \cs_undefine:c { Bbbk } \projlib_font_set_linespacing_latin:n { \setstretch { 1.00 } } + \bool_gset_true:N \g_projlib_font_already_set_bool } \bool_if:NT \l__projlib_font_biolinum_bool @@ -133,10 +212,10 @@ } \projlib_font_set_linespacing_latin:n { \setstretch { 1.05 } } \RequirePackage [ italic, defaultmathsizes ] { mathastext } + \bool_gset_true:N \g_projlib_font_already_set_bool } -\RequirePackage { silence } -\WarningFilter { microtype } { Unable } +\PassOptionsToPackage { verbose = silent } { microtype } \RequirePackage { microtype } \endinput diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-language.sty b/Master/texmf-dist/tex/latex/projlib/projlib-language.sty index 4a67c6a018e..df1df41fd72 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-language.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-language.sty @@ -1,8 +1,25 @@ +%% +%% This is file `projlib-language.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the ProjLib Toolkit. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-language} - {2022/03/09} {} + {2022/03/11} {} {Multi-language configuration} \clist_const:Nn \c__projlib_language_supported_clist @@ -126,7 +143,6 @@ } } - \cs_new:Nn \projlib_language_str_to_languagename:n { \str_case_e:nnF { \str_foldcase:n { #1 } } @@ -220,7 +236,6 @@ \PassOptionsToPackage { italian, brazilian, spanish, ngerman, french, english } { cleveref } \RequirePackage { babel } - \bool_if:NT \g__projlib_language_enabled_french_bool { \frenchsetup { PartNameFull = false } @@ -248,7 +263,6 @@ \babelprovide { schinese } \babelprovide { tchinese } - \NewCommandCopy \projlib_language_backup_today:n \today \tl_new:N \g_projlib_language_settings_common_tl @@ -356,7 +370,7 @@ \NewDocumentCommand \AddLanguageSetting { O{} m } { - \IfNoValueTF { #1 } + \tl_if_empty:nTF { #1 } { \tl_gput_right:Nn \g_projlib_language_settings_common_tl { #2 } } @@ -365,7 +379,6 @@ } } - \RequirePackage { setspace } \tl_new:N \g_projlib_language_linespacing_latin_tl @@ -446,7 +459,6 @@ \use:c { projlib_language_set_ #1 _ #2 :n } { #3 } } - \cs_new:Nn \projlib_language_use_language_pure:n { \tl_use:c { g_projlib_language_settings_ \projlib_language_str_to_languagename:n { #1 } _tl } @@ -478,7 +490,6 @@ \UseLanguage { \g__projlib_language_main_str } - \cs_new:Nn \projlib_langauge_define_multilingual_text:Nn { % #1 = command name (with backslash) % #2 = key-value name configuration diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-logo.sty b/Master/texmf-dist/tex/latex/projlib/projlib-logo.sty index d9ffb5c1ed2..ee59a9e5f43 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-logo.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-logo.sty @@ -1,8 +1,25 @@ +%% +%% This is file `projlib-logo.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the ProjLib Toolkit. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-logo} - {2022/02/24} {} + {2022/03/11} {} {The ProjLib logo} \keys_define:nn { projlib-logo } @@ -54,21 +71,6 @@ } } -% \RequirePackage { xcolor } -% \cs_new_protected:Nn \projlib_logo_generic:n -% { -% \group_begin: -% \normalfont -% \__projlib_logo_font: -% \textcolor { blue!55!cyan } { P } -% \textcolor { blue!45!cyan } { r } -% \textcolor { blue!30!cyan } { o } -% \textcolor { green!70!black!70 } { #1 } -% \textcolor { red!20!yellow } { L } -% \textcolor { red!40!yellow } { i } -% \textcolor { red!55!yellow } { b } -% \group_end: -% } \cs_new_protected:Nn \projlib_logo_generic:n { \group_begin: diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-math.sty b/Master/texmf-dist/tex/latex/projlib/projlib-math.sty index 977a4280038..04d1f190bd4 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-math.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-math.sty @@ -1,8 +1,25 @@ +%% +%% This is file `projlib-math.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the ProjLib Toolkit. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-math} - {2022/02/26} {} + {2022/03/11} {} {Efficient math setup} \keys_define:nn { projlib-math } @@ -16,7 +33,6 @@ \PassOptionsToPackage { warnings-off = { mathtools-colon, mathtools-overbracket } } { unicode-math } \@ifpackageloaded { unicode-math } {} { \RequirePackage { amssymb } } - \msg_new:nnn { projlib-math } { operator-not-define } { The~math~operator~"\iow_char:N \\#1"~cannot~be~defined,~a~command~with~the~same~name~has~already~existed. } @@ -87,7 +103,6 @@ } } - \msg_new:nnn { projlib-math } { shortcut-not-define } { The~shortcut~"\iow_char:N \\#1"~cannot~be~defined,~a~command~with~the~same~name~has~already~existed. } @@ -190,45 +205,6 @@ } } -%=============================== -% -- Some possible operators -- -%=============================== -% \DefineOperator { ord, card, car, disc } [ style = \mathsf ] -% \DefineOperator { id, Id, Ker, Image = Im } [ style = \mathsf ] -% \DefineOperator { Orb, Stab, Fix } [ style = \mathsf ] -% \DefineOperator { Hom, Aut, End, Mat } [ style = \mathsf ] -% \DefineOperator { Spec, Spm, Ann } [ style = \mathsf ] -% \DefineOperator*{ Lim, Max, Min } [ style = \mathsf ] - -%=============================== -% -- Some possible shortcuts -- -%=============================== -% \DefineShortcut [ type = category, style = \mathbf ] -% { -% Set, Grp, Ring, Top -% } -% \DefineShortcut [ style = \mathbb ] -% { -% N, Z, Q, R, C, F, A -% } -% \DefineShortcut [ prefix = bb, style = \mathbb ] -% { -% A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z -% } -% \DefineShortcut [ prefix = { mf, frak }, style = \mathfrak ] -% { -% A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, -% a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z -% } -% \DefineShortcut [ prefix = { mc, cal }, style = \mathcal ] -% { -% A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z -% } -% \DefineShortcut [ prefix = { ms, scr }, style = \mathscr ] -% { -% A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z -% } - \endinput %% %% End of file `projlib-math.sty'. diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-paper.sty b/Master/texmf-dist/tex/latex/projlib/projlib-paper.sty index bb13bbe00a2..6835198f3a7 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-paper.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-paper.sty @@ -1,8 +1,25 @@ +%% +%% This is file `projlib-paper.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the ProjLib Toolkit. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-paper} - {2022/03/09} {} + {2022/03/11} {} {Configuration of the paper style} \keys_define:nn { projlib-paper } diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-theorem.sty b/Master/texmf-dist/tex/latex/projlib/projlib-theorem.sty index 092ca2f0ead..69d1ed3261d 100644 --- a/Master/texmf-dist/tex/latex/projlib/projlib-theorem.sty +++ b/Master/texmf-dist/tex/latex/projlib/projlib-theorem.sty @@ -1,8 +1,25 @@ +%% +%% This is file `projlib-theorem.sty', +%% generated with the docstrip utility. + +%% Copyright (C) 2021-2022 by Jinwen XU +%% +%% This is part of the ProjLib Toolkit. +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3c of this license or (at +%% your option) any later version. The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3c or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-theorem} - {2022/03/09} {} + {2022/03/11} {} {Configuration of theorem-like environments} \keys_define:nn { projlib-theorem } @@ -29,10 +46,9 @@ , complex-name .initial:n = { true } , complex~name .bool_set:N = \l__projlib_theorem_complexname_bool , complex name .bool_set:N = \l__projlib_theorem_complexname_bool - , simple-name .bool_set:N = \l__projlib_theorem_simplename_bool - , simple-name .initial:n = { false } - , simple~name .bool_set:N = \l__projlib_theorem_simplename_bool - , simple name .bool_set:N = \l__projlib_theorem_simplename_bool + , simple-name .bool_set_inverse:N = \l__projlib_theorem_complexname_bool + , simple~name .bool_set_inverse:N = \l__projlib_theorem_complexname_bool + , simple name .bool_set_inverse:N = \l__projlib_theorem_complexname_bool , no-preset-names .bool_set_inverse:N = \l__projlib_theorem_presetname_bool , no-preset-names .initial:n = { false } , no~preset~names .bool_set_inverse:N = \l__projlib_theorem_presetname_bool @@ -41,7 +57,7 @@ } \ProcessKeysOptions { projlib-theorem } -\clist_const:Nn \c__projlib_theorem_supported_clist +\clist_const:Nn \c_projlib_theorem_supported_clist { assertion , assumption , @@ -65,6 +81,8 @@ question , remark , theorem , + definition-proposition , + definition-theorem , } \@ifclassloaded { beamer } @@ -86,20 +104,15 @@ \RequirePackage { projlib-language } -\bool_if:NF \l__projlib_theorem_complexname_bool - { - \PassOptionsToPackage { no preset names } { create-theorem } - } \RequirePackage { amsthm } \RequirePackage { create-theorem } - \bool_if:NF \l__projlib_theorem_no_theorems_bool { \bool_if:NTF \l__projlib_theorem_no_theorem_numbering_bool { - \exp_args:Nv \CreateTheorem { c__projlib_theorem_supported_clist } { numberless } + \exp_args:Nv \CreateTheorem { c_projlib_theorem_supported_clist } { numberless } } { \tl_if_blank:eTF \l__projlib_theorem_theorem_numbering_tl @@ -122,11 +135,10 @@ } } - \exp_args:Nv \CreateTheorem { c__projlib_theorem_supported_clist } { shared counter = theorem, quiet } + \exp_args:Nv \CreateTheorem { c_projlib_theorem_supported_clist } { shared counter = theorem, quiet } } } - \AddLanguageSetting [ schinese ] { \crefname { equation } { 式 } { 式 } @@ -222,11 +234,9 @@ \tl_gset:Nn { \crefrangeconjunction } { \nobreakspace a \nobreakspace } } - \bool_if:NF \l__projlib_theorem_presetname_bool { \endinput } \bool_if:NT \l__projlib_theorem_complexname_bool { \endinput } - \NameTheorem { assertion } { , heading = { @@ -1173,12 +1183,92 @@ } } +\NameTheorem { definition-proposition } + { + , heading = { + , english = Definition-Proposition + , french = Définition-Proposition + , ngerman = Definition-Proposition + , italian = Definizione-Proposizione + , portuguese = Definição-Proposição + , brazilian = Definição-Proposição + , spanish = Definición-Proposición + , schinese = 定义-命题 + , tchinese = 定義-命題 + , japanese = 定義-命題 + , russian = Определение-Предложение + } + , crefname = { + , english = {Definition-Proposition}{Definition-Proposition} + , french = [la]{Définition-Proposition}[les]{Définition-Proposition} + , ngerman = {Definition-Proposition}{Definition-Proposition} + , italian = [la]{Definizione-Proposizione}[le]{Definizione-Proposizione} + , portuguese = [a]{Definição-Proposição}[as]{Definição-Proposição} + , brazilian = [a]{Definição-Proposição}[as]{Definição-Proposição} + , spanish = [la]{Definición-Proposición}[las]{Definición-Proposición} + , schinese = {定义-命题}{定义-命题} + , tchinese = {定義-命題}{定義-命題} + , japanese = {定義-命題}{定義-命題} + , russian = {Определение-Предложение}{Определение-Предложение} + } + , Crefname = { + , english = {Definition-Proposition}{Definition-Proposition} + , french = [La]{Définition-Proposition}[Les]{Définition-Proposition} + , ngerman = {Definition-Proposition}{Definition-Proposition} + , italian = [La]{Definizione-Proposizione}[Le]{Definizione-Proposizione} + , portuguese = [A]{Definição-Proposição}[As]{Definição-Proposição} + , brazilian = [A]{Definição-Proposição}[As]{Definição-Proposição} + , spanish = [La]{Definición-Proposición}[Las]{Definición-Proposición} + , schinese = {定义-命题}{定义-命题} + , tchinese = {定義-命題}{定義-命題} + , japanese = {定義-命題}{定義-命題} + , russian = {Определение-Предложение}{Определение-Предложение} + } + } + +\NameTheorem { definition-theorem } + { + , heading = { + , english = Definition-Theorem + , french = Définition-Théorème + , ngerman = Definition-Satz + , italian = Definizione-Teorema + , portuguese = Definição-Teorema + , brazilian = Definição-Teorema + , spanish = Definición-Teorema + , schinese = 定义-定理 + , tchinese = 定義-定理 + , japanese = 定義-定理 + , russian = Определение-Теорема + } + , crefname = { + , english = {Definition-Theorem}{Definition-Theorem} + , french = [la]{Définition-Théorème}[les]{Définition-Théorème} + , ngerman = {Definition-Satz}{Definition-Satz} + , italian = [la]{Definizione-Teorema}[le]{Definizione-Teorema} + , portuguese = [a]{Definição-Teorema}[as]{Definição-Teorema} + , brazilian = [a]{Definição-Teorema}[as]{Definição-Teorema} + , spanish = [la]{Definición-Teorema}[las]{Definición-Teorema} + , schinese = {定义-定理}{定义-定理} + , tchinese = {定義-定理}{定義-定理} + , japanese = {定義-定理}{定義-定理} + , russian = {Определение-Теорема}{Определение-Теорема} + } + , Crefname = { + , english = {Definition-Theorem}{Definition-Theorem} + , french = [La]{Définition-Théorème}[Les]{Définition-Théorème} + , ngerman = {Definition-Satz}{Definition-Satz} + , italian = [La]{Definizione-Teorema}[Le]{Definizione-Teorema} + , portuguese = [A]{Definição-Teorema}[As]{Definição-Teorema} + , brazilian = [A]{Definição-Teorema}[As]{Definição-Teorema} + , spanish = [La]{Definición-Teorema}[Las]{Definición-Teorema} + , schinese = {定义-定理}{定义-定理} + , tchinese = {定義-定理}{定義-定理} + , japanese = {定義-定理}{定義-定理} + , russian = {Определение-Теорема}{Определение-Теорема} + } + } + \endinput %% %% End of file `projlib-theorem.sty'. - - -接下来: -1. ✅ 定义 \SetTheorem,用于处理编号和名称样式的问题 -2. ✅ 定义 complexname 与 simplename -3. ✅ 给出定理类环境的初始化,注意 no-theorem 与 no-theorem-numbering 等选项 |