diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
60 files changed, 964 insertions, 647 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg index 057819d48e7..6e53a2ffd1c 100644 --- a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg +++ b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Caption with encoding GBK (CTEX)} \ProvidesExplFile{ctex-name-gbk.cfg} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \keys_set_known:nn { ctex } { contentsname = Ŀ¼ , diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg index 159c67159c3..085080b9cb6 100644 --- a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg +++ b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Caption with encoding UTF-8 (CTEX)} \ProvidesExplFile{ctex-name-utf8.cfg} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \keys_set_known:nn { ctex } { contentsname = 目录 , diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg index 6ed114f2ca9..68aafb8f4e4 100644 --- a/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg +++ b/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Configuration file (CTEX)} \ProvidesExplFile{\ExplFileName.cfg} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} %% %% %% diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctexbackend.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctexbackend.cfg index a32d4c6cd5e..d3ebf513ec1 100644 --- a/Master/texmf-dist/tex/latex/ctex/config/ctexbackend.cfg +++ b/Master/texmf-dist/tex/latex/ctex/config/ctexbackend.cfg @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{ctexbackend.cfg}% - [2022/06/04 v2.5.9 Backend configuration file (CTEX)] + [2022/07/14 v2.5.10 Backend configuration file (CTEX)] \begingroup \expandafter\ifx\csname Umathchardef\endcsname\relax \else\expandafter\endgroup\expandafter\endinput\fi diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg index ca5fb4a44d8..967bd3be7fc 100644 --- a/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg +++ b/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Option configuration file (CTEX)} \ProvidesExplFile{ctexopts.cfg} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} %% %% \ctex_set:nn { option } { fontset = windows } %% diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo b/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo index ed71119c338..4dee4fea1e8 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo +++ b/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {c5size option (CTEX)} \ProvidesExplFile{ctex-c5size.clo} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_set_font_size:Nnn \normalsize { 5 } { \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo b/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo index cc856e81d4f..b2fd0f4b2cb 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo +++ b/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {cs4size option (CTEX)} \ProvidesExplFile{ctex-cs4size.clo} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_set_font_size:Nnn \normalsize { -4 } { \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@ diff --git a/Master/texmf-dist/tex/latex/ctex/ctex.sty b/Master/texmf-dist/tex/latex/ctex/ctex.sty index 27b04eba187..90bfe5cac63 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctex.sty @@ -26,11 +26,12 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter in LaTeX (CTEX)} \ProvidesExplPackage{\ExplFileName} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} -\RequirePackage { xparse , l3keys2e } + {\ExplFileDate}{2.5.10}{\ExplFileDescription} +\cs_if_exist:NF \NewDocumentCommand + { \RequirePackage { xparse } } \msg_new:nnnn { ctex } { l3-too-old } { Support~package~`#1'~too~old. } { @@ -38,7 +39,7 @@ `l3kernel'~and~`l3packages'\\\\ using~your~TeX~package~manager~or~from~CTAN. } -\@ifpackagelater { expl3 } { 2020/07/17 } { } +\@ifpackagelater { expl3 } { 2021/02/10 } { } { \msg_error:nnn { ctex } { l3-too-old } { expl3 } } \str_const:Nx \c__ctex_engine_str { \cs_if_exist:NTF \ngostype { aptex } { \c_sys_engine_str } } @@ -233,7 +234,7 @@ space .choices:nn = { true , auto , false } { - \exp_args:Nx \ctex_at_end:n + \exp_args:Ne \ctex_at_end:n { \ctex_set:n { space = \l_keys_choice_tl } } } , space .default:n = { true } , @@ -305,7 +306,12 @@ \exp_args:No \ctex_define_option:n { \l__ctex_tmp_tl } \tl_clear:N \l__ctex_tmp_tl \ctex_file_input:n { ctexopts.cfg } -\ProcessKeysOptions { ctex / option } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ ctex / option ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { ctex / option } + } \msg_new:nnn { ctex } { pdftex-utf8 } { UTF8~will~be~used~as~the~default~encoding. } \tl_if_empty:NT \g__ctex_encoding_tl @@ -487,7 +493,9 @@ { \parindent is~set~to~0pt. } \dim_zero:N \parindent } -\PassOptionsToPackage { encoding = \g__ctex_encoding_tl } { zhnumber } +\exp_args:Ne \PassOptionsToPackage + { encoding = \g__ctex_encoding_tl } + { zhnumber } \RequirePackage { zhnumber } \cs_new:Npn \chinese { \zhnum_counter:n } \cs_new_eq:NN \@chinese \@zhnum @@ -620,7 +628,7 @@ \seq_new:N \c__ctex_font_size_seq \cs_new_protected:Npn \__ctex_save_font_size:nn #1#2 { - \use:x + \use:e { \prop_gput:Nnn \exp_not:N \c__ctex_font_size_prop {#1} { @@ -761,7 +769,7 @@ { \file_if_exist:nF { ctex-fontset- \g__ctex_fontset_tl .def } { - \use:x + \use:e { \ctex_detect_platform: \msg_error:nnxx { ctex } { fontset-not-found } diff --git a/Master/texmf-dist/tex/latex/ctex/ctexart.cls b/Master/texmf-dist/tex/latex/ctex/ctexart.cls index 1242890cb2f..e132d5843f6 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexart.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctexart.cls @@ -27,11 +27,12 @@ \NeedsTeXFormat{LaTeX2e} \input{ctexbackend.cfg} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter for class article (CTEX)} \ProvidesExplClass{ctexart} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} -\RequirePackage { xparse , l3keys2e } + {\ExplFileDate}{2.5.10}{\ExplFileDescription} +\cs_if_exist:NF \NewDocumentCommand + { \RequirePackage { xparse } } \prop_gput:Nnn \g_msg_module_type_prop { ctex } { Class } \prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexart } \msg_new:nnnn { ctex } { l3-too-old } @@ -41,10 +42,8 @@ `l3kernel'~and~`l3packages'\\\\ using~your~TeX~package~manager~or~from~CTAN. } -\@ifpackagelater { expl3 } { 2020/07/17 } { } +\@ifpackagelater { expl3 } { 2021/02/10 } { } { \msg_error:nnn { ctex } { l3-too-old } { expl3 } } -\@ifpackagelater { l3keys2e } { 2015/12/20 } { } - { \msg_error:nnn { ctex } { l3-too-old } { l3keys2e } } \str_const:Nx \c__ctex_engine_str { \cs_if_exist:NTF \ngostype { aptex } { \c_sys_engine_str } } \msg_new:nnnn { ctex } { engine-not-supported } @@ -122,6 +121,14 @@ \cs_new_eq:NN \ctex_if_autoindent_touched:F \use:n \cs_new_eq:NN \ctex_zhmap_case:nnn \use_ii:nnn \cs_new_protected:Npn \ctex_at_end:n { \AtEndOfClass } +\cs_new_protected:Npn \ctex_load_std_class:n #1 + { + \tl_const:Nn \c__ctex_class_tl {#1} + \exp_args:No \PassOptionsToClass + { \g__ctex_std_options_clist } + {#1} + \LoadClass {#1} + } \clist_new:N \g__ctex_std_options_clist \msg_new:nnn { ctex } { invalid-option } { Option~`\l_keys_key_tl'~is~invalid~in~current~mode. } @@ -241,7 +248,7 @@ space .choices:nn = { true , auto , false } { - \exp_args:Nx \ctex_at_end:n + \exp_args:Ne \ctex_at_end:n { \ctex_set:n { space = \l_keys_choice_tl } } } , space .default:n = { true } , @@ -321,7 +328,12 @@ { \clist_gput_right:No \g__ctex_std_options_clist { \CurrentOption } } } \ctex_file_input:n { ctexopts.cfg } -\ProcessKeysOptions { ctex / option } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ ctex / option ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { ctex / option } + } \msg_new:nnn { ctex } { pdftex-utf8 } { UTF8~will~be~used~as~the~default~encoding. } \tl_if_empty:NT \g__ctex_encoding_tl @@ -335,9 +347,7 @@ { 0 } { \clist_gput_right:Nn \g__ctex_std_options_clist { 10pt } } { 1 } { \clist_gput_right:Nn \g__ctex_std_options_clist { 12pt } } } -\tl_const:Nn \c__ctex_class_tl { article } -\PassOptionsToClass { \g__ctex_std_options_clist } { article } -\LoadClass { article } +\ctex_load_std_class:n { article } \@ifpackageloaded { hyperref } { \cs_new_protected:Npn \ctex_hypersetup:n #1 @@ -511,7 +521,9 @@ { \parindent is~set~to~0pt. } \dim_zero:N \parindent } -\PassOptionsToPackage { encoding = \g__ctex_encoding_tl } { zhnumber } +\exp_args:Ne \PassOptionsToPackage + { encoding = \g__ctex_encoding_tl } + { zhnumber } \RequirePackage { zhnumber } \cs_new:Npn \chinese { \zhnum_counter:n } \cs_new_eq:NN \@chinese \@zhnum @@ -607,11 +619,11 @@ } \cs_new_protected:Npn \__ctex_def_heading_keys:n #1 { - \tl_put_right:Nx \l__ctex_tmp_tl + \exp_args:NNe \tl_put_right:Nn \l__ctex_tmp_tl { - #1 .meta:nn = { ctex / #1 } { ####1 } , + #1 .meta:nn = { ctex / #1 } { ##1 } , #1 / name .code:n = - { \ctex_assign_heading_name:nn {#1} { ####1 } } , + { \ctex_assign_heading_name:nn {#1} { ##1 } } , #1 / number .tl_set:N = \exp_not:c { CTEX@the#1 } , #1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } , #1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} , @@ -629,8 +641,7 @@ #1 / hang .bool_set:N = \exp_not:c { CTEX@#1@hang } , #1 / hang .initial:n = true , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , - #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline} - \exp_not:n { ##1##2 } , + #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline } ##1##2 , \__ctex_plus_key_aux:nn {#1} { break } , \__ctex_plus_key_aux:nn {#1} { format } , \__ctex_plus_key_aux:nn {#1} { nameformat } , @@ -644,9 +655,9 @@ { #1 / #2 .tl_set:N = \exp_not:c { CTEX@#1@#2 } , #1 / #2 + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } , + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } , #1 / #2 ~ + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } } \NewDocumentCommand \ctex_assign_heading_name:nn { m > { \SplitArgument { 1 } { , } } +m } @@ -970,20 +981,22 @@ \cs_new_protected:Npn \CTEX@hyperheadinghook { \group_begin: - \ifHy@implicit - \cs_set_eq:NN \H@old@chapter \Hy@org@chapter - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { - \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } - { - \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } - \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor - } - } - \else: - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } - \fi: + \legacy_if:nTF { Hy@implicit } + { + \cs_set_eq:NN \H@old@chapter \Hy@org@chapter + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { + \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } + { + \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } + \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor + } + } + } + { + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } + } \group_end: } \ctex_at_end_package:nn { hyperref } @@ -1108,7 +1121,7 @@ \CTEX@updatettlifname } \cs_new_protected:Npn \CTEX@updatettlifname - { \ifttl@label \CTEX@ifnametrue \else: \CTEX@ifnamefalse \fi: } + { \legacy_if:nTF { ttl@label } { \CTEX@ifnametrue } { \CTEX@ifnamefalse } } } \group_begin: \char_set_catcode_other:N \# @@ -1196,18 +1209,20 @@ } \__ctex_patch_toc_width:n { tocloft } \__ctex_patch_toc_width:n { titletoc } -\if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } - { \CTEXifname { \CTEXthesection \quad } { } } - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \@ne \thesubsection \quad \fi } - { \CTEXifname { \CTEXthesubsection \quad } { } } -\else: - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \m@ne \thesection \quad \fi } - { \CTEXifname { \CTEXthesection \quad } { } } -\fi: +\legacy_if:nTF { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \@ne \thesubsection \quad \fi } + { \CTEXifname { \CTEXthesubsection \quad } { } } + } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \m@ne \thesection \quad \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } \ctex_at_end_package:nn { fancyhdr } { \ctex_patch_cmd:Nnn \f@nch@initialise @@ -1225,18 +1240,20 @@ \f@nch@initialise \@ifpackagewith { fancyhdr } { headings } { - \if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } - { \CTEXifname { \CTEXthesection \quad } { } } - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \@ne \thesubsection \quad \fi } - { \CTEXifname { \CTEXthesubsection \quad } { } } - \else: - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } - { \CTEXifname { \CTEXthesection \quad } { } } - \fi: + \legacy_if:nTF { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \@ne \thesubsection \quad \fi } + { \CTEXifname { \CTEXthesubsection \quad } { } } + } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } } { } } @@ -1340,7 +1357,7 @@ \seq_new:N \c__ctex_font_size_seq \cs_new_protected:Npn \__ctex_save_font_size:nn #1#2 { - \use:x + \use:e { \prop_gput:Nnn \exp_not:N \c__ctex_font_size_prop {#1} { @@ -1481,7 +1498,7 @@ { \file_if_exist:nF { ctex-fontset- \g__ctex_fontset_tl .def } { - \use:x + \use:e { \ctex_detect_platform: \msg_error:nnxx { ctex } { fontset-not-found } diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls b/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls index 97f6903d364..c52c57139c2 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls @@ -27,11 +27,12 @@ \NeedsTeXFormat{LaTeX2e} \input{ctexbackend.cfg} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter for class beamer (CTEX)} \ProvidesExplClass{ctexbeamer} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} -\RequirePackage { xparse , l3keys2e } + {\ExplFileDate}{2.5.10}{\ExplFileDescription} +\cs_if_exist:NF \NewDocumentCommand + { \RequirePackage { xparse } } \prop_gput:Nnn \g_msg_module_type_prop { ctex } { Class } \prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexbeamer } \msg_new:nnnn { ctex } { l3-too-old } @@ -41,10 +42,8 @@ `l3kernel'~and~`l3packages'\\\\ using~your~TeX~package~manager~or~from~CTAN. } -\@ifpackagelater { expl3 } { 2020/07/17 } { } +\@ifpackagelater { expl3 } { 2021/02/10 } { } { \msg_error:nnn { ctex } { l3-too-old } { expl3 } } -\@ifpackagelater { l3keys2e } { 2015/12/20 } { } - { \msg_error:nnn { ctex } { l3-too-old } { l3keys2e } } \str_const:Nx \c__ctex_engine_str { \cs_if_exist:NTF \ngostype { aptex } { \c_sys_engine_str } } \msg_new:nnnn { ctex } { engine-not-supported } @@ -120,6 +119,14 @@ \cs_new_eq:NN \ctex_if_autoindent_touched:F \use:n \cs_new_eq:NN \ctex_zhmap_case:nnn \use_ii:nnn \cs_new_protected:Npn \ctex_at_end:n { \AtEndOfClass } +\cs_new_protected:Npn \ctex_load_std_class:n #1 + { + \tl_const:Nn \c__ctex_class_tl {#1} + \exp_args:No \PassOptionsToClass + { \g__ctex_std_options_clist } + {#1} + \LoadClass {#1} + } \clist_new:N \g__ctex_std_options_clist \msg_new:nnn { ctex } { invalid-option } { Option~`\l_keys_key_tl'~is~invalid~in~current~mode. } @@ -239,7 +246,7 @@ space .choices:nn = { true , auto , false } { - \exp_args:Nx \ctex_at_end:n + \exp_args:Ne \ctex_at_end:n { \ctex_set:n { space = \l_keys_choice_tl } } } , space .default:n = { true } , @@ -313,7 +320,12 @@ { \clist_gput_right:No \g__ctex_std_options_clist { \CurrentOption } } } \ctex_file_input:n { ctexopts.cfg } -\ProcessKeysOptions { ctex / option } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ ctex / option ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { ctex / option } + } \msg_new:nnn { ctex } { pdftex-utf8 } { UTF8~will~be~used~as~the~default~encoding. } \tl_if_empty:NT \g__ctex_encoding_tl @@ -327,9 +339,7 @@ { 0 } { \clist_gput_right:Nn \g__ctex_std_options_clist { 10pt } } { 1 } { \clist_gput_right:Nn \g__ctex_std_options_clist { 12pt } } } -\tl_const:Nn \c__ctex_class_tl { beamer } -\PassOptionsToClass { \g__ctex_std_options_clist } { beamer } -\LoadClass { beamer } +\ctex_load_std_class:n { beamer } \@ifpackageloaded { hyperref } { \cs_new_protected:Npn \ctex_hypersetup:n #1 @@ -503,7 +513,9 @@ { \parindent is~set~to~0pt. } \dim_zero:N \parindent } -\PassOptionsToPackage { encoding = \g__ctex_encoding_tl } { zhnumber } +\exp_args:Ne \PassOptionsToPackage + { encoding = \g__ctex_encoding_tl } + { zhnumber } \RequirePackage { zhnumber } \cs_new:Npn \chinese { \zhnum_counter:n } \cs_new_eq:NN \@chinese \@zhnum @@ -599,11 +611,11 @@ } \cs_new_protected:Npn \__ctex_def_heading_keys:n #1 { - \tl_put_right:Nx \l__ctex_tmp_tl + \exp_args:NNe \tl_put_right:Nn \l__ctex_tmp_tl { - #1 .meta:nn = { ctex / #1 } { ####1 } , + #1 .meta:nn = { ctex / #1 } { ##1 } , #1 / name .code:n = - { \ctex_assign_heading_name:nn {#1} { ####1 } } , + { \ctex_assign_heading_name:nn {#1} { ##1 } } , #1 / number .tl_set:N = \exp_not:c { CTEX@the#1 } , #1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } , #1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} , @@ -628,9 +640,9 @@ { #1 / #2 .tl_set:N = \exp_not:c { CTEX@#1@#2 } , #1 / #2 + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } , + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } , #1 / #2 ~ + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } } \NewDocumentCommand \ctex_assign_heading_name:nn { m > { \SplitArgument { 1 } { , } } +m } @@ -813,7 +825,7 @@ \seq_new:N \c__ctex_font_size_seq \cs_new_protected:Npn \__ctex_save_font_size:nn #1#2 { - \use:x + \use:e { \prop_gput:Nnn \exp_not:N \c__ctex_font_size_prop {#1} { @@ -954,7 +966,7 @@ { \file_if_exist:nF { ctex-fontset- \g__ctex_fontset_tl .def } { - \use:x + \use:e { \ctex_detect_platform: \msg_error:nnxx { ctex } { fontset-not-found } diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls index ff6b731b10b..12d2675abcf 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls @@ -27,11 +27,12 @@ \NeedsTeXFormat{LaTeX2e} \input{ctexbackend.cfg} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter for class book (CTEX)} \ProvidesExplClass{ctexbook} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} -\RequirePackage { xparse , l3keys2e } + {\ExplFileDate}{2.5.10}{\ExplFileDescription} +\cs_if_exist:NF \NewDocumentCommand + { \RequirePackage { xparse } } \prop_gput:Nnn \g_msg_module_type_prop { ctex } { Class } \prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexbook } \msg_new:nnnn { ctex } { l3-too-old } @@ -41,10 +42,8 @@ `l3kernel'~and~`l3packages'\\\\ using~your~TeX~package~manager~or~from~CTAN. } -\@ifpackagelater { expl3 } { 2020/07/17 } { } +\@ifpackagelater { expl3 } { 2021/02/10 } { } { \msg_error:nnn { ctex } { l3-too-old } { expl3 } } -\@ifpackagelater { l3keys2e } { 2015/12/20 } { } - { \msg_error:nnn { ctex } { l3-too-old } { l3keys2e } } \str_const:Nx \c__ctex_engine_str { \cs_if_exist:NTF \ngostype { aptex } { \c_sys_engine_str } } \msg_new:nnnn { ctex } { engine-not-supported } @@ -122,6 +121,14 @@ \cs_new_eq:NN \ctex_if_autoindent_touched:F \use:n \cs_new_eq:NN \ctex_zhmap_case:nnn \use_ii:nnn \cs_new_protected:Npn \ctex_at_end:n { \AtEndOfClass } +\cs_new_protected:Npn \ctex_load_std_class:n #1 + { + \tl_const:Nn \c__ctex_class_tl {#1} + \exp_args:No \PassOptionsToClass + { \g__ctex_std_options_clist } + {#1} + \LoadClass {#1} + } \clist_new:N \g__ctex_std_options_clist \msg_new:nnn { ctex } { invalid-option } { Option~`\l_keys_key_tl'~is~invalid~in~current~mode. } @@ -241,7 +248,7 @@ space .choices:nn = { true , auto , false } { - \exp_args:Nx \ctex_at_end:n + \exp_args:Ne \ctex_at_end:n { \ctex_set:n { space = \l_keys_choice_tl } } } , space .default:n = { true } , @@ -321,7 +328,12 @@ { \clist_gput_right:No \g__ctex_std_options_clist { \CurrentOption } } } \ctex_file_input:n { ctexopts.cfg } -\ProcessKeysOptions { ctex / option } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ ctex / option ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { ctex / option } + } \msg_new:nnn { ctex } { pdftex-utf8 } { UTF8~will~be~used~as~the~default~encoding. } \tl_if_empty:NT \g__ctex_encoding_tl @@ -335,9 +347,7 @@ { 0 } { \clist_gput_right:Nn \g__ctex_std_options_clist { 10pt } } { 1 } { \clist_gput_right:Nn \g__ctex_std_options_clist { 12pt } } } -\tl_const:Nn \c__ctex_class_tl { book } -\PassOptionsToClass { \g__ctex_std_options_clist } { book } -\LoadClass { book } +\ctex_load_std_class:n { book } \@ifpackageloaded { hyperref } { \cs_new_protected:Npn \ctex_hypersetup:n #1 @@ -511,7 +521,9 @@ { \parindent is~set~to~0pt. } \dim_zero:N \parindent } -\PassOptionsToPackage { encoding = \g__ctex_encoding_tl } { zhnumber } +\exp_args:Ne \PassOptionsToPackage + { encoding = \g__ctex_encoding_tl } + { zhnumber } \RequirePackage { zhnumber } \cs_new:Npn \chinese { \zhnum_counter:n } \cs_new_eq:NN \@chinese \@zhnum @@ -608,11 +620,11 @@ } \cs_new_protected:Npn \__ctex_def_heading_keys:n #1 { - \tl_put_right:Nx \l__ctex_tmp_tl + \exp_args:NNe \tl_put_right:Nn \l__ctex_tmp_tl { - #1 .meta:nn = { ctex / #1 } { ####1 } , + #1 .meta:nn = { ctex / #1 } { ##1 } , #1 / name .code:n = - { \ctex_assign_heading_name:nn {#1} { ####1 } } , + { \ctex_assign_heading_name:nn {#1} { ##1 } } , #1 / number .tl_set:N = \exp_not:c { CTEX@the#1 } , #1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } , #1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} , @@ -630,8 +642,7 @@ #1 / hang .bool_set:N = \exp_not:c { CTEX@#1@hang } , #1 / hang .initial:n = true , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , - #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline} - \exp_not:n { ##1##2 } , + #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline } ##1##2 , \__ctex_plus_key_aux:nn {#1} { break } , \__ctex_plus_key_aux:nn {#1} { format } , \__ctex_plus_key_aux:nn {#1} { nameformat } , @@ -645,9 +656,9 @@ { #1 / #2 .tl_set:N = \exp_not:c { CTEX@#1@#2 } , #1 / #2 + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } , + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } , #1 / #2 ~ + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } } \NewDocumentCommand \ctex_assign_heading_name:nn { m > { \SplitArgument { 1 } { , } } +m } @@ -711,6 +722,8 @@ \cs_new_protected:Npn \CTEX@setheadingskip { \skip_set:Nn \l__ctex_heading_skip } \cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip +\cs_new_protected:Npn \CTEX@setthispagestyle #1 + { \exp_args:Ne \thispagestyle { \use:c { CTEX@#1@pagestyle } } } \ProvideDocumentCommand \partmark { m } { \markboth { } { } } \cs_new_eq:NN \CTEXifname \use_ii:nn @@ -737,7 +750,7 @@ { \addcontentsline { toc } {#1} { \use:c { CTEX@#1@tocline } {#1} {#2} } } \renewcommand\part{% \CTEX@part@break - \thispagestyle{\CTEX@part@pagestyle}% + \CTEX@setthispagestyle{part}% \if@twocolumn \onecolumn \@tempswatrue @@ -802,7 +815,7 @@ \fi} \renewcommand\chapter{% \CTEX@chapter@break - \thispagestyle{\CTEX@chapter@pagestyle}% + \CTEX@setthispagestyle{chapter}% \global\@topnum\z@ \ifodd \CTEX@chapter@afterindent \@afterindenttrue @@ -1096,20 +1109,22 @@ \cs_new_protected:Npn \CTEX@hyperheadinghook { \group_begin: - \ifHy@implicit - \cs_set_eq:NN \H@old@chapter \Hy@org@chapter - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { - \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } - { - \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } - \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor - } - } - \else: - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } - \fi: + \legacy_if:nTF { Hy@implicit } + { + \cs_set_eq:NN \H@old@chapter \Hy@org@chapter + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { + \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } + { + \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } + \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor + } + } + } + { + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } + } \group_end: } \ctex_at_end_package:nn { hyperref } @@ -1235,7 +1250,7 @@ \CTEX@updatettlifname } \cs_new_protected:Npn \CTEX@updatettlifname - { \ifttl@label \CTEX@ifnametrue \else: \CTEX@ifnamefalse \fi: } + { \legacy_if:nTF { ttl@label } { \CTEX@ifnametrue } { \CTEX@ifnamefalse } } } \group_begin: \char_set_catcode_other:N \# @@ -1330,11 +1345,12 @@ \fi \fi } { \CTEXifname { \CTEXthechapter \quad } { } } -\if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } - { \CTEXifname { \CTEXthesection \quad } { } } -\fi: +\legacy_if:nT { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } \ctex_at_end_package:nn { fancyhdr } { \ctex_patch_cmd:Nnn \f@nch@initialise @@ -1359,11 +1375,12 @@ \fi \fi } { \CTEXifname { \CTEXthechapter \quad } { } } - \if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } - { \CTEXifname { \CTEXthesection \quad } { } } - \fi: + \legacy_if:nT { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } } { } } @@ -1468,7 +1485,7 @@ \seq_new:N \c__ctex_font_size_seq \cs_new_protected:Npn \__ctex_save_font_size:nn #1#2 { - \use:x + \use:e { \prop_gput:Nnn \exp_not:N \c__ctex_font_size_prop {#1} { @@ -1609,7 +1626,7 @@ { \file_if_exist:nF { ctex-fontset- \g__ctex_fontset_tl .def } { - \use:x + \use:e { \ctex_detect_platform: \msg_error:nnxx { ctex } { fontset-not-found } diff --git a/Master/texmf-dist/tex/latex/ctex/ctexcap.sty b/Master/texmf-dist/tex/latex/ctex/ctexcap.sty index 4bf19b3c729..d01d4fc3eb0 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexcap.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexcap.sty @@ -26,10 +26,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter in LaTeX (CTEX)} \ProvidesExplPackage{ctexcap} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \clist_new:N \l__ctex_ctexcap_options_clist \clist_set:Nx \l__ctex_ctexcap_options_clist { \exp_not:v { opt@ \@currname . \@currext } , heading } diff --git a/Master/texmf-dist/tex/latex/ctex/ctexheading.sty b/Master/texmf-dist/tex/latex/ctex/ctexheading.sty index ed958cf4aaf..983b3772092 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexheading.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexheading.sty @@ -26,11 +26,12 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading style modification (CTEX)} \ProvidesExplPackage{ctexheading} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} -\RequirePackage { xparse , l3keys2e } + {\ExplFileDate}{2.5.10}{\ExplFileDescription} +\cs_if_exist:NF \NewDocumentCommand + { \RequirePackage { xparse } } \prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexheading } \RequirePackage { ctexhook , ctexpatch } \tl_clear_new:N \l__ctex_tmp_tl @@ -70,7 +71,12 @@ scheme .default:n = { plain } , scheme .initial:n = { plain } } -\ProcessKeysOptions { ctex / option } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ ctex / option ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { ctex / option } + } \NewDocumentCommand \ctexset { } { \ctex_set:n } \clist_map_inline:nn { article , book , report , beamer } { diff --git a/Master/texmf-dist/tex/latex/ctex/ctexhook.sty b/Master/texmf-dist/tex/latex/ctex/ctexhook.sty index c8790544a1b..ea1a05051ff 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexhook.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexhook.sty @@ -26,10 +26,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Document and package hooks (CTEX)} \ProvidesExplPackage{ctexhook} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \cs_new:Npn \ctex_if_format_at_least:nTF { \@ifl@t@r \fmtversion } \cs_new_protected:Npn \ctex_file_input:n #1 diff --git a/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty b/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty index d9218a83e88..546e651edf0 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty @@ -26,10 +26,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Patching commands (CTEX)} \ProvidesExplPackage{ctexpatch} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \cs_new_protected:Npn \ctex_patch_cmd_once:NnnnTF #1#2 { \ctex_patch_boot:NNnnTF \__ctex_patch_cmd:Nnnnnw #1 @@ -87,7 +87,7 @@ { \cs_if_exist_p:c { #1##3 } } { \group_begin: - \use:x + \use:e { \group_end: \__ctex_parse_name:nNNNnN @@ -129,7 +129,7 @@ } \cs_new:Npn \__ctex_parse_name:w ##1 #3 ~ ##2 #2 ##3 \q_stop { ##1##2 } } -\use:x +\use:e { \__ctex_tmp:w { \c_backslash_str } @@ -180,7 +180,7 @@ \__ctex_patch_rescan:NNn \l__ctex_prefix_tl \l__ctex_prefix_str {#2} \__ctex_patch_rescan:NNn \l__ctex_parameter_tl \l__ctex_parameter_str {#2} \__ctex_patch_rescan:NNn \l__ctex_replacement_tl \l__ctex_replacement_str {#2} - \use:x + \use:e { \exp_not:o { \l__ctex_prefix_tl } \tex_def:D \exp_not:N #1 \exp_not:o { \l__ctex_parameter_tl } @@ -201,7 +201,7 @@ \group_end: \ctex_if_rescanable:NnTF #1 {#3} { - \use:x + \use:e { \__ctex_patch_replace:nnnTF {#2} { \tl_to_str:n {#4} } diff --git a/Master/texmf-dist/tex/latex/ctex/ctexrep.cls b/Master/texmf-dist/tex/latex/ctex/ctexrep.cls index 731762daa9d..69a38e1e27c 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexrep.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctexrep.cls @@ -27,11 +27,12 @@ \NeedsTeXFormat{LaTeX2e} \input{ctexbackend.cfg} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter for class report (CTEX)} \ProvidesExplClass{ctexrep} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} -\RequirePackage { xparse , l3keys2e } + {\ExplFileDate}{2.5.10}{\ExplFileDescription} +\cs_if_exist:NF \NewDocumentCommand + { \RequirePackage { xparse } } \prop_gput:Nnn \g_msg_module_type_prop { ctex } { Class } \prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexrep } \msg_new:nnnn { ctex } { l3-too-old } @@ -41,10 +42,8 @@ `l3kernel'~and~`l3packages'\\\\ using~your~TeX~package~manager~or~from~CTAN. } -\@ifpackagelater { expl3 } { 2020/07/17 } { } +\@ifpackagelater { expl3 } { 2021/02/10 } { } { \msg_error:nnn { ctex } { l3-too-old } { expl3 } } -\@ifpackagelater { l3keys2e } { 2015/12/20 } { } - { \msg_error:nnn { ctex } { l3-too-old } { l3keys2e } } \str_const:Nx \c__ctex_engine_str { \cs_if_exist:NTF \ngostype { aptex } { \c_sys_engine_str } } \msg_new:nnnn { ctex } { engine-not-supported } @@ -122,6 +121,14 @@ \cs_new_eq:NN \ctex_if_autoindent_touched:F \use:n \cs_new_eq:NN \ctex_zhmap_case:nnn \use_ii:nnn \cs_new_protected:Npn \ctex_at_end:n { \AtEndOfClass } +\cs_new_protected:Npn \ctex_load_std_class:n #1 + { + \tl_const:Nn \c__ctex_class_tl {#1} + \exp_args:No \PassOptionsToClass + { \g__ctex_std_options_clist } + {#1} + \LoadClass {#1} + } \clist_new:N \g__ctex_std_options_clist \msg_new:nnn { ctex } { invalid-option } { Option~`\l_keys_key_tl'~is~invalid~in~current~mode. } @@ -241,7 +248,7 @@ space .choices:nn = { true , auto , false } { - \exp_args:Nx \ctex_at_end:n + \exp_args:Ne \ctex_at_end:n { \ctex_set:n { space = \l_keys_choice_tl } } } , space .default:n = { true } , @@ -321,7 +328,12 @@ { \clist_gput_right:No \g__ctex_std_options_clist { \CurrentOption } } } \ctex_file_input:n { ctexopts.cfg } -\ProcessKeysOptions { ctex / option } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ ctex / option ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { ctex / option } + } \msg_new:nnn { ctex } { pdftex-utf8 } { UTF8~will~be~used~as~the~default~encoding. } \tl_if_empty:NT \g__ctex_encoding_tl @@ -335,9 +347,7 @@ { 0 } { \clist_gput_right:Nn \g__ctex_std_options_clist { 10pt } } { 1 } { \clist_gput_right:Nn \g__ctex_std_options_clist { 12pt } } } -\tl_const:Nn \c__ctex_class_tl { report } -\PassOptionsToClass { \g__ctex_std_options_clist } { report } -\LoadClass { report } +\ctex_load_std_class:n { report } \@ifpackageloaded { hyperref } { \cs_new_protected:Npn \ctex_hypersetup:n #1 @@ -511,7 +521,9 @@ { \parindent is~set~to~0pt. } \dim_zero:N \parindent } -\PassOptionsToPackage { encoding = \g__ctex_encoding_tl } { zhnumber } +\exp_args:Ne \PassOptionsToPackage + { encoding = \g__ctex_encoding_tl } + { zhnumber } \RequirePackage { zhnumber } \cs_new:Npn \chinese { \zhnum_counter:n } \cs_new_eq:NN \@chinese \@zhnum @@ -608,11 +620,11 @@ } \cs_new_protected:Npn \__ctex_def_heading_keys:n #1 { - \tl_put_right:Nx \l__ctex_tmp_tl + \exp_args:NNe \tl_put_right:Nn \l__ctex_tmp_tl { - #1 .meta:nn = { ctex / #1 } { ####1 } , + #1 .meta:nn = { ctex / #1 } { ##1 } , #1 / name .code:n = - { \ctex_assign_heading_name:nn {#1} { ####1 } } , + { \ctex_assign_heading_name:nn {#1} { ##1 } } , #1 / number .tl_set:N = \exp_not:c { CTEX@the#1 } , #1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } , #1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} , @@ -630,8 +642,7 @@ #1 / hang .bool_set:N = \exp_not:c { CTEX@#1@hang } , #1 / hang .initial:n = true , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , - #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline} - \exp_not:n { ##1##2 } , + #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline } ##1##2 , \__ctex_plus_key_aux:nn {#1} { break } , \__ctex_plus_key_aux:nn {#1} { format } , \__ctex_plus_key_aux:nn {#1} { nameformat } , @@ -645,9 +656,9 @@ { #1 / #2 .tl_set:N = \exp_not:c { CTEX@#1@#2 } , #1 / #2 + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } , + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } , #1 / #2 ~ + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } } \NewDocumentCommand \ctex_assign_heading_name:nn { m > { \SplitArgument { 1 } { , } } +m } @@ -711,6 +722,8 @@ \cs_new_protected:Npn \CTEX@setheadingskip { \skip_set:Nn \l__ctex_heading_skip } \cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip +\cs_new_protected:Npn \CTEX@setthispagestyle #1 + { \exp_args:Ne \thispagestyle { \use:c { CTEX@#1@pagestyle } } } \ProvideDocumentCommand \partmark { m } { \markboth { } { } } \cs_new_eq:NN \CTEXifname \use_ii:nn @@ -737,7 +750,7 @@ { \addcontentsline { toc } {#1} { \use:c { CTEX@#1@tocline } {#1} {#2} } } \renewcommand\part{% \CTEX@part@break - \thispagestyle{\CTEX@part@pagestyle}% + \CTEX@setthispagestyle{part}% \if@twocolumn \onecolumn \@tempswatrue @@ -802,7 +815,7 @@ \fi} \renewcommand\chapter{% \CTEX@chapter@break - \thispagestyle{\CTEX@chapter@pagestyle}% + \CTEX@setthispagestyle{chapter}% \global\@topnum\z@ \ifodd \CTEX@chapter@afterindent \@afterindenttrue @@ -1091,20 +1104,22 @@ \cs_new_protected:Npn \CTEX@hyperheadinghook { \group_begin: - \ifHy@implicit - \cs_set_eq:NN \H@old@chapter \Hy@org@chapter - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { - \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } - { - \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } - \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor - } - } - \else: - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } - \fi: + \legacy_if:nTF { Hy@implicit } + { + \cs_set_eq:NN \H@old@chapter \Hy@org@chapter + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { + \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } + { + \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } + \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor + } + } + } + { + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } + } \group_end: } \ctex_at_end_package:nn { hyperref } @@ -1230,7 +1245,7 @@ \CTEX@updatettlifname } \cs_new_protected:Npn \CTEX@updatettlifname - { \ifttl@label \CTEX@ifnametrue \else: \CTEX@ifnamefalse \fi: } + { \legacy_if:nTF { ttl@label } { \CTEX@ifnametrue } { \CTEX@ifnamefalse } } } \group_begin: \char_set_catcode_other:N \# @@ -1325,11 +1340,12 @@ \fi } { \CTEXifname { \CTEXthechapter \quad } { } } -\if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } - { \CTEXifname { \CTEXthesection \quad } { } } -\fi: +\legacy_if:nT { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } \ctex_at_end_package:nn { fancyhdr } { \ctex_patch_cmd:Nnn \f@nch@initialise @@ -1354,11 +1370,12 @@ \fi } { \CTEXifname { \CTEXthechapter \quad } { } } - \if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } - { \CTEXifname { \CTEXthesection \quad } { } } - \fi: + \legacy_if:nT { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } } { } } @@ -1463,7 +1480,7 @@ \seq_new:N \c__ctex_font_size_seq \cs_new_protected:Npn \__ctex_save_font_size:nn #1#2 { - \use:x + \use:e { \prop_gput:Nnn \exp_not:N \c__ctex_font_size_prop {#1} { @@ -1604,7 +1621,7 @@ { \file_if_exist:nF { ctex-fontset- \g__ctex_fontset_tl .def } { - \use:x + \use:e { \ctex_detect_platform: \msg_error:nnxx { ctex } { fontset-not-found } diff --git a/Master/texmf-dist/tex/latex/ctex/ctexsize.sty b/Master/texmf-dist/tex/latex/ctex/ctexsize.sty index 1e972ec977a..d492471ad77 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexsize.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexsize.sty @@ -26,11 +26,12 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese font size definition (CTEX)} \ProvidesExplPackage{ctexsize} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} -\RequirePackage { xparse , l3keys2e } + {\ExplFileDate}{2.5.10}{\ExplFileDescription} +\cs_if_exist:NF \NewDocumentCommand + { \RequirePackage { xparse } } \prop_gput:Nnn \g_msg_module_name_prop { ctex } { ctexsize } \RequirePackage { fix-cm } \cs_new_protected:Npn \ctex_define_option:n @@ -61,7 +62,12 @@ } \exp_args:No \ctex_define_option:n { \l__ctex_tmp_tl } \tl_clear:N \l__ctex_tmp_tl -\ProcessKeysOptions { ctex / option } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ ctex / option ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { ctex / option } + } \NewDocumentCommand \zihao { m } { \exp_args:Nx \ctex_zihao:n {#1} \tex_ignorespaces:D } \cs_new_protected:Npn \ctex_zihao:n #1 @@ -81,7 +87,7 @@ \seq_new:N \c__ctex_font_size_seq \cs_new_protected:Npn \__ctex_save_font_size:nn #1#2 { - \use:x + \use:e { \prop_gput:Nnn \exp_not:N \c__ctex_font_size_prop {#1} { diff --git a/Master/texmf-dist/tex/latex/ctex/ctexspa.def b/Master/texmf-dist/tex/latex/ctex/ctexspa.def index 9d417b1fac5..4ea57ea473e 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexspa.def +++ b/Master/texmf-dist/tex/latex/ctex/ctexspa.def @@ -26,7 +26,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{ctexspa.def}% - [2022/06/04 v2.5.9 Space info for CJKpunct (CTEX)] + [2022/07/14 v2.5.10 Space info for CJKpunct (CTEX)] \ctexspadef{adobezhsong}{70,15,61,8,63,14,58,7,64,13,62,12,60,11,61,15,62,14,51,6,58,5,58,8,7,5,12,12,10,68,13,63,17,63,20,69,19,69,17,63,19,70,17,55,10,10,14,63,10,65,10,61,13,62,15,61,7,49,7,56,8,58,15,69,8,61,14,63,8,57,,,} \ctexspadef{adobezhhei}{78,3,64,3,64,2,61,3,72,3,70,3,72,3,70,3,60,3,51,3,62,3,66,3,0,0,10,10,3,70,5,70,6,75,6,78,17,67,13,67,17,67,4,50,8,8,3,72,3,70,3,72,3,70,3,60,3,51,3,62,3,66,3,78,7,62,3,63,3,61,,,} \ctexspadef{adobezhkai}{76,10,55,8,63,4,62,4,71,4,65,4,71,4,74,4,54,4,54,4,62,4,62,4,0,0,11,11,5,72,6,71,7,78,7,79,18,68,18,68,18,68,2,46,14,12,4,71,4,65,4,71,4,74,4,54,4,54,4,62,4,62,10,76,8,55,4,63,4,62,,,} diff --git a/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls b/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls index 8b353bd0e3c..4713ca81e88 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls @@ -1,7 +1,7 @@ %% %% File ctxdoc.cls %% -%% Copyright (C) 2016--2020 +%% Copyright (C) 2016--2022 %% CTEX.ORG and any individual authors listed in the documentation. %%--------------------------------------------------------------------- %% @@ -21,7 +21,7 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctxdoc.cls 87d629c 2022-05-23 22:55:12 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctxdoc.cls c3e8eb5 2022-06-07 19:08:17 +0800 Qing Lee <sobenlee@gmail.com> $ {ctex documentation (CTEX)} \ProvidesExplClass{ctxdoc}{\ExplFileDate}{}{\ExplFileDescription} \ExplSyntaxOff @@ -123,6 +123,7 @@ \setlist[1]{labelindent=\parindent} \setlist[enumerate]{leftmargin=*} \setlist[itemize]{leftmargin=*} +\setlist[trivlist]{topsep=\medskipamount} \renewlist{arguments}{enumerate}{1} \setlist[arguments]{nolistsep, leftmargin=\parindent, labelindent=0pt, labelsep=*, @@ -169,12 +170,9 @@ \define@key{FV}{labelref}{\def\ctexexamlabelref{\label{#1}}} \let\ctexexamlabelref\empty \newcounter{ctexexam} -\BeforeBeginEnvironment{function}{\par\nointerlineskip} -\AtEndEnvironment{function}{% - \par\xdef\ctexfixprevdepth{\prevdepth=\the\prevdepth\space}} -\AfterEndEnvironment{function}{\ctexfixprevdepth} +\AtEndEnvironment{function}{\ctexsetverticalspacing} +\AfterEndEnvironment{function}{\ctexfixverticalspacing} \AtBeginEnvironment{syntax}{\linespread{1}\ctexplainps\ctexdisableecglue} -\BeforeBeginEnvironment{SideBySideExample}{\par\addvspace{\medskipamount}} \newrobustcmd\exptarget{% \AddLineBeginMainAux{\csgdef{Codedoc@expstar}{}}% \Hy@raisedlink{\hypertarget{expstar}{}}} @@ -184,6 +182,35 @@ \newrobustcmd\expstar{\hyperlink{expstar}{$\star$}} \newrobustcmd\rexpstar{\hyperlink{rexpstar}{\ding{73}}} \ExplSyntaxOn +\cs_new_protected:Npn \ctexsetverticalspacing + { + \par + \tl_gset:Nx \ctexfixverticalspacing + { \dim_set:Nn \prevdepth { \dim_use:N \prevdepth } } + \int_compare:nNnT \lastnodetype = { 11 } + { + \tl_gput_right:Nx \ctexfixverticalspacing + { \exp_not:N \skip_vertical:n { \skip_use:N \lastskip } } + \unskip + } + } +\tl_new:N \ctexfixverticalspacing +\NewDocumentCommand \SideBySideExampleSet { } + { \prop_put_from_keyval:Nn \l__ctxdoc_side_example_prop } +\prop_new:N \l__ctxdoc_side_example_prop +\prop_set_from_keyval:Nn \l__ctxdoc_side_example_prop + { frame=single, numbers=left, gobble=5, xrightmargin=.5\linewidth } +\tl_put_left:Nn \SideBySideExample + { + \trivlist \item \relax + \exp_args:Ne \fvset + { \prop_to_keyval:N \l__ctxdoc_side_example_prop } + } +\tl_put_right:Nn \endSideBySideExample + { \endtrivlist } +\ctex_patch_cmd:Nnn \__codedoc_function_typeset_start: + { \bigskip } + { \nointerlineskip \addvspace { \bigskipamount } } %% l3doc 会设置列表环境中 \listparindent=\z@,我们在这里恢复它。 \cs_set_eq:NN \list \__codedoc_oldlist:nn \cs_new_nopar:Npn \zihaopt #1 diff --git a/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseGBK.dict b/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseGBK.dict index d74cabd99d3..d9f9b297a90 100644 --- a/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseGBK.dict +++ b/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseGBK.dict @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesDictionary{translator-theorem-dictionary}{ChineseGBK}% - [2022/06/04 v2.5.9 Chinese translation for theorem name (CTEX)] + [2022/07/14 v2.5.10 Chinese translation for theorem name (CTEX)] \providetranslation{Comments}{} \providetranslation{comments}{} \providetranslation{Comment}{} diff --git a/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseUTF8.dict b/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseUTF8.dict index 3a3c402acf1..bc5ea083ae9 100644 --- a/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseUTF8.dict +++ b/Master/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseUTF8.dict @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesDictionary{translator-theorem-dictionary}{ChineseUTF8}% - [2022/06/04 v2.5.9 Chinese translation for theorem name (CTEX)] + [2022/07/14 v2.5.10 Chinese translation for theorem name (CTEX)] \providetranslation{Comments}{评论} \providetranslation{comments}{评论} \providetranslation{Comment}{评论} diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def index 17c3e8d931a..b7ff5eeb28e 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Asian pTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-aptex.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \cs_new_protected:Npn \ctex_set_zhmap:n { \tl_gput_right:Nx \g__ctex_zhmap_tl } \cs_new_protected:Npn \ctex_use_zhmap: @@ -216,45 +216,48 @@ { \exp_not:o { \CTEX@selectfont@hook #1 } } } \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: -\if_bool:N \c__ctex_everysel_loaded_bool - \if_cs_exist:N \@EverySelectfont@Init - \group_begin: - \cs_set:Npn \__ctex_tmp:N #1 - { - \tl_set:Nn \l__ctex_tmp_tl {#1} - \cs_new_eq:NN \CTEX@selectfont@save #1 - \cs_new_protected:Npn \__ctex_restore_selectfont: - { - \cs_if_free:NF \scr@new@selectfont - { - \cs_if_free:NF \par@update - { - \tl_put_right:Nn \@EverySelectfont@Init - { \tl_put_right:Nn #1 { \par@update } } - } - \cs_set_eq:NN \scr@new@selectfont #1 - \cs_set_eq:NN \CTEX@selectfont@save \scr@selectfont - } - \tl_put_left:Nn \@EverySelectfont@Init - { \cs_set_eq:NN #1 \CTEX@selectfont@save } - \cs_undefine:N \__ctex_restore_selectfont: - } - } - \ctex_parse_name:NN \__ctex_tmp:N \selectfont - \exp_last_unbraced:NNo \group_end: - \ctex_patch_cmd_once:NnnnTF { \l__ctex_tmp_tl } - { \ExplSyntaxOff } - { \size@update } - { \CTEX@selectfont@hook \size@update } - { \__ctex_restore_selectfont: } - { \ctex_patch_failure:N \selectfont } - \fi: - \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n - { \EverySelectfont } -\else: - \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n - { \ctex_gadd_ltxhook:nn { selectfont } } -\fi: +\bool_if:NTF \c__ctex_everysel_loaded_bool + { + \cs_if_free:NF \@EverySelectfont@Init + { + \group_begin: + \cs_set:Npn \__ctex_tmp:N #1 + { + \tl_set:Nn \l__ctex_tmp_tl {#1} + \cs_new_eq:NN \CTEX@selectfont@save #1 + \cs_new_protected:Npn \__ctex_restore_selectfont: + { + \cs_if_free:NF \scr@new@selectfont + { + \cs_if_free:NF \par@update + { + \tl_put_right:Nn \@EverySelectfont@Init + { \tl_put_right:Nn #1 { \par@update } } + } + \cs_set_eq:NN \scr@new@selectfont #1 + \cs_set_eq:NN \CTEX@selectfont@save \scr@selectfont + } + \tl_put_left:Nn \@EverySelectfont@Init + { \cs_set_eq:NN #1 \CTEX@selectfont@save } + \cs_undefine:N \__ctex_restore_selectfont: + } + } + \ctex_parse_name:NN \__ctex_tmp:N \selectfont + \exp_last_unbraced:NNo \group_end: + \ctex_patch_cmd_once:NnnnTF { \l__ctex_tmp_tl } + { \ExplSyntaxOff } + { \size@update } + { \CTEX@selectfont@hook \size@update } + { \__ctex_restore_selectfont: } + { \ctex_patch_failure:N \selectfont } + } + \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n + { \EverySelectfont } + } + { + \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n + { \ctex_gadd_ltxhook:nn { selectfont } } + } \ctex_gadd_selectfont_hook:n { \CTEX@selectfont@hook } \cs_new_protected:Npn \ctex_update_xkanjiskip: { diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def index 4cb859a27ec..385852488ae 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {LuaLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-luatex.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \msg_new:nnn { ctex } { luatexja-loaded } { Package~`luatexja'~can~not~be~loaded~before~`ctex'.\\ @@ -355,7 +355,7 @@ \cs_new:Npn \ctex_ltj_if_jfont:nTF #1 { \ctex_ltj_is_kenc:n { \__ctex_ltj_ltj_if_jfont:w #1 / \q_stop } - \ifin@ \exp_after:wN \use_i:nn \else: \exp_after:wN \use_ii:nn \fi: + \legacy_if:nTF { in@ } } \cs_new:Npn \__ctex_ltj_ltj_if_jfont:w #1 / #2 \q_stop {#1} @@ -1180,40 +1180,43 @@ { \exp_not:o { \CTEX@selectfont@hook #1 } } } \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: -\if_bool:N \c__ctex_everysel_loaded_bool - \if_cs_exist:N \@EverySelectfont@Init - \group_begin: - \cs_set:Npn \__ctex_tmp:N #1 - { - \tl_set:Nn \l__ctex_tmp_tl {#1} - \cs_new_eq:NN \CTEX@selectfont@save #1 - \cs_new_protected:Npn \__ctex_restore_selectfont: - { - \cs_if_free:NF \scr@new@selectfont - { - \cs_set_eq:NN \scr@new@selectfont #1 - \cs_set_eq:NN \CTEX@selectfont@save \scr@selectfont - } - \tl_put_left:Nn \@EverySelectfont@Init - { \cs_set_eq:NN #1 \CTEX@selectfont@save } - \cs_undefine:N \__ctex_restore_selectfont: - } - } - \ctex_parse_name:NN \__ctex_tmp:N \selectfont - \exp_last_unbraced:NNo \group_end: - \ctex_patch_cmd_once:NnnnTF { \l__ctex_tmp_tl } - { \ExplSyntaxOff } - { \size@update } - { \CTEX@selectfont@hook \size@update } - { \__ctex_restore_selectfont: } - { \ctex_patch_failure:N \selectfont } - \fi: - \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n - { \EverySelectfont } -\else: - \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n - { \ctex_gadd_ltxhook:nn { selectfont } } -\fi: +\bool_if:NTF \c__ctex_everysel_loaded_bool + { + \cs_if_free:NF \@EverySelectfont@Init + { + \group_begin: + \cs_set:Npn \__ctex_tmp:N #1 + { + \tl_set:Nn \l__ctex_tmp_tl {#1} + \cs_new_eq:NN \CTEX@selectfont@save #1 + \cs_new_protected:Npn \__ctex_restore_selectfont: + { + \cs_if_free:NF \scr@new@selectfont + { + \cs_set_eq:NN \scr@new@selectfont #1 + \cs_set_eq:NN \CTEX@selectfont@save \scr@selectfont + } + \tl_put_left:Nn \@EverySelectfont@Init + { \cs_set_eq:NN #1 \CTEX@selectfont@save } + \cs_undefine:N \__ctex_restore_selectfont: + } + } + \ctex_parse_name:NN \__ctex_tmp:N \selectfont + \exp_last_unbraced:NNo \group_end: + \ctex_patch_cmd_once:NnnnTF { \l__ctex_tmp_tl } + { \ExplSyntaxOff } + { \size@update } + { \CTEX@selectfont@hook \size@update } + { \__ctex_restore_selectfont: } + { \ctex_patch_failure:N \selectfont } + } + \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n + { \EverySelectfont } + } + { + \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n + { \ctex_gadd_ltxhook:nn { selectfont } } + } \ctex_gadd_selectfont_hook:n { \CTEX@selectfont@hook } \ctex_add_to_selectfont:n { diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def index dc8cd6c91c3..770240c7aa0 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {(pdf)LaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-pdftex.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \cs_new_protected:Npn \ctex_set_zhmap:n { \tl_gput_right:Nx \g__ctex_zhmap_tl } \cs_new_protected:Npn \ctex_use_zhmap: @@ -62,8 +62,8 @@ { \tl_gput_right:cn { #1 + #2 } { \ctex_add_cmap:n {#1} } } } } -\cs_generate_variant:Nn \ctex_family_cmap:nn { x } -\cs_new_eq:NN \CTEX@Family@CMap \ctex_family_cmap:xn +\cs_generate_variant:Nn \ctex_family_cmap:nn { ee } +\cs_new_eq:NN \CTEX@Family@CMap \ctex_family_cmap:ee \cs_new_protected:Npn \ctex_add_cmap:n #1 { \cs_if_free:NF \CJK@plane @@ -81,51 +81,73 @@ \exp_args:Ne \file_get_full_name:nNTF { \str_lowercase:n {#2} .cmap } \l__ctex_cmap_file_tl { - \tex_immediate:D \tex_pdfobj:D stream ~ file { \l__ctex_cmap_file_tl } + \pdf_object_unnamed_write:nx + { fstream } + { { } { \l__ctex_cmap_file_tl } } \cs_new_protected:Npx #1 { \pdfnobuiltintounicode \tex_font:D \tex_pdffontattr:D \tex_font:D - { /ToUnicode ~ \int_value:w \tex_pdflastobj:D \c_space_tl 0 ~ R } + { /ToUnicode ~ \pdf_object_ref_last: } } } { \cs_new_eq:NN #1 \prg_do_nothing: } } \tl_new:N \l__ctex_cmap_file_tl -\group_begin: -\char_set_catcode_other:N \# -\sys_if_output_pdf:TF +\sys_if_output_pdf:T { - \group_end: - \ctex_appto_cmd:NnnTF \DeclareFontFamily { \ExplSyntaxOff } - { \CTEX@Family@CMap {#1} {#2} } + \exp_args:Nno \use:n + { \cs_gset_protected:Npn \DeclareFontFamily #1#2#3 } { - \ctex_at_end_package:nn { cmap } - { - \cs_gset_eq:NN \ctex_add_cmap:n \use_none:n - \cs_gset_eq:NN \CTEX@Family@CMap \use_none:nn - } + \DeclareFontFamily {#1} {#2} {#3} + \CTEX@Family@CMap {#1} {#2} } - { \ctex_patch_failure:N \DeclareFontFamily } - } - { \group_end: } -\if_bool:N \g__ctex_zhmCJK_bool - \PassOptionsToPackage { encoding = \g__ctex_encoding_tl } { zhmCJK } - \RequirePackage { zhmCJK } -\else: - \str_if_eq:onTF { \g__ctex_encoding_tl } { GBK } - { \RequirePackage { CJK } } - { \RequirePackage { CJKutf8 } } - \RequirePackage { CJKpunct , CJKspace } - \cs_new_protected:Npn \ctex_load_zhmap:nnnn #1#2#3#4 - { - \tl_set:Nn \CJKrmdefault {#1} - \tl_set:Nn \CJKsfdefault {#2} - \tl_set:Nn \CJKttdefault {#3} - \ctex_set_zhmap:n { \ctex_file_input:n { ctex-zhmap- #4 .tex } } - } - \@onlypreamble \ctex_load_zhmap:nnnn -\fi: + \ctex_at_end_package:nn { cmap } + { + \cs_gset_eq:NN \ctex_add_cmap:n \use_none:n + \cs_gset_eq:NN \CTEX@Family@CMap \use_none:nn + } + } +\bool_if:NTF \g__ctex_zhmCJK_bool + { + \exp_args:Ne \PassOptionsToPackage + { encoding = \g__ctex_encoding_tl } + { zhmCJK } + \RequirePackage { zhmCJK } + } + { + \str_if_eq:onTF { \g__ctex_encoding_tl } { GBK } + { \RequirePackage { CJK } } + { \RequirePackage { CJKutf8 } } + \RequirePackage { CJKpunct , CJKspace } + \cs_new_protected:Npn \ctex_load_zhmap:nnnn #1#2#3#4 + { + \tl_set:Nn \CJKrmdefault {#1} + \tl_set:Nn \CJKsfdefault {#2} + \tl_set:Nn \CJKttdefault {#3} + \ctex_set_zhmap:n { \ctex_file_input:n { ctex-zhmap- #4 .tex } } + } + \@onlypreamble \ctex_load_zhmap:nnnn + } +\cs_new_protected:Npn \ctex_undeclare_unicode_character:n #1 + { \cs_set_eq:cN { u8 : \ctex_utfviii_char:n {#1} } \tex_undefined:D } +\cs_new:Npn \ctex_utfviii_char:n #1 + { + \exp_last_unbraced:Ne \__ctex_utfviii_char_aux:nnnn + { \char_to_utfviii_bytes:n {#1} } + } +\cs_new:Npn \__ctex_utfviii_char_aux:nnnn #1#2#3#4 + { + \char_generate:nn {#1} { 12 } + \tl_if_empty:nF {#2} { \char_generate:nn {#2} { 12 } } + \tl_if_empty:nF {#3} { \char_generate:nn {#3} { 12 } } + \tl_if_empty:nF {#4} { \char_generate:nn {#4} { 12 } } + } +\CJKaddEncHook { UTF8 } + { + \ctex_undeclare_unicode_character:n { "3008 } + \ctex_undeclare_unicode_character:n { "3009 } + } \cs_new_protected:Npn \ctex_CJK_input:n #1 { \ctex_push_file: @@ -166,24 +188,180 @@ } \AtBeginDocument { - \str_if_eq:eeF { \l__ctex_punct_tl } { quanjiao } - { \punctstyle { \l__ctex_punct_tl } } + \use:e + { + \str_if_eq:nnF { \l__ctex_punct_tl } { quanjiao } + { \exp_not:N \punctstyle { \l__ctex_punct_tl } } + } } \ctex_at_end_preamble:n { \ctex_update_default_family: } -\reverse_if:N \if_bool:N \g__ctex_zhmCJK_bool - \str_if_eq:onF { \g__ctex_encoding_tl } { UTF8 } - { - \CJK@makeActive - \CJK@loadBinding { standard } - } - \exp_args:Nx \ctex_at_end_preamble:n - { - \exp_not:N \CJK@envStart - { } { \g__ctex_encoding_tl } { \exp_not:N \CJKfamilydefault } - \exp_not:N \CJKtilde - } -\fi: +\bool_if:NF \g__ctex_zhmCJK_bool + { + \str_if_eq:onTF { \g__ctex_encoding_tl } { UTF8 } + { \CJK@loadBinding { UTF8 } } + { \CJK@loadBinding { standard } } + \exp_args:Ne \ctex_at_end_preamble:n + { + \exp_not:N \CJK@envStart + { } { \g__ctex_encoding_tl } { \exp_not:N \CJKfamilydefault } + \exp_not:N \CJKtilde + } + } \cs_new_eq:NN \ctex_auto_ignorespaces: \CJK@@ignorespaces +\cs_new:Npn \__ctex_char:N #1 + { \exp_args:Ne \CTEX@char@n { \int_value:w `#1 } } +\cs_new:Npn \__ctex_char:NN #1#2 + { + \token_if_eq_meaning:NNTF #2 \protect + { \__ctex_char_aux:NN #1 } + { \__ctex_char_aux:NN #1#2 } + } +\cs_new:Npn \__ctex_char_aux:NN #1#2 + { + \exp_last_unbraced:Ne \CTEX@char@nn + { + { \int_value:w `#1 } + { \int_value:w `#2 } + } + } +\cs_new:Npn \__ctex_char:NNN #1#2#3 + { + \token_if_eq_meaning:NNTF #2 \protect + { \__ctex_char_auxi:NNNN #1#3 } + { \__ctex_char_auxii:NNN #1#2#3 } + } +\cs_new:Npn \__ctex_char_auxi:NNN #1#2#3#4 + { \__ctex_char_auxii:NNN #1#2#4 } +\cs_new:Npn \__ctex_char_auxii:NNN #1#2#3 + { + \exp_last_unbraced:Ne \CTEX@char@nnn + { + { \int_value:w `#1 } + { \int_value:w `#2 } + { \int_value:w `#3 } + } + } +\cs_new:Npn \__ctex_char:NNNN #1#2#3#4 + { + \token_if_eq_meaning:NNTF #2 \protect + { \__ctex_char_auxi:NNNNN #1#3 } + { \__ctex_char_auxii:NNNN #1#2#3#4 } + } +\cs_new:Npn \__ctex_char_auxi:NNNNN #1#2#3#4#5 + { \__ctex_char_auxii:NNNN #1#2#3#5 } +\cs_new:Npn \__ctex_char_auxii:NNNN #1#2#3#4 + { + \exp_last_unbraced:Ne \CTEX@char@nnnn + { + { \int_value:w `#1 } + { \int_value:w `#2 } + { \int_value:w `#3 } + { \int_value:w `#4 } + } + } +\cs_gset_eq:NN \CJK@X \__ctex_char:N +\cs_gset_eq:NN \CJK@XX \__ctex_char:NN +\cs_gset_eq:NN \CJK@XXX \__ctex_char:NNN +\cs_gset_eq:NN \CJK@XXXX \__ctex_char:NNNN +\str_if_eq:onF { \g__ctex_encoding_tl } { GBK } + { + \exp_args:Nne \use:n + { \cs_gset:Npn \__ctex_char_aux:NN #1#2 } + { + \exp_not:N \cs_if_exist_use:cF + { u8: \exp_not:N \tl_to_str:n { #1#2 } } + { \exp_not:o { \__ctex_char_aux:NN {#1} {#2} } } + } + \exp_args:Nne \use:n + { \cs_gset:Npn \__ctex_char_auxii:NNN #1#2#3 } + { + \exp_not:N \cs_if_exist_use:cF + { u8: \exp_not:N \tl_to_str:n { #1#2#3 } } + { \exp_not:o { \__ctex_char_auxii:NNN {#1} {#2} {#3} } } + } + } +\group_begin: +\char_set_catcode_active:n { "7F } +\cs_new:Npn \__ctex_char_preproc:w #1 ^^7f #2 ^^7f + { \exp_args:No \CTEX@char@nn { \int_value:w `#1 } {#2} } +\cs_gset_eq:NN \mule@arg \__ctex_char_preproc:w +\group_end: +\exp_args:Ne \ctex_at_end:n + { + \char_set_catcode:nn + { \int_value:w "7F } + { \char_value_catcode:n { "7F } } + } +\cs_new_protected:Npn \CTEX@char@n #1 + { + \mode_leave_vertical: + \use:c { CJK@ #1 } + \CJK@ignorespaces + } +\cs_new_protected:Npn \CTEX@char@nn #1#2 + { + \mode_leave_vertical: + \use:c { CJK@ #1 } {#2} + \CJK@ignorespaces + } +\cs_new_protected:Npn \CTEX@char@nnn #1#2#3 + { + \mode_leave_vertical: + \use:c { CJK@ #1 } {#2} {#3} + \CJK@ignorespaces + } +\cs_new_protected:Npn \CTEX@char@nnnn #1#2#3#4 + { + \mode_leave_vertical: + \use:c { CJK@ #1 } {#2} {#3} {#4} + \CJK@ignorespaces + } +\cs_new_protected:Npn \CTEX@char@nn@n #1 { \CTEX@char@nn #1 } +\cs_new_protected:Npn \CTEX@char@nnn@n #1 { \CTEX@char@nnn #1 } +\cs_new_protected:Npn \CTEX@char@nnnn@n #1 { \CTEX@char@nnnn #1 } +\cs_new:Npn \__ctex_char_wrap:nn #1#2 + { \CTEX@char@nn@n { {#1} {#2} } } +\cs_new:Npn \__ctex_char_wrap:nnn #1#2#3 + { \CTEX@char@nnn@n { {#1} {#2} {#3} } } +\cs_new:Npn \__ctex_char_wrap:nnnn #1#2#3#4 + { \CTEX@char@nnnn@n { {#1} {#2} {#3} {#4} } } +\tl_put_right:Nn \l_text_case_exclude_arg_tl + { + \CTEX@char@n + \CTEX@char@nn@n + \CTEX@char@nnn@n + \CTEX@char@nnnn@n + } +\text_declare_expand_equivalent:Nn \CTEX@char@nn { \__ctex_char_wrap:nn } +\text_declare_expand_equivalent:Nn \CTEX@char@nnn { \__ctex_char_wrap:nnn } +\text_declare_expand_equivalent:Nn \CTEX@char@nnnn { \__ctex_char_wrap:nnnn } +\cs_new:Npn \__ctex_char_raw:n #1 + { \char_generate:nn {#1} { 12 } } +\cs_new:Npn \__ctex_char_raw:nn #1#2 + { + \char_generate:nn {#1} { 12 } + \char_generate:nn {#2} { 12 } + } +\cs_new:Npn \__ctex_char_raw:nnn #1#2#3 + { + \char_generate:nn {#1} { 12 } + \char_generate:nn {#2} { 12 } + \char_generate:nn {#3} { 12 } + } +\cs_new:Npn \__ctex_char_raw:nnnn #1#2#3#4 + { + \char_generate:nn {#1} { 12 } + \char_generate:nn {#2} { 12 } + \char_generate:nn {#3} { 12 } + \char_generate:nn {#4} { 12 } + } +\cs_new:Npn \__ctex_char_raw_nn:n #1 { \use:e { \__ctex_char_raw:nn #1 } } +\cs_new:Npn \__ctex_char_raw_nnn:n #1 { \use:e { \__ctex_char_raw:nnn #1 } } +\cs_new:Npn \__ctex_char_raw_nnnn:n #1 { \use:e { \__ctex_char_raw:nnnn #1 } } +\text_declare_purify_equivalent:Nn \CTEX@char@n { \__ctex_char_raw:n } +\text_declare_purify_equivalent:Nn \CTEX@char@nn@n { \__ctex_char_raw_nn:n } +\text_declare_purify_equivalent:Nn \CTEX@char@nnn@n { \__ctex_char_raw_nnn:n } +\text_declare_purify_equivalent:Nn \CTEX@char@nnnn@n { \__ctex_char_raw_nnnn:n } \cs_new_protected:Npn \ctex_ignorespaces_case:N #1 { \cs_set_protected:Npn \ctex_set_ignorespaces: @@ -367,42 +545,45 @@ { \exp_not:o { \CTEX@selectfont@hook #1 } } } \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: -\if_bool:N \c__ctex_everysel_loaded_bool - \if_cs_exist:N \@EverySelectfont@Init - \group_begin: - \cs_set:Npn \__ctex_tmp:N #1 - { - \tl_set:Nn \l__ctex_tmp_tl {#1} - \cs_new_eq:NN \CTEX@selectfont@save #1 - \cs_new_protected:Npn \__ctex_restore_selectfont: - { - \cs_if_free:NF \scr@new@selectfont - { - \cs_if_free:NF \par@update - { \tl_put_right:Nn #1 { \par@update } } - \cs_set_eq:NN \scr@selectfont \CTEX@selectfont@save - \cs_set_eq:NN \scr@new@selectfont #1 - } - \tl_put_left:Nn \@EverySelectfont@Init - { \cs_set_eq:NN #1 \CTEX@selectfont@save } - \cs_undefine:N \__ctex_restore_selectfont: - } - } - \ctex_parse_name:NN \__ctex_tmp:N \selectfont - \exp_last_unbraced:NNo \group_end: - \ctex_patch_cmd_once:NnnnTF { \l__ctex_tmp_tl } - { \ExplSyntaxOff } - { \size@update } - { \CTEX@selectfont@hook \size@update } - { \__ctex_restore_selectfont: } - { \ctex_patch_failure:N \selectfont } - \fi: - \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n - { \EverySelectfont } -\else: - \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n - { \ctex_gadd_ltxhook:nn { selectfont } } -\fi: +\bool_if:NTF \c__ctex_everysel_loaded_bool + { + \cs_if_free:NF \@EverySelectfont@Init + { + \group_begin: + \cs_set:Npn \__ctex_tmp:N #1 + { + \tl_set:Nn \l__ctex_tmp_tl {#1} + \cs_new_eq:NN \CTEX@selectfont@save #1 + \cs_new_protected:Npn \__ctex_restore_selectfont: + { + \cs_if_free:NF \scr@new@selectfont + { + \cs_if_free:NF \par@update + { \tl_put_right:Nn #1 { \par@update } } + \cs_set_eq:NN \scr@selectfont \CTEX@selectfont@save + \cs_set_eq:NN \scr@new@selectfont #1 + } + \tl_put_left:Nn \@EverySelectfont@Init + { \cs_set_eq:NN #1 \CTEX@selectfont@save } + \cs_undefine:N \__ctex_restore_selectfont: + } + } + \ctex_parse_name:NN \__ctex_tmp:N \selectfont + \exp_last_unbraced:NNo \group_end: + \ctex_patch_cmd_once:NnnnTF { \l__ctex_tmp_tl } + { \ExplSyntaxOff } + { \size@update } + { \CTEX@selectfont@hook \size@update } + { \__ctex_restore_selectfont: } + { \ctex_patch_failure:N \selectfont } + } + \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n + { \EverySelectfont } + } + { + \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n + { \ctex_gadd_ltxhook:nn { selectfont } } + } \ctex_gadd_selectfont_hook:n { \cs_if_exist:NF \CJK@plane { \CTEX@selectfont@hook } } \ctex_define:n diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def index 69708e9ae69..889f051a207 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {upTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-uptex.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \cs_new_protected:Npn \ctex_set_zhmap:n { \tl_gput_right:Nx \g__ctex_zhmap_tl } \cs_new_protected:Npn \ctex_use_zhmap: @@ -216,45 +216,48 @@ { \exp_not:o { \CTEX@selectfont@hook #1 } } } \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: -\if_bool:N \c__ctex_everysel_loaded_bool - \if_cs_exist:N \@EverySelectfont@Init - \group_begin: - \cs_set:Npn \__ctex_tmp:N #1 - { - \tl_set:Nn \l__ctex_tmp_tl {#1} - \cs_new_eq:NN \CTEX@selectfont@save #1 - \cs_new_protected:Npn \__ctex_restore_selectfont: - { - \cs_if_free:NF \scr@new@selectfont - { - \cs_if_free:NF \par@update - { - \tl_put_right:Nn \@EverySelectfont@Init - { \tl_put_right:Nn #1 { \par@update } } - } - \cs_set_eq:NN \scr@new@selectfont #1 - \cs_set_eq:NN \CTEX@selectfont@save \scr@selectfont - } - \tl_put_left:Nn \@EverySelectfont@Init - { \cs_set_eq:NN #1 \CTEX@selectfont@save } - \cs_undefine:N \__ctex_restore_selectfont: - } - } - \ctex_parse_name:NN \__ctex_tmp:N \selectfont - \exp_last_unbraced:NNo \group_end: - \ctex_patch_cmd_once:NnnnTF { \l__ctex_tmp_tl } - { \ExplSyntaxOff } - { \size@update } - { \CTEX@selectfont@hook \size@update } - { \__ctex_restore_selectfont: } - { \ctex_patch_failure:N \selectfont } - \fi: - \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n - { \EverySelectfont } -\else: - \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n - { \ctex_gadd_ltxhook:nn { selectfont } } -\fi: +\bool_if:NTF \c__ctex_everysel_loaded_bool + { + \cs_if_free:NF \@EverySelectfont@Init + { + \group_begin: + \cs_set:Npn \__ctex_tmp:N #1 + { + \tl_set:Nn \l__ctex_tmp_tl {#1} + \cs_new_eq:NN \CTEX@selectfont@save #1 + \cs_new_protected:Npn \__ctex_restore_selectfont: + { + \cs_if_free:NF \scr@new@selectfont + { + \cs_if_free:NF \par@update + { + \tl_put_right:Nn \@EverySelectfont@Init + { \tl_put_right:Nn #1 { \par@update } } + } + \cs_set_eq:NN \scr@new@selectfont #1 + \cs_set_eq:NN \CTEX@selectfont@save \scr@selectfont + } + \tl_put_left:Nn \@EverySelectfont@Init + { \cs_set_eq:NN #1 \CTEX@selectfont@save } + \cs_undefine:N \__ctex_restore_selectfont: + } + } + \ctex_parse_name:NN \__ctex_tmp:N \selectfont + \exp_last_unbraced:NNo \group_end: + \ctex_patch_cmd_once:NnnnTF { \l__ctex_tmp_tl } + { \ExplSyntaxOff } + { \size@update } + { \CTEX@selectfont@hook \size@update } + { \__ctex_restore_selectfont: } + { \ctex_patch_failure:N \selectfont } + } + \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n + { \EverySelectfont } + } + { + \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n + { \ctex_gadd_ltxhook:nn { selectfont } } + } \ctex_gadd_selectfont_hook:n { \CTEX@selectfont@hook } \cs_new_protected:Npn \ctex_update_xkanjiskip: { diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def index d51a9e4f952..d04fe9490f7 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def @@ -24,12 +24,12 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {XeLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-xetex.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \RequirePackage { xeCJK } -\exp_args:Nx \xeCJKsetup +\exp_args:Ne \xeCJKsetup { LoadFandol = false , PunctStyle = \l__ctex_punct_tl @@ -78,40 +78,43 @@ { \exp_not:o { \CTEX@selectfont@hook #1 } } } \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: -\if_bool:N \c__ctex_everysel_loaded_bool - \if_cs_exist:N \@EverySelectfont@Init - \group_begin: - \cs_set:Npn \__ctex_tmp:N #1 - { - \tl_set:Nn \l__ctex_tmp_tl {#1} - \cs_new_eq:NN \CTEX@selectfont@save #1 - \cs_new_protected:Npn \__ctex_restore_selectfont: - { - \cs_if_free:NF \scr@new@selectfont - { - \cs_set_eq:NN \scr@new@selectfont #1 - \cs_set_eq:NN \CTEX@selectfont@save \scr@selectfont - } - \tl_put_left:Nn \@EverySelectfont@Init - { \cs_set_eq:NN #1 \CTEX@selectfont@save } - \cs_undefine:N \__ctex_restore_selectfont: - } - } - \ctex_parse_name:NN \__ctex_tmp:N \selectfont - \exp_last_unbraced:NNo \group_end: - \ctex_patch_cmd_once:NnnnTF { \l__ctex_tmp_tl } - { \ExplSyntaxOff } - { \size@update } - { \CTEX@selectfont@hook \size@update } - { \__ctex_restore_selectfont: } - { \ctex_patch_failure:N \selectfont } - \fi: - \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n - { \EverySelectfont } -\else: - \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n - { \ctex_gadd_ltxhook:nn { selectfont } } -\fi: +\bool_if:NTF \c__ctex_everysel_loaded_bool + { + \cs_if_free:NF \@EverySelectfont@Init + { + \group_begin: + \cs_set:Npn \__ctex_tmp:N #1 + { + \tl_set:Nn \l__ctex_tmp_tl {#1} + \cs_new_eq:NN \CTEX@selectfont@save #1 + \cs_new_protected:Npn \__ctex_restore_selectfont: + { + \cs_if_free:NF \scr@new@selectfont + { + \cs_set_eq:NN \scr@new@selectfont #1 + \cs_set_eq:NN \CTEX@selectfont@save \scr@selectfont + } + \tl_put_left:Nn \@EverySelectfont@Init + { \cs_set_eq:NN #1 \CTEX@selectfont@save } + \cs_undefine:N \__ctex_restore_selectfont: + } + } + \ctex_parse_name:NN \__ctex_tmp:N \selectfont + \exp_last_unbraced:NNo \group_end: + \ctex_patch_cmd_once:NnnnTF { \l__ctex_tmp_tl } + { \ExplSyntaxOff } + { \size@update } + { \CTEX@selectfont@hook \size@update } + { \__ctex_restore_selectfont: } + { \ctex_patch_failure:N \selectfont } + } + \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n + { \EverySelectfont } + } + { + \cs_new_protected:Npn \ctex_gadd_selectfont_hook:n + { \ctex_gadd_ltxhook:nn { selectfont } } + } \ctex_gadd_selectfont_hook:n { \CTEX@selectfont@hook } \ctex_define:n { diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd index ef35cf49d59..36285d98bfd 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{c19rm.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd index 7ab9fd5389d..d9f648e5f81 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{c19sf.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd index 9298ea2ce1f..9f1e763927f 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{c19tt.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd index 1f63868913c..04da4ec137e 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{c70rm.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd index 8d5888dd6b2..3aa65f3173f 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{c70sf.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd index 7b314238167..866a09276f2 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{c70tt.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] %% %% Chinese characters %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/jt2zhrm.fd b/Master/texmf-dist/tex/latex/ctex/fd/jt2zhrm.fd index d5e8e8b8fa0..229419b3d44 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/jt2zhrm.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/jt2zhrm.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{jt2zhrm.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] \DeclareKanjiFamily{JT2}{zhrm}{} \DeclareFontShape{JT2}{zhrm}{m}{n}{<-> upzhserif-v}{} \DeclareFontShape{JT2}{zhrm}{m}{it}{<-> upzhserifit-v}{} diff --git a/Master/texmf-dist/tex/latex/ctex/fd/jt2zhsf.fd b/Master/texmf-dist/tex/latex/ctex/fd/jt2zhsf.fd index 2adb53b670a..a5ca9c1feac 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/jt2zhsf.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/jt2zhsf.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{jt2zhsf.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] \DeclareKanjiFamily{JT2}{zhsf}{} \DeclareFontShape{JT2}{zhsf}{m}{n}{<-> upzhsans-v}{} \DeclareFontShape{JT2}{zhsf}{b}{n}{<-> upzhsansb-v}{} diff --git a/Master/texmf-dist/tex/latex/ctex/fd/jt2zhtt.fd b/Master/texmf-dist/tex/latex/ctex/fd/jt2zhtt.fd index ecbaed5bf95..c81c32e652f 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/jt2zhtt.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/jt2zhtt.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{jt2zhtt.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] \DeclareKanjiFamily{JT2}{zhtt}{} \DeclareFontShape{JT2}{zhtt}{m}{n}{<-> upzhmono-v}{} %% diff --git a/Master/texmf-dist/tex/latex/ctex/fd/jy2zhrm.fd b/Master/texmf-dist/tex/latex/ctex/fd/jy2zhrm.fd index 6aff51f5e20..e301afd1c25 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/jy2zhrm.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/jy2zhrm.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{jy2zhrm.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] \DeclareKanjiFamily{JY2}{zhrm}{} \DeclareFontShape{JY2}{zhrm}{m}{n}{<-> upzhserif-h}{} \DeclareFontShape{JY2}{zhrm}{m}{it}{<-> upzhserifit-h}{} diff --git a/Master/texmf-dist/tex/latex/ctex/fd/jy2zhsf.fd b/Master/texmf-dist/tex/latex/ctex/fd/jy2zhsf.fd index 8d8a25568dd..f248cf0a8c6 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/jy2zhsf.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/jy2zhsf.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{jy2zhsf.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] \DeclareKanjiFamily{JY2}{zhsf}{} \DeclareFontShape{JY2}{zhsf}{m}{n}{<-> upzhsans-h}{} \DeclareFontShape{JY2}{zhsf}{b}{n}{<-> upzhsansb-h}{} diff --git a/Master/texmf-dist/tex/latex/ctex/fd/jy2zhtt.fd b/Master/texmf-dist/tex/latex/ctex/fd/jy2zhtt.fd index 0c1b3b561cb..2a0c5e7b55e 100644 --- a/Master/texmf-dist/tex/latex/ctex/fd/jy2zhtt.fd +++ b/Master/texmf-dist/tex/latex/ctex/fd/jy2zhtt.fd @@ -25,7 +25,7 @@ %% --------------------------------------------------------------------- %% \ProvidesFile{jy2zhtt.fd}% - [2022/06/04 v2.5.9 Chinese font definition (CTEX)] + [2022/07/14 v2.5.10 Chinese font definition (CTEX)] \DeclareKanjiFamily{JY2}{zhtt}{} \DeclareFontShape{JY2}{zhtt}{m}{n}{<-> upzhmono-h}{} %% diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def index 5e75f080c08..4dcd99259d3 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Adobe fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-adobe.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_fontset_case:nnnn { \ctex_fontset_error:n { adobe } } { diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def index 310a96d2dfe..1c43aefd695 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Fandol fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-fandol.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_fontset_case:nnnn { \ctex_fontset_error:n { fandol } } { diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def index dd715916ae2..c3cecded5df 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Founder fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-founder.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_fontset_case:nnn { \ctex_zhmap_case:nnn diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def index 8a5b2916d32..35683084b30 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {macOS fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-mac.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \file_if_exist:nTF { /System/Library/Fonts/PingFang.ttc } { \ctex_file_input:n { ctex-fontset-macnew.def } } { \ctex_file_input:n { ctex-fontset-macold.def } } diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-macnew.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-macnew.def index a9d2c85fa5b..731d23bfe5e 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-macnew.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-macnew.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {macOS fonts definition for El Capitan or later version (CTEX)} \ProvidesExplFile{ctex-fontset-macnew.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_fontset_case:nnnn { \ctex_fontset_error:n { mac } } { diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-macold.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-macold.def index 286c76c2cea..645c0b6cfc4 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-macold.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-macold.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {macOS fonts definition for Yosemite or earlier version (CTEX)} \ProvidesExplFile{ctex-fontset-macold.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_fontset_case:nnnn { \ctex_fontset_error:n { mac } } { \ctex_fontset_error:n { macold } } diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def index dadb03c2343..3cf0ef1a102 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Ubuntu fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-ubuntu.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_fontset_case:nnnn { \ctex_fontset_error:n { ubuntu } } { diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def index da40c90ccf3..5330b0bb718 100644 --- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def +++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Windows fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-windows.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \file_if_exist:nTF { \c_dollar_str WINDIR/Fonts/msyh.ttc } { \tl_const:Nn \c__ctex_msyh_suffix_tl { ttc } } { diff --git a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-article.def b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-article.def index 2f2ee4728ec..c0ddb32403b 100644 --- a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-article.def +++ b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-article.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for article (CTEX)} \ProvidesExplFile{ctex-article.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } \seq_new:N \c__ctex_headings_seq @@ -65,11 +65,11 @@ } \cs_new_protected:Npn \__ctex_def_heading_keys:n #1 { - \tl_put_right:Nx \l__ctex_tmp_tl + \exp_args:NNe \tl_put_right:Nn \l__ctex_tmp_tl { - #1 .meta:nn = { ctex / #1 } { ####1 } , + #1 .meta:nn = { ctex / #1 } { ##1 } , #1 / name .code:n = - { \ctex_assign_heading_name:nn {#1} { ####1 } } , + { \ctex_assign_heading_name:nn {#1} { ##1 } } , #1 / number .tl_set:N = \exp_not:c { CTEX@the#1 } , #1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } , #1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} , @@ -87,8 +87,7 @@ #1 / hang .bool_set:N = \exp_not:c { CTEX@#1@hang } , #1 / hang .initial:n = true , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , - #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline} - \exp_not:n { ##1##2 } , + #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline } ##1##2 , \__ctex_plus_key_aux:nn {#1} { break } , \__ctex_plus_key_aux:nn {#1} { format } , \__ctex_plus_key_aux:nn {#1} { nameformat } , @@ -102,9 +101,9 @@ { #1 / #2 .tl_set:N = \exp_not:c { CTEX@#1@#2 } , #1 / #2 + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } , + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } , #1 / #2 ~ + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } } \NewDocumentCommand \ctex_assign_heading_name:nn { m > { \SplitArgument { 1 } { , } } +m } @@ -428,20 +427,22 @@ \cs_new_protected:Npn \CTEX@hyperheadinghook { \group_begin: - \ifHy@implicit - \cs_set_eq:NN \H@old@chapter \Hy@org@chapter - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { - \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } - { - \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } - \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor - } - } - \else: - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } - \fi: + \legacy_if:nTF { Hy@implicit } + { + \cs_set_eq:NN \H@old@chapter \Hy@org@chapter + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { + \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } + { + \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } + \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor + } + } + } + { + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } + } \group_end: } \ctex_at_end_package:nn { hyperref } @@ -566,7 +567,7 @@ \CTEX@updatettlifname } \cs_new_protected:Npn \CTEX@updatettlifname - { \ifttl@label \CTEX@ifnametrue \else: \CTEX@ifnamefalse \fi: } + { \legacy_if:nTF { ttl@label } { \CTEX@ifnametrue } { \CTEX@ifnamefalse } } } \group_begin: \char_set_catcode_other:N \# @@ -654,18 +655,20 @@ } \__ctex_patch_toc_width:n { tocloft } \__ctex_patch_toc_width:n { titletoc } -\if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } - { \CTEXifname { \CTEXthesection \quad } { } } - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \@ne \thesubsection \quad \fi } - { \CTEXifname { \CTEXthesubsection \quad } { } } -\else: - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \m@ne \thesection \quad \fi } - { \CTEXifname { \CTEXthesection \quad } { } } -\fi: +\legacy_if:nTF { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \@ne \thesubsection \quad \fi } + { \CTEXifname { \CTEXthesubsection \quad } { } } + } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \m@ne \thesection \quad \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } \ctex_at_end_package:nn { fancyhdr } { \ctex_patch_cmd:Nnn \f@nch@initialise @@ -683,18 +686,20 @@ \f@nch@initialise \@ifpackagewith { fancyhdr } { headings } { - \if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } - { \CTEXifname { \CTEXthesection \quad } { } } - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \@ne \thesubsection \quad \fi } - { \CTEXifname { \CTEXthesubsection \quad } { } } - \else: - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } - { \CTEXifname { \CTEXthesection \quad } { } } - \fi: + \legacy_if:nTF { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \@ne \thesubsection \quad \fi } + { \CTEXifname { \CTEXthesubsection \quad } { } } + } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection \quad \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } } { } } diff --git a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-beamer.def b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-beamer.def index 14c03920518..bffb9725a39 100644 --- a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-beamer.def +++ b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-beamer.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for beamer (CTEX)} \ProvidesExplFile{ctex-beamer.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_headings_seq { part , section , subsection } \cs_new_protected:Npn \__ctex_initial_heading:n #1 @@ -62,11 +62,11 @@ } \cs_new_protected:Npn \__ctex_def_heading_keys:n #1 { - \tl_put_right:Nx \l__ctex_tmp_tl + \exp_args:NNe \tl_put_right:Nn \l__ctex_tmp_tl { - #1 .meta:nn = { ctex / #1 } { ####1 } , + #1 .meta:nn = { ctex / #1 } { ##1 } , #1 / name .code:n = - { \ctex_assign_heading_name:nn {#1} { ####1 } } , + { \ctex_assign_heading_name:nn {#1} { ##1 } } , #1 / number .tl_set:N = \exp_not:c { CTEX@the#1 } , #1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } , #1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} , @@ -91,9 +91,9 @@ { #1 / #2 .tl_set:N = \exp_not:c { CTEX@#1@#2 } , #1 / #2 + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } , + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } , #1 / #2 ~ + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } } \NewDocumentCommand \ctex_assign_heading_name:nn { m > { \SplitArgument { 1 } { , } } +m } diff --git a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-book.def b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-book.def index 194e8924bc1..ac300b3e8ef 100644 --- a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-book.def +++ b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-book.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for book (CTEX)} \ProvidesExplFile{ctex-book.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } \seq_new:N \c__ctex_headings_seq @@ -66,11 +66,11 @@ } \cs_new_protected:Npn \__ctex_def_heading_keys:n #1 { - \tl_put_right:Nx \l__ctex_tmp_tl + \exp_args:NNe \tl_put_right:Nn \l__ctex_tmp_tl { - #1 .meta:nn = { ctex / #1 } { ####1 } , + #1 .meta:nn = { ctex / #1 } { ##1 } , #1 / name .code:n = - { \ctex_assign_heading_name:nn {#1} { ####1 } } , + { \ctex_assign_heading_name:nn {#1} { ##1 } } , #1 / number .tl_set:N = \exp_not:c { CTEX@the#1 } , #1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } , #1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} , @@ -88,8 +88,7 @@ #1 / hang .bool_set:N = \exp_not:c { CTEX@#1@hang } , #1 / hang .initial:n = true , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , - #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline} - \exp_not:n { ##1##2 } , + #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline } ##1##2 , \__ctex_plus_key_aux:nn {#1} { break } , \__ctex_plus_key_aux:nn {#1} { format } , \__ctex_plus_key_aux:nn {#1} { nameformat } , @@ -103,9 +102,9 @@ { #1 / #2 .tl_set:N = \exp_not:c { CTEX@#1@#2 } , #1 / #2 + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } , + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } , #1 / #2 ~ + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } } \NewDocumentCommand \ctex_assign_heading_name:nn { m > { \SplitArgument { 1 } { , } } +m } @@ -169,6 +168,8 @@ \cs_new_protected:Npn \CTEX@setheadingskip { \skip_set:Nn \l__ctex_heading_skip } \cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip +\cs_new_protected:Npn \CTEX@setthispagestyle #1 + { \exp_args:Ne \thispagestyle { \use:c { CTEX@#1@pagestyle } } } \ProvideDocumentCommand \partmark { m } { \markboth { } { } } \cs_new_eq:NN \CTEXifname \use_ii:nn @@ -195,7 +196,7 @@ { \addcontentsline { toc } {#1} { \use:c { CTEX@#1@tocline } {#1} {#2} } } \renewcommand\part{% \CTEX@part@break - \thispagestyle{\CTEX@part@pagestyle}% + \CTEX@setthispagestyle{part}% \if@twocolumn \onecolumn \@tempswatrue @@ -260,7 +261,7 @@ \fi} \renewcommand\chapter{% \CTEX@chapter@break - \thispagestyle{\CTEX@chapter@pagestyle}% + \CTEX@setthispagestyle{chapter}% \global\@topnum\z@ \ifodd \CTEX@chapter@afterindent \@afterindenttrue @@ -554,20 +555,22 @@ \cs_new_protected:Npn \CTEX@hyperheadinghook { \group_begin: - \ifHy@implicit - \cs_set_eq:NN \H@old@chapter \Hy@org@chapter - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { - \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } - { - \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } - \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor - } - } - \else: - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } - \fi: + \legacy_if:nTF { Hy@implicit } + { + \cs_set_eq:NN \H@old@chapter \Hy@org@chapter + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { + \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } + { + \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } + \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor + } + } + } + { + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } + } \group_end: } \ctex_at_end_package:nn { hyperref } @@ -693,7 +696,7 @@ \CTEX@updatettlifname } \cs_new_protected:Npn \CTEX@updatettlifname - { \ifttl@label \CTEX@ifnametrue \else: \CTEX@ifnamefalse \fi: } + { \legacy_if:nTF { ttl@label } { \CTEX@ifnametrue } { \CTEX@ifnamefalse } } } \group_begin: \char_set_catcode_other:N \# @@ -788,11 +791,12 @@ \fi \fi } { \CTEXifname { \CTEXthechapter \quad } { } } -\if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } - { \CTEXifname { \CTEXthesection \quad } { } } -\fi: +\legacy_if:nT { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } \ctex_at_end_package:nn { fancyhdr } { \ctex_patch_cmd:Nnn \f@nch@initialise @@ -817,11 +821,12 @@ \fi \fi } { \CTEXifname { \CTEXthechapter \quad } { } } - \if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } - { \CTEXifname { \CTEXthesection \quad } { } } - \fi: + \legacy_if:nT { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } } { } } diff --git a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-report.def b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-report.def index bd41442bf50..795e7b96fec 100644 --- a/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-report.def +++ b/Master/texmf-dist/tex/latex/ctex/heading/ctex-heading-report.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Heading modification for report (CTEX)} \ProvidesExplFile{ctex-report.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \seq_const_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } \seq_new:N \c__ctex_headings_seq @@ -66,11 +66,11 @@ } \cs_new_protected:Npn \__ctex_def_heading_keys:n #1 { - \tl_put_right:Nx \l__ctex_tmp_tl + \exp_args:NNe \tl_put_right:Nn \l__ctex_tmp_tl { - #1 .meta:nn = { ctex / #1 } { ####1 } , + #1 .meta:nn = { ctex / #1 } { ##1 } , #1 / name .code:n = - { \ctex_assign_heading_name:nn {#1} { ####1 } } , + { \ctex_assign_heading_name:nn {#1} { ##1 } } , #1 / number .tl_set:N = \exp_not:c { CTEX@the#1 } , #1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } , #1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} , @@ -88,8 +88,7 @@ #1 / hang .bool_set:N = \exp_not:c { CTEX@#1@hang } , #1 / hang .initial:n = true , #1 / runin .bool_set:N = \exp_not:c { CTEX@#1@runin } , - #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline} - \exp_not:n { ##1##2 } , + #1 / tocline .cs_set:Np = \exp_not:c { CTEX@#1@tocline } ##1##2 , \__ctex_plus_key_aux:nn {#1} { break } , \__ctex_plus_key_aux:nn {#1} { format } , \__ctex_plus_key_aux:nn {#1} { nameformat } , @@ -103,9 +102,9 @@ { #1 / #2 .tl_set:N = \exp_not:c { CTEX@#1@#2 } , #1 / #2 + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } , + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } , #1 / #2 ~ + .code:n = - { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ####1 } } + { \tl_put_right:Nn \exp_not:c { CTEX@#1@#2 } { ##1 } } } \NewDocumentCommand \ctex_assign_heading_name:nn { m > { \SplitArgument { 1 } { , } } +m } @@ -169,6 +168,8 @@ \cs_new_protected:Npn \CTEX@setheadingskip { \skip_set:Nn \l__ctex_heading_skip } \cs_new_eq:NN \CTEX@headingskip \l__ctex_heading_skip +\cs_new_protected:Npn \CTEX@setthispagestyle #1 + { \exp_args:Ne \thispagestyle { \use:c { CTEX@#1@pagestyle } } } \ProvideDocumentCommand \partmark { m } { \markboth { } { } } \cs_new_eq:NN \CTEXifname \use_ii:nn @@ -195,7 +196,7 @@ { \addcontentsline { toc } {#1} { \use:c { CTEX@#1@tocline } {#1} {#2} } } \renewcommand\part{% \CTEX@part@break - \thispagestyle{\CTEX@part@pagestyle}% + \CTEX@setthispagestyle{part}% \if@twocolumn \onecolumn \@tempswatrue @@ -260,7 +261,7 @@ \fi} \renewcommand\chapter{% \CTEX@chapter@break - \thispagestyle{\CTEX@chapter@pagestyle}% + \CTEX@setthispagestyle{chapter}% \global\@topnum\z@ \ifodd \CTEX@chapter@afterindent \@afterindenttrue @@ -549,20 +550,22 @@ \cs_new_protected:Npn \CTEX@hyperheadinghook { \group_begin: - \ifHy@implicit - \cs_set_eq:NN \H@old@chapter \Hy@org@chapter - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { - \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } - { - \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } - \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor - } - } - \else: - \seq_map_inline:Nn \c__ctex_headings_cs_seq - { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } - \fi: + \legacy_if:nTF { Hy@implicit } + { + \cs_set_eq:NN \H@old@chapter \Hy@org@chapter + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { + \cs_if_eq:ccT { H@old@ ##1 } { CTEX@ ##1 } + { + \cs_gset_eq:cc { @ ##1 } { CTEX@ ##1 } + \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor + } + } + } + { + \seq_map_inline:Nn \c__ctex_headings_cs_seq + { \cs_gset_eq:cN { CTEX@makeanchor@ ##1 } \CTEX@makeanchor } + } \group_end: } \ctex_at_end_package:nn { hyperref } @@ -688,7 +691,7 @@ \CTEX@updatettlifname } \cs_new_protected:Npn \CTEX@updatettlifname - { \ifttl@label \CTEX@ifnametrue \else: \CTEX@ifnamefalse \fi: } + { \legacy_if:nTF { ttl@label } { \CTEX@ifnametrue } { \CTEX@ifnamefalse } } } \group_begin: \char_set_catcode_other:N \# @@ -783,11 +786,12 @@ \fi } { \CTEXifname { \CTEXthechapter \quad } { } } -\if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } - { \CTEXifname { \CTEXthesection \quad } { } } -\fi: +\legacy_if:nT { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } \ctex_at_end_package:nn { fancyhdr } { \ctex_patch_cmd:Nnn \f@nch@initialise @@ -812,11 +816,12 @@ \fi } { \CTEXifname { \CTEXthechapter \quad } { } } - \if@twoside - \ctex_patch_cmd:Nnn \ps@headings - { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } - { \CTEXifname { \CTEXthesection \quad } { } } - \fi: + \legacy_if:nT { @twoside } + { + \ctex_patch_cmd:Nnn \ps@headings + { \ifnum \c@secnumdepth > \z@ \thesection . ~ \ \fi } + { \CTEXifname { \CTEXthesection \quad } { } } + } } { } } diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def index da6b67bbc68..d6a695fd413 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese scheme for article (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-article.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_set:nn { part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def index 0887fe02d04..77f87662a60 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese scheme for beamer (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-beamer.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_set:nn { part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def index 11959999882..9fcb76ef5bd 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese scheme for book (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-book.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_set:nn { part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def index 6be01a803b8..d6c00683bdc 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese scheme for report (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-report.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_set:nn { part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def index adca2b3d36e..14549f6eef4 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def @@ -24,15 +24,14 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese scheme for generic (CTEX)} \ProvidesExplFile{ctex-scheme-chinese.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_set:n { today = small } \ctex_if_autoindent_touched:F { \ctex_set:n { autoindent = true } } -\tl_set:Nn \l__ctex_tmp_tl { beamer } -\tl_if_eq:NNTF \c__ctex_std_class_tl \l__ctex_tmp_tl +\tl_if_eq:NnTF \c__ctex_std_class_tl { beamer } { \str_if_eq:onTF { \g__ctex_encoding_tl } { GBK } { diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def index 5b43f3aa016..6ff3887d832 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Plain scheme for article (CTEX)} \ProvidesExplFile{ctex-scheme-plain-article.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_set:nn { part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def index 34fa8678fde..9f626b2a6e2 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Plain scheme for beamer (CTEX)} \ProvidesExplFile{ctex-scheme-plain-beamer.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_set:nn { part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def index d6e513afda1..0940e51c2d7 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Plain scheme for book (CTEX)} \ProvidesExplFile{ctex-scheme-plain-book.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_set:nn { part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def index 75304d9de8b..7d4fd8468c7 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Plain scheme for report (CTEX)} \ProvidesExplFile{ctex-scheme-plain-report.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} \ctex_set:nn { part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def index c1231b1cec3..4349bf95915 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx c6b2e9c 2022-06-04 19:41:06 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Plain scheme for generic (CTEX)} \ProvidesExplFile{ctex-scheme-plain.def} - {\ExplFileDate}{2.5.9}{\ExplFileDescription} + {\ExplFileDate}{2.5.10}{\ExplFileDescription} %% %% %% End of file `ctex-scheme-plain.def'. |