From fc7eee8c175b307abf9396aed71c1d49bd1c0fe4 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 7 Apr 2019 21:22:23 +0000 Subject: ctex (7apr19) git-svn-id: svn://tug.org/texlive/trunk@50843 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/ctex/ctex.dtx | 740 +++++++++++++++------------ Master/texmf-dist/source/latex/ctex/ctex.ins | 34 +- 2 files changed, 436 insertions(+), 338 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/ctex/ctex.dtx b/Master/texmf-dist/source/latex/ctex/ctex.dtx index d60ea249e4f..fd0a8bea23c 100644 --- a/Master/texmf-dist/source/latex/ctex/ctex.dtx +++ b/Master/texmf-dist/source/latex/ctex/ctex.dtx @@ -2,7 +2,7 @@ % !TeX program = XeLaTeX % !TeX encoding = UTF-8 % -% Copyright (C) 2003--2018 +% Copyright (C) 2003--2019 % CTEX.ORG and any individual authors listed elsewhere in this file. % -------------------------------------------------------------------------- % @@ -54,7 +54,7 @@ Issues and pull requests are welcome. Copyright and Licence --------------------- - Copyright (C) 2003--2018 + Copyright (C) 2003--2019 CTEX.ORG and any individual authors listed elsewhere in this file. ---------------------------------------------------------------------- @@ -117,6 +117,12 @@ Copyright and Licence c70rm.fd, c70sf.fd, c70tt.fd, + jy2zhrm.fd, + jy2zhsf.fd, + jy2zhtt.fd, + jt2zhrm.fd, + jt2zhsf.fd, + jt2zhtt.fd, ctex-fontset-windows.def, ctex-fontset-windowsnew.def, ctex-fontset-windowsold.def, @@ -154,7 +160,7 @@ Copyright and Licence \preamble - Copyright (C) 2003--2018 + Copyright (C) 2003--2019 CTEX.ORG and any individual authors listed in the documentation. ------------------------------------------------------------------------------ @@ -222,6 +228,12 @@ Copyright and Licence c70rm.fd, c70sf.fd, c70tt.fd, + jy2zhrm.fd, + jy2zhsf.fd, + jy2zhtt.fd, + jt2zhrm.fd, + jt2zhsf.fd, + jt2zhtt.fd, ctex-fontset-windows.def, ctex-fontset-windowsnew.def, ctex-fontset-windowsold.def, @@ -287,12 +299,18 @@ Copyright and Licence \file{ctex-engine-luatex.def} {\from{\jobname.dtx}{luatex}} \file{ctex-engine-aptex.def} {\from{\jobname.dtx}{aptex}} \file{ctex-engine-uptex.def} {\from{\jobname.dtx}{uptex}} - \file{c19rm.fd} {\from{\jobname.dtx}{rm,c19}} - \file{c19sf.fd} {\from{\jobname.dtx}{sf,c19}} - \file{c19tt.fd} {\from{\jobname.dtx}{tt,c19}} - \file{c70rm.fd} {\from{\jobname.dtx}{rm,c70}} - \file{c70sf.fd} {\from{\jobname.dtx}{sf,c70}} - \file{c70tt.fd} {\from{\jobname.dtx}{tt,c70}} + \file{c19rm.fd} {\from{\jobname.dtx}{fd,rm,c19}} + \file{c19sf.fd} {\from{\jobname.dtx}{fd,sf,c19}} + \file{c19tt.fd} {\from{\jobname.dtx}{fd,tt,c19}} + \file{c70rm.fd} {\from{\jobname.dtx}{fd,rm,c70}} + \file{c70sf.fd} {\from{\jobname.dtx}{fd,sf,c70}} + \file{c70tt.fd} {\from{\jobname.dtx}{fd,tt,c70}} + \file{jy2zhrm.fd} {\from{\jobname.dtx}{fd,rm,jy2}} + \file{jy2zhsf.fd} {\from{\jobname.dtx}{fd,sf,jy2}} + \file{jy2zhtt.fd} {\from{\jobname.dtx}{fd,tt,jy2}} + \file{jt2zhrm.fd} {\from{\jobname.dtx}{fd,rm,jt2}} + \file{jt2zhsf.fd} {\from{\jobname.dtx}{fd,sf,jt2}} + \file{jt2zhtt.fd} {\from{\jobname.dtx}{fd,tt,jt2}} \file{ctex-fontset-windows.def} {\from{\jobname.dtx}{fontset,windows}} \file{ctex-fontset-windowsnew.def} {\from{\jobname.dtx}{fontset,windowsnew}} \file{ctex-fontset-windowsold.def} {\from{\jobname.dtx}{fontset,windowsold}} @@ -383,6 +401,12 @@ Copyright and Licence \Msg{* c70rm.fd *} \Msg{* c70sf.fd *} \Msg{* c70tt.fd *} +\Msg{* jy2zhrm.fd *} +\Msg{* jy2zhsf.fd *} +\Msg{* jy2zhtt.fd *} +\Msg{* jt2zhrm.fd *} +\Msg{* jt2zhsf.fd *} +\Msg{* jt2zhtt.fd *} \Msg{* ctex-fontset-windows.def *} \Msg{* ctex-fontset-windowsnew.def *} \Msg{* ctex-fontset-windowsold.def *} @@ -418,10 +442,10 @@ Copyright and Licence \fi % %<*!(driver|readme|install|zhmap|spa|docstrip)> -%<*!(c19|c70|ctexspa|dict)> +%<*!(fd|ctexspa|dict)> %\NeedsTeXFormat{LaTeX2e} %\RequirePackage{expl3} -%<+!driver>\GetIdInfo$Id: ctex.dtx 096f319 2018-05-02 19:51:41 +0800 Liam Huang $ +%<+!driver>\GetIdInfo$Id: ctex.dtx cb8bf3c 2019-04-07 23:32:09 +0800 Qing Lee $ % {ctex documentation (CTEX)} %\ProvidesExplClass{ctxdoc} % {Chinese adapter in LaTeX (CTEX)} @@ -514,20 +538,26 @@ Copyright and Licence %\ProvidesExplFile{ctex-fontset-founder.def} % {Ubuntu fonts definition (CTEX)} %\ProvidesExplFile{ctex-fontset-ubuntu.def} -% {\ExplFileDate}{2.4.14}{\ExplFileDescription} -% +% {\ExplFileDate}{2.4.15}{\ExplFileDescription} +% %\ProvidesFile{c19rm.fd}% %\ProvidesFile{c19sf.fd}% %\ProvidesFile{c19tt.fd}% %\ProvidesFile{c70rm.fd}% %\ProvidesFile{c70sf.fd}% %\ProvidesFile{c70tt.fd}% +%\ProvidesFile{jy2zhrm.fd}% +%\ProvidesFile{jy2zhsf.fd}% +%\ProvidesFile{jy2zhtt.fd}% +%\ProvidesFile{jt2zhrm.fd}% +%\ProvidesFile{jt2zhsf.fd}% +%\ProvidesFile{jt2zhtt.fd}% %\ProvidesFile{ctexspa.def}% %\ProvidesDictionary{translator-theorem-dictionary}{ChineseGBK}% %\ProvidesDictionary{translator-theorem-dictionary}{ChineseUTF8}% -% [2018/05/01 v2.4.14 Chinese font definition (CTEX)] -% [2018/05/01 v2.4.14 Space info for CJKpunct (CTEX)] -% [2018/05/01 v2.4.14 Chinese translation for theorem name (CTEX)] +% [2019/04/07 v2.4.15 Chinese font definition (CTEX)] +% [2019/04/07 v2.4.15 Space info for CJKpunct (CTEX)] +% [2019/04/07 v2.4.15 Chinese translation for theorem name (CTEX)] % %<*driver> \documentclass{ctxdoc} @@ -548,9 +578,10 @@ Copyright and Licence % \changes{v2.2}{2015/06/24}{不再依赖 \pkg{etoolbox} 宏包。} % \changes{v2.4}{2015/02/19}{加强 \pkg{beamer} 宏包支持。} % \changes{v2.4.12}{2018/01/13}{同步 \LaTeXiii{} 2017/12/16。} +% \changes{v2.4.15}{2019/03/23}{同步 \LaTeXiii{} 2019/03/05。} % % -% \CheckSum{5933} +% \CheckSum{5914} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -2023,6 +2054,8 @@ Copyright and Licence % \end{function} % % \begin{table}[htbp] +% \setlength\leftskip{0pt plus 1 fil minus \marginparwidth} +% \begin{minipage}[t]{.6\linewidth} % \small\centering % \caption{\opt{beforeskip} 选项的默认设置} % \begin{tabular}{ll} @@ -2042,25 +2075,7 @@ Copyright and Licence % subparagraph & |3.25ex plus 1ex minus .2ex| \\ % \bottomrule % \end{tabular} -% \end{table} -% -% \begin{function}[EXP,updated=2015-06-27]{.../afterskip} -% \begin{syntax} -% afterskip = \Arg{弹性间距} -% \end{syntax} -% \opt{afterskip} 选项控制章节标题与后面下方之间的距离。 -% -% 对于 \tn{section} 级以下标题,\opt{runin} 选项会影响 \opt{afterskip} 选项的意义: -% 若 \opt{runin} 为 \opt{true},标题与随后正文排在同一段,\meta{弹性间距} 给出水平间距。 -% 否则,正文另起一段,\meta{弹性间距} 给出的是垂直间距。 -% -% \opt{afterskip} 选项的默认值,在 \opt{scheme} 选项的不同取值下相同。 -% -% \opt{sub3section} 或 \opt{sub4section} 宏包选项(见 -% \ref{subs:options-heading}~节)会影响 \opt{aftertitle} 选项的默认值。 -% \end{function} -% -% \begin{table}[htbp] +% \end{minipage}% % \begin{minipage}[t]{.5\linewidth} % \small\centering % \caption{\opt{afterskip} 选项的默认设置} @@ -2084,30 +2099,25 @@ Copyright and Licence % \qquad(sub4section) & |1ex plus .2ex| \\ % \bottomrule % \end{tabular} -% \end{minipage}% -% \begin{minipage}[t]{.5\linewidth} -% \small\centering -% \caption{\opt{indent} 选项的默认设置} -% \begin{tabular}{ll} -% \toprule -% 标题名 & 默认值 \\ -% \midrule -% part (article) & |0pt| \\ -% part (beamer) & |0pt| \\ -% part & 无效 \\ -% chapter & |0pt| \\ -% section & |0pt| \\ -% subsection & |0pt| \\ -% subsubsection & |0pt| \\ -% paragraph & |0pt| \\ -% subparagraph & |\parindent| \\ -% \qquad(sub3section) & |0pt| \\ -% \qquad(sub4section) & 同上 \\ -% \bottomrule -% \end{tabular} % \end{minipage} % \end{table} % +% \begin{function}[EXP,updated=2015-06-27]{.../afterskip} +% \begin{syntax} +% afterskip = \Arg{弹性间距} +% \end{syntax} +% \opt{afterskip} 选项控制章节标题与后面下方之间的距离。 +% +% 对于 \tn{section} 级以下标题,\opt{runin} 选项会影响 \opt{afterskip} 选项的意义: +% 若 \opt{runin} 为 \opt{true},标题与随后正文排在同一段,\meta{弹性间距} 给出水平间距。 +% 否则,正文另起一段,\meta{弹性间距} 给出的是垂直间距。 +% +% \opt{afterskip} 选项的默认值,在 \opt{scheme} 选项的不同取值下相同。 +% +% \opt{sub3section} 或 \opt{sub4section} 宏包选项(见 +% \ref{subs:options-heading}~节)会影响 \opt{aftertitle} 选项的默认值。 +% \end{function} +% % \begin{function}[EXP,added=2016-06-03]{.../fixskip} % \begin{syntax} % fixskip = \TFF @@ -2138,25 +2148,81 @@ Copyright and Licence % % \opt{indent} 选项的默认值,在 \opt{scheme} 选项的不同取值下相同。 % -% 例如,设置 \tn{section} 标题缩进 \SI{20}{pt}: +% 如果 \opt{indent} 的值是以 \texttt{em}、\texttt{ex} 或 \cs{ccwd} 为单位, +% 那么缩进间距的大小是相对于 \opt{format} 中指定的字号大小。 +% +% 例如,设置 \tn{part} 标题缩进三个字、\tn{section} 标题缩进 \SI{20}{pt}: % \end{function} % \begin{ctexexam} -% \ctexset{section={ +% \ctexset{ +% part={ +% format+=\raggedright, +% indent=3\ccwd, +% }, +% section={ % format=\Large\bfseries, % indent=20pt, % } % } +% \part{首行缩进的标题} +% \noindent 无缩进的正文。 % \section{首行缩进的标题} % \noindent 无缩进的正文。 % \end{ctexexam} % -% \begin{function}[EXP,added=2016-10-22]{section/hang, subsection/hang, -% subsubsection/hang, paragraph/hang, subparagraph/hang} +% \begin{table}[htbp] +% \begin{minipage}[t]{.5\linewidth} +% \small\centering +% \caption{\opt{indent} 选项的默认设置} +% \begin{tabular}{ll} +% \toprule +% 标题名 & 默认值 \\ +% \midrule +% part & |0pt| \\ +% chapter & |0pt| \\ +% section & |0pt| \\ +% subsection & |0pt| \\ +% subsubsection & |0pt| \\ +% paragraph & |0pt| \\ +% subparagraph & |\parindent| \\ +% \qquad(sub3section) & |0pt| \\ +% \qquad(sub4section) & 同上 \\ +% \bottomrule +% \end{tabular} +% \end{minipage}% +% \begin{minipage}[t]{.5\linewidth} +% \small\centering +% \caption{\opt{hang} 选项的默认设置} +% \begin{tabular}{ll} +% \toprule +% 标题名 & 默认值 \\ +% \midrule +% part & |false| \\ +% chapter & |false| \\ +% section & |true| \\ +% subsection & |true| \\ +% subsubsection & |true| \\ +% paragraph & 无意义 \\ +% \qquad(sub3section) & |true| \\ +% \qquad(sub4section) & |true| \\ +% subparagraph & 无意义 \\ +% \qquad(sub4section) & |true| \\ +% \bottomrule +% \end{tabular} +% \end{minipage}% +% \end{table} +% +% \begin{function}[EXP,updated=2019-03-31]{part/hang, chapter/hang, section/hang, +% subsection/hang, subsubsection/hang, paragraph/hang, subparagraph/hang} % \begin{syntax} -% hang = \TTF +% hang = \TF % \end{syntax} -% 默认情况下,\tn{section} 级以下标题具有悬挂缩进的效果(缩进的宽度为名字宽度和 \opt{indent} 选项 -% 设置的宽度之和)。设置 \opt{hang} 选项为 \opt{false} 可以取消这一效果。 +% \opt{hang} 选项用于设置是否对章节标题实施悬挂缩进(缩进的宽度为名字宽度和 \opt{indent} 选项 +% 设置的宽度之和)。 +% +% 本选项对 \cls{beamer}/\cls{ctexbeamer} 文档类无效。 +% 对于 \tn{section} 级以下标题,若设置了 \opt{runin} 选项为 \opt{true}, +% 即标题与随后正文排在同一段,\opt{hang} 选项没有意义。 % \end{function} % % \begin{function}[EXP,added=2014-03-21]{part/pagestyle, chapter/pagestyle} @@ -3043,7 +3109,7 @@ Copyright and Licence `l3kernel'~and~`l3packages'\\\\ using~your~TeX~package~manager~or~from~CTAN. } -\@ifpackagelater { expl3 } { 2017/12/16 } { } +\@ifpackagelater { expl3 } { 2019/03/05 } { } { \msg_error:nnn { ctex } { l3-too-old } { expl3 } } %<*class> \@ifpackagelater { l3keys2e } { 2015/12/20 } { } @@ -3144,12 +3210,13 @@ Copyright and Licence % \end{macrocode} % \end{macro} % -% \begin{variable}{\g_@@_section_depth_flag} +% \begin{variable}{\g_@@_section_depth_int} % 若大于 |3|,则 \tn{paragraph} 和 \tn{subparagraph} 标题单独占一行;若为 |3|,则 % \tn{paragraph} 单独占一行。 % \begin{macrocode} %<*!beamer> -\cs_new_eq:NN \g_@@_section_depth_flag \c_two +\int_new:N \g_@@_section_depth_int +\int_gset:Nn \g_@@_section_depth_int { 2 } % % \end{macrocode} % \end{variable} @@ -3212,7 +3279,7 @@ Copyright and Licence \cs_new:Npn \ctex_default_pt:n #1 { \exp_after:wN \@@_default_pt:w - \dim_use:N \etex_dimexpr:D #1 pt \scan_stop: \q_stop + \dim_use:N \tex_dimexpr:D #1 pt \scan_stop: \q_stop } \use:x { @@ -3299,13 +3366,13 @@ Copyright and Licence % % \end{macrocode} % -% \begin{variable}{\g_@@_font_size_flag} +% \begin{variable}{\g_@@_font_size_int} % |0| 表示修改默认字体大小为五号,|1| 为小四号,大于 1 则不作修改。初始值 |-1| % 表示 \opt{zihao} 选项未初始化,会在将来根据文档类决定初值。 % \begin{macrocode} %<*class|ctex|ctexsize> -\int_new:N \g_@@_font_size_flag -\int_set:Nn \g_@@_font_size_flag { -1 } +\int_new:N \g_@@_font_size_int +\int_set:Nn \g_@@_font_size_int { -1 } % % \end{macrocode} % \end{variable} @@ -3331,9 +3398,9 @@ Copyright and Licence %<*class|ctex|ctexsize> zihao .choice: , zihao .value_required:n = true , - zihao / 5 .code:n = { \cs_gset_eq:NN \g_@@_font_size_flag \c_zero } , - zihao / -4 .code:n = { \cs_gset_eq:NN \g_@@_font_size_flag \c_one } , - zihao / false .code:n = { \cs_gset_eq:NN \g_@@_font_size_flag \c_two } , + zihao / 5 .code:n = { \int_gset:Nn \g_@@_font_size_int { 0 } } , + zihao / -4 .code:n = { \int_gset:Nn \g_@@_font_size_int { 1 } } , + zihao / false .code:n = { \int_gset:Nn \g_@@_font_size_int { 2 } } , % } % %<*class|ctex> @@ -3556,9 +3623,9 @@ Copyright and Licence % \begin{macrocode} %<*!beamer> sub3section .code:n = - { \cs_gset_eq:NN \g_@@_section_depth_flag \c_three } , + { \int_gset:Nn \g_@@_section_depth_int { 3 } } , sub4section .code:n = - { \cs_gset_eq:NN \g_@@_section_depth_flag \c_four } , + { \int_gset:Nn \g_@@_section_depth_int { 4 } } , sub3section .value_forbidden:n = true , sub4section .value_forbidden:n = true , % @@ -3660,11 +3727,11 @@ Copyright and Licence { #1 .code:n = %<*!class> - { \cs_gset_eq:NN \g_@@_font_size_flag \c_two } , + { \int_gset:Nn \g_@@_font_size_int { 2 } } , % %<*class> { - \cs_gset_eq:NN \g_@@_font_size_flag \c_two + \int_gset:Nn \g_@@_font_size_int { 2 } \clist_gput_right:Nn \g_@@_std_options_clist {#1} } , % @@ -3704,7 +3771,7 @@ Copyright and Licence % % 五号字使用标准文档类的 |10pt| 字体大小设置,小四号字则使用 |12pt|。 % \begin{macrocode} -\if_case:w \g_@@_font_size_flag +\if_case:w \g_@@_font_size_int \clist_gput_right:Nn \g_@@_std_options_clist { 10pt } \or: \clist_gput_right:Nn \g_@@_std_options_clist { 12pt } @@ -3806,11 +3873,11 @@ Copyright and Licence \cs_new_protected_nopar:Npn \@@_save_cmap:Nn #1#2 { \tl_set:Nx \l_@@_tmp_tl { \str_lower_case:n {#2} \CJK@plane } - \tex_immediate:D \pdftex_pdfobj:D stream ~ file { \l_@@_tmp_tl .cmap } + \tex_immediate:D \tex_pdfobj:D stream ~ file { \l_@@_tmp_tl .cmap } \cs_new_protected_nopar:Npx #1 { - \exp_not:N \pdftex_pdffontattr:D \exp_not:N \tex_font:D - { /ToUnicode ~ \int_use:N \pdftex_pdflastobj:D \c_space_tl 0 ~ R } + \exp_not:N \tex_pdffontattr:D \exp_not:N \tex_font:D + { /ToUnicode ~ \int_use:N \tex_pdflastobj:D \c_space_tl 0 ~ R } } } % \end{macrocode} @@ -3952,16 +4019,16 @@ Copyright and Licence \tl_set:Nx \l_@@_tmp_tl {#2} \int_set:Nn \l_@@_tmp_int { \exp_args:No \int_from_hex:n { \l_@@_tmp_tl } } - \int_compare:nNnTF \l_@@_tmp_int < \c_two_hundred_fifty_six + \int_compare:nNnTF \l_@@_tmp_int < { 256 } { \tl_gset:Nx #1 { \int_to_Hex:n { \l_@@_tmp_int } } } { - \int_sub:Nn \l_@@_tmp_int { \c_two_hundred_fifty_six } + \int_sub:Nn \l_@@_tmp_int { 256 } \tl_gset:Nx #1 { \int_to_Hex:n - { \int_div_truncate:nn { \l_@@_tmp_int } { \c_four } + "D800 } + { \int_div_truncate:nn { \l_@@_tmp_int } { 4 } + "D800 } \int_to_Hex:n - { \int_mod:nn { \l_@@_tmp_int } { \c_four } + "DC } + { \int_mod:nn { \l_@@_tmp_int } { 4 } + "DC } } } } @@ -3974,7 +4041,7 @@ Copyright and Licence % \begin{macrocode} \AtBeginDocument { - \str_if_eq_x:nnF { \l_@@_punct_tl } { quanjiao } + \str_if_eq:eeF { \l_@@_punct_tl } { quanjiao } { \punctstyle { \l_@@_punct_tl } } } % \end{macrocode} @@ -4306,7 +4373,7 @@ Copyright and Licence \AtBeginUTFCommand { \group_begin: - \lua_now_x:n { tex.globaldefs = 0 } + \lua_now:e { tex.globaldefs = 0 } \ltj@allalchar } \AtEndUTFCommand { \group_end: } @@ -4320,7 +4387,7 @@ Copyright and Licence % \begin{macrocode} \cs_set_protected:Npn \fontspec_visible_space: { - \etex_iffontchar:D \tex_font:D "2423 \exp_stop_f: + \tex_iffontchar:D \tex_font:D "2423 \exp_stop_f: \ltjalchar "2423 \exp_stop_f: \else: \fontspec_visible_space_fallback: @@ -4450,7 +4517,7 @@ Copyright and Licence % 赋值总是全局的,不会受到分组的影响。 % \begin{macrocode} \font@name - \lua_now_x:n { font.current(tex.getattribute('ltj@curjfnt')) } + \lua_now:e { font.current(tex.getattribute('ltj@curjfnt')) } \use:c { \f@encoding + \f@family } \use:c { \curr@fontshape } } @@ -4502,7 +4569,7 @@ Copyright and Licence % \begin{macrocode} \prg_new_conditional:Npnn \ctex_ltj_if_alternate_shape_exist:n #1 { T , F , TF } { - \lua_now_x:n { luatexja.jfont.does_alt_set ('\lua_escape_x:n {#1}') } + \lua_now:e { luatexja.jfont.does_alt_set ('\lua_escape:e {#1}') } \prg_return_true: \else: \prg_return_false: \fi: } % \end{macrocode} @@ -4521,7 +4588,7 @@ Copyright and Licence % \texttt{font.id} 唯一。 % \begin{macrocode} \cs_new_nopar:Npn \@@_patch_external_font:w #1 ~ at - { #1 \lua_now_x:n { luatexja.jfont.print_aftl_address() } ~ at } + { #1 \lua_now:e { luatexja.jfont.print_aftl_address() } ~ at } % \end{macrocode} % \end{macro} % @@ -4532,12 +4599,12 @@ Copyright and Licence { \ctex_ltj_if_alternate_shape_exist:nT { \l_@@_current_shape_tl } { - \lua_now_x:n + \lua_now:e { luatexja.jfont.output_alt_font_cmd - ('y', '\lua_escape_x:n { \l_@@_current_shape_tl }') + ('y', '\lua_escape:e { \l_@@_current_shape_tl }') } - \lua_now_x:n { luatexja.jfont.pickup_alt_font_a ('\f@size') } + \lua_now:e { luatexja.jfont.pickup_alt_font_a ('\f@size') } } } \tl_new:N \l_@@_current_shape_tl @@ -4575,10 +4642,10 @@ Copyright and Licence \cs_new_protected_nopar:Npn \ltj@pickup@altfont@copy #1#2 { \ltj@@getjfontnumber #1 - \lua_now_x:n + \lua_now:e { luatexja.jfont.pickup_alt_font_b - ( \int_use:N \ltj@tempcntc, '\lua_escape_x:n {#2}' ) + ( \int_use:N \ltj@tempcntc, '\lua_escape:e {#2}' ) } } % \end{macrocode} @@ -4602,8 +4669,8 @@ Copyright and Licence % \begin{macrocode} \cs_new:Npn \ctex_ltj_if_jfont:nTF #1 { - \lua_now_x:n - { luatexja.jfont.is_kenc( string.match('\lua_escape_x:n {#1}', '[^/]+') ) } + \lua_now:e + { luatexja.jfont.is_kenc( string.match('\lua_escape:e {#1}', '[^/]+') ) } \ifin@ \exp_after:wN \use_i:nn \else: \exp_after:wN \use_ii:nn \fi: } % \end{macrocode} @@ -4749,7 +4816,7 @@ Copyright and Licence \exp_not:N \DeclareFontSubstitution { \CJK@encoding } { song } { \mddefault } { \updefault } } -\lua_now_x:n { luatexja.jfont.add_kyenc_list('\CJK@encoding') } +\lua_now:e { luatexja.jfont.add_kyenc_list('\CJK@encoding') } \cs_new_protected_nopar:Npn \@@_change_encoding: { \tl_set_eq:NN \g_fontspec_encoding_tl \CJK@encoding } \DeclareFontFamily { \CJK@encoding } { song } { } @@ -4948,7 +5015,7 @@ Copyright and Licence } \cs_new_nopar:Npn \@@_msg_def_family_map:n #1 { - \str_case_x:nnF {#1} + \str_case_e:nnF {#1} { \CJKrmdefault { \token_to_str:N \setCJKmainfont } \CJKsfdefault { \token_to_str:N \setCJKsansfont } @@ -4959,7 +5026,7 @@ Copyright and Licence } \cs_new_nopar:Npn \@@_msg_family_map:n #1 { - \str_case_x:nnF {#1} + \str_case_e:nnF {#1} { \CJKrmdefault { \token_to_str:N \CJKrmdefault } \CJKsfdefault { \token_to_str:N \CJKsfdefault } @@ -5166,7 +5233,7 @@ Copyright and Licence } \cs_new_protected_nopar:Npn \@@_update_family_aux: { - \str_case_x:nn { \f@family } + \str_case_e:nn { \f@family } { { \rmdefault } { \CJKfamily { \CJKrmdefault } } { \sfdefault } { \CJKfamily { \CJKsfdefault } } @@ -5192,7 +5259,7 @@ Copyright and Licence { \ctex_ltj_family_if_exist:xNF { \CJKfamilydefault } \l_@@_tmp_tl { - \str_if_eq_x:nnTF { \CJKfamilydefault } { \CJKrmdefault } + \str_if_eq:eeTF { \CJKfamilydefault } { \CJKrmdefault } { \use:n } { \ctex_ltj_family_if_exist:xNTF { \CJKrmdefault } \l_@@_tmp_tl @@ -5457,7 +5524,7 @@ Copyright and Licence \@@_save_alternate_shape:cnn { \@@_alternate_cs:n { clear / \l_@@_base_CJKfamily_tl } } { luatexja.jfont.clear_alt_font_latex } - { '\lua_escape_x:n { \CJK@encoding/#2/#3/#4 }' } + { '\lua_escape:e { \CJK@encoding/#2/#3/#4 }' } } % \end{macrocode} % \end{macro} @@ -5469,7 +5536,7 @@ Copyright and Licence % (例如 |{{-1}}|),或者使用类似 |{-1}-{-1}| 的形式才不会解释错误。 % \begin{macrocode} \NewDocumentCommand \ctex_ltj_set_alternate_shape:nnn - { m m > { \SplitArgument { \c_one } { -> } } m } + { m m > { \SplitArgument { 1 } { -> } } m } { \ctex_ltj_set_alternate_shape:nnnn {#1} {#2} #3 } \cs_new_protected_nopar:Npn \ctex_ltj_set_alternate_shape:nnnn #1#2#3#4 { @@ -5481,13 +5548,13 @@ Copyright and Licence \int_eval:n { \tl_if_blank:nTF {#3} { "80 } {#3} } , \int_eval:n { \tl_if_blank:nTF {#4} { "10FFFF } {#4} } , } - '\lua_escape_x:n { \CJK@encoding/#2 }' , - '\lua_escape_x:n { \CJK@encoding/#1 }' + '\lua_escape:e { \CJK@encoding/#2 }' , + '\lua_escape:e { \CJK@encoding/#1 }' } } \cs_new_protected_nopar:Npn \ctex_ltj_set_alternate_shape:n #1 { - \lua_now_x:n { luatexja.jfont.set_alt_font_latex ( #1 ) } + \lua_now:e { luatexja.jfont.set_alt_font_latex ( #1 ) } \@@_save_alternate_shape:cnn { \@@_alternate_cs:n { reset / \l_@@_base_CJKfamily_tl } } { luatexja.jfont.set_alt_font_latex } {#1} @@ -5505,8 +5572,8 @@ Copyright and Licence \ctex_ltj_set_alternate_shape:n { ##1 , - '\lua_escape_x:n { \CJK@encoding/#2 }' , - '\lua_escape_x:n { \CJK@encoding/#1 }' + '\lua_escape:e { \CJK@encoding/#2 }' , + '\lua_escape:e { \CJK@encoding/#1 }' } } } @@ -5523,9 +5590,9 @@ Copyright and Licence \group_begin: \cs_if_exist:NF #1 { \cs_set_eq:NN #1 \prg_do_nothing: } \cs_set_eq:NN \l_@@_base_family_tl \scan_stop: - \cs_set_eq:NN \lua_escape_x:n \scan_stop: + \cs_set_eq:NN \lua_escape:e \scan_stop: \cs_gset_protected_nopar:Npx #1 - { \exp_not:o {#1} \exp_not:N \lua_now_x:n { #2 ( #3 ) } } + { \exp_not:o {#1} \exp_not:N \lua_now:e { #2 ( #3 ) } } \group_end: } \cs_generate_variant:Nn \@@_save_alternate_shape:Nnn { c } @@ -5614,7 +5681,7 @@ Copyright and Licence % 预先解释字符区间的意义。 % \begin{macrocode} \NewDocumentCommand \ctex_ltj_save_char_range:n - { > { \SplitArgument { \c_one } { -> } } m } + { > { \SplitArgument { 1 } { -> } } m } { \ctex_ltj_save_char_range:nn #1 } \cs_new_protected_nopar:Npn \ctex_ltj_save_char_range:nn #1#2 { @@ -5750,35 +5817,54 @@ Copyright and Licence % \end{macrocode} % % \changes{v2.4}{2016/02/28}{初步支持 \upLaTeX。} +% \changes{v2.4.15}{2019/04/05}{显式补丁 \upLaTeX 的 \tn{rmfamily} 等字体命令。} % % 按 \pkg{CJK} 的命名习惯模拟部分命令,并设置默认字体。 % \begin{macrocode} -\tl_set:Nn \CJKrmdefault { rm } -\tl_set:Nn \CJKsfdefault { sf } -\tl_set:Nn \CJKttdefault { tt } +\tl_set:Nn \CJKrmdefault { zhrm } +\tl_set:Nn \CJKsfdefault { zhsf } +\tl_set:Nn \CJKttdefault { zhtt } \tl_set:Nn \CJKfamilydefault { \CJKrmdefault } -\ctex_preto_cmd:NnnTF \rmfamily { \ExplSyntaxOff } - { \kanjifamily { \CJKrmdefault } } - { } - { \ctex_patch_failure:N \rmfamily } -\ctex_preto_cmd:NnnTF \sffamily { \ExplSyntaxOff } - { \kanjifamily { \CJKsfdefault } } - { } - { \ctex_patch_failure:N \sffamily } -\ctex_preto_cmd:NnnTF \ttfamily { \ExplSyntaxOff } - { \kanjifamily { \CJKttdefault } } - { } - { \ctex_patch_failure:N \ttfamily } -\ctex_preto_cmd:NnnTF \normalfont { \ExplSyntaxOff } - { \kanjifamily { \CJKfamilydefault } } - { \cs_set_eq:NN \reset@font \normalfont } - { \ctex_patch_failure:N \normalfont } +\tl_set:Nn \kanjifamilydefault { \CJKfamilydefault } +\RenewDocumentCommand \rmfamily { } + { + \not@math@alphabet \rmfamily \mathrm + \romanfamily \rmdefault + \kanjifamily \CJKrmdefault + \selectfont + } +\RenewDocumentCommand \sffamily { } + { + \not@math@alphabet \sffamily \mathsf + \romanfamily \sfdefault + \kanjifamily \CJKsfdefault + \selectfont + } +\RenewDocumentCommand \ttfamily { } + { + \not@math@alphabet \ttfamily \mathtt + \romanfamily \ttdefault + \kanjifamily \CJKttdefault + \selectfont + } \NewDocumentCommand \CJKfamily { m } { - \kanjifamily { #1 } + \kanjifamily {#1} \selectfont } -\tl_set:Nn \kanjifamilydefault { \CJKfamilydefault } +% \end{macrocode} +% +% \changes{v2.4.15}{2019/04/05}{将 \upLaTeX 的默认字体由 \texttt{mc} 改为 +% \texttt{zhrm},并启用 \tn{jfam}。} +% +% 将 \upLaTeX 的默认字体由 |mc| 改为 |zhrm|,并启用 \tn{jfam}。 +% \begin{macrocode} +\DeclareErrorKanjiFont{JY2}{zhrm}{m}{n}{10} +\DeclareKanjiSubstitution{JY2}{zhrm}{m}{n} +\DeclareKanjiSubstitution{JT2}{zhrm}{m}{n} +\DeclareSymbolFont{mincho}{JY2}{zhrm}{m}{n} +\SetSymbolFont{mincho}{bold}{JY2}{zhrm}{bx}{n} +\jfam \symmincho % \end{macrocode} % % 在导言区末尾更新 \tn{CJKfamilydefault}。 @@ -5950,7 +6036,7 @@ Copyright and Licence { \tl_gset:Nx \g_@@_fontset_tl { - \lua_now_x:n + \lua_now:e { if ~ os.name == 'windows' then ~ tex.sprint ( 'windows' ) @@ -6236,7 +6322,7 @@ Copyright and Licence { \skip_set:Nn \ccwd { \ltjgetparameter { kanjiskip } + \zw } } % %<*uptex|aptex> - { \skip_set:Nn \ccwd { 1zw + \ptex_kanjiskip:D } } + { \skip_set:Nn \ccwd { 1zw + \tex_kanjiskip:D } } % \dim_new:N \ccwd % \end{macrocode} @@ -6256,7 +6342,7 @@ Copyright and Licence { \ctex_ltj_set_kanjiskip:N \l_@@_ccglue_skip } % %<*uptex|aptex> - { \skip_set_eq:NN \ptex_kanjiskip:D \l_@@_ccglue_skip } + { \skip_set_eq:NN \tex_kanjiskip:D \l_@@_ccglue_skip } % \skip_new:N \l_@@_ccglue_skip % \end{macrocode} @@ -6276,7 +6362,7 @@ Copyright and Licence { \prg_return_false: } { \prg_return_true: } % %<*uptex|aptex> - \skip_if_eq:nnTF { \l_@@_ccglue_skip } { \ptex_kanjiskip:D } + \skip_if_eq:nnTF { \l_@@_ccglue_skip } { \tex_kanjiskip:D } { \prg_return_false: } { \prg_return_true: } % } @@ -6388,11 +6474,11 @@ Copyright and Licence { \skip_if_eq:nnT % { \ltjgetparameter { xkanjiskip } } { \l_@@_xkanjiskip_skip } -% { \ptex_xkanjiskip:D } { \l_@@_xkanjiskip_skip } +% { \tex_xkanjiskip:D } { \l_@@_xkanjiskip_skip } { \skip_set:Nn \l_@@_xkanjiskip_skip { \l_@@_xkanjiskip_tl } % \ctex_ltj_set_xkanjiskip:N \l_@@_xkanjiskip_skip -% \skip_set_eq:NN \ptex_xkanjiskip:D \l_@@_xkanjiskip_skip +% \skip_set_eq:NN \tex_xkanjiskip:D \l_@@_xkanjiskip_skip } } \tl_new:N \l_@@_xkanjiskip_tl @@ -6402,7 +6488,7 @@ Copyright and Licence \skip_new:N \l_@@_xkanjiskip_skip \skip_set:Nn \l_@@_xkanjiskip_skip % { \ltjgetparameter { xkanjiskip } } -% { \ptex_xkanjiskip:D } +% { \tex_xkanjiskip:D } % \end{macrocode} % \end{variable} % \end{macro} @@ -6424,7 +6510,7 @@ Copyright and Licence \newluafunction \g_@@_kanjisize_func \group_begin: \char_set_catcode_space:n { 32 } -\lua_now_x:n +\lua_now:e { local nulltable = { } local t = lua.get_functions_table() @@ -6442,7 +6528,7 @@ Copyright and Licence } \group_end: \cs_new_protected_nopar:Npn \ctex_update_kanjisize: - { \luatex_luafunction:D \g_@@_kanjisize_func } + { \tex_luafunction:D \g_@@_kanjisize_func } \ctex_add_to_selectfont:n { \ctex_update_kanjisize: } % % \end{macrocode} @@ -6646,7 +6732,7 @@ Copyright and Licence { \ctex_update_ccwd: } { \dim_set:Nn \l_@@_tmp_dim - { \baselinestretch \etex_glueexpr:D \f@baselineskip \scan_stop: } + { \baselinestretch \tex_glueexpr:D \f@baselineskip \scan_stop: } \skip_set:Nn \l_@@_ccglue_skip { \c_zero_dim plus .08 \l_@@_tmp_dim } \ctex_update_ccglue: @@ -6654,9 +6740,9 @@ Copyright and Licence } { \int_set:Nn \l_@@_tmp_int - { \etex_dimexpr:D \linewidth - \ccwd - \l_@@_tmp_dim \scan_stop: } + { \tex_dimexpr:D \linewidth - \ccwd - \l_@@_tmp_dim \scan_stop: } \tex_divide:D \l_@@_tmp_int \ccwd - \int_compare:nNnTF \l_@@_tmp_int > \c_zero + \int_compare:nNnTF \l_@@_tmp_int > \c_zero_int { \skip_set:Nn \l_@@_ccglue_skip { @@ -6727,15 +6813,15 @@ Copyright and Licence % \begin{macrocode} \dim_compare:nNnF \parindent = \c_zero_dim { - \int_compare:nNnF \l_@@_tmp_int < \c_three - { \int_sub:Nn \l_@@_tmp_int { \c_two } } + \int_compare:nNnF \l_@@_tmp_int < 3 + { \int_sub:Nn \l_@@_tmp_int { 2 } } } \skip_set:Nn \l_@@_ccglue_skip { \l_@@_ziju_dim plus \dim_eval:n { \l_@@_tmp_dim / \l_@@_tmp_int } minus \dim_min:nn { \dim_abs:n { \l_@@_ziju_dim } } - { ( \ccwd - \l_@@_tmp_dim ) / ( \l_@@_tmp_int + \c_one ) } + { ( \ccwd - \l_@@_tmp_dim ) / ( \l_@@_tmp_int + 1 ) } } } { \skip_set:Nn \l_@@_ccglue_skip { \l_@@_ziju_dim } } @@ -7064,7 +7150,7 @@ Copyright and Licence % 了 \pkg{xparse} 的 \tn{SplitArgument},它带有参数的长度检查。 % \begin{macrocode} \NewDocumentCommand \ctex_assign_heading_name:nn - { m > { \SplitArgument { \c_one } { , } } +m } + { m > { \SplitArgument { 1 } { , } } +m } { \@@_assign_heading_name:nnn {#1} #2 } \cs_new_protected:Npn \@@_assign_heading_name:nnn #1#2#3 { @@ -7217,6 +7303,8 @@ Copyright and Licence % % \changes{v2.2}{2015/06/27}{\opt{beforeskip}、\opt{afterskip} 和 \opt{indent} % 选项支持表达式。} +% \changes{v2.4.15}{2019/03/31}{修正 \opt{part/indent} 和 \opt{chapter/indent} 的实现方法。} +% \changes{v2.4.15}{2019/03/31}{定义 \opt{part/hang} 和 \opt{chapter/hang}。} % % \paragraph{part 的标题} % @@ -7292,11 +7380,12 @@ Copyright and Licence \CTEX@addtocline{part}{#1}% {\interlinepenalty \@M % \normalfont \parindent \z@ \raggedright - \normalfont \parindent \dimexpr \CTEX@part@indent \relax \CTEX@part@format - \ifnum \c@secnumdepth >\m@ne \ifodd \CTEX@part@numbering + \normalfont \CTEX@part@format +% \ifnum \c@secnumdepth >\m@ne % \Large\bfseries\partname\nobreakspace\thepart\par\nobreak - \CTEX@partname \CTEX@part@aftername - \fi \fi +% \fi + \CTEX@hangindent{part}% + {\CTEXifname{\CTEX@partname\CTEX@part@aftername}{}}% % \huge\bfseries #2% \CTEX@part@titleformat{#2}% % \markboth{}{}% @@ -7332,10 +7421,11 @@ Copyright and Licence {\interlinepenalty \@M % \normalfont \centering \normalfont \CTEX@part@format - \ifnum \c@secnumdepth >-2\relax \ifodd \CTEX@part@numbering +% \ifnum \c@secnumdepth >-2\relax % \huge\bfseries\partname\nobreakspace\thepart\par\vskip 20\p@ - \CTEX@partname \CTEX@part@aftername - \fi \fi +% \fi + \CTEX@hangindent{part}% + {\CTEXifname{\CTEX@partname\CTEX@part@aftername}{}}% % \Huge\bfseries #2\par}% \CTEX@part@titleformat{#2}% \CTEX@part@aftertitle}% @@ -7352,8 +7442,8 @@ Copyright and Licence \CTEX@makeanchor@spart{part*}% {\interlinepenalty \@M % \normalfont \parindent \z@ \raggedright - \normalfont \parindent \dimexpr \CTEX@part@indent \relax - \CTEX@part@format + \normalfont \CTEX@part@format + \CTEX@hangindent{part}{}% % \huge \bfseries #1\par}% \CTEX@part@titleformat{#1}% \CTEX@part@aftertitle}% @@ -7371,6 +7461,7 @@ Copyright and Licence {\interlinepenalty \@M % \normalfont \centering \normalfont \CTEX@part@format + \CTEX@hangindent{part}{}% % \Huge \bfseries #1\par}% \CTEX@part@titleformat{#1}% \CTEX@part@aftertitle}% @@ -7493,15 +7584,15 @@ Copyright and Licence \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi \vspace*{\CTEX@headingskip}% % {\normalfont \parindent \z@ \raggedright - {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax - \CTEX@chapter@format + {\normalfont \CTEX@chapter@format + \interlinepenalty\@M % \ifnum \c@secnumdepth >\m@ne % \if@mainmatter % \huge\bfseries\@chapapp\space\thechapter\par\nobreak\vskip 20\p@ % \fi % \fi - \CTEXifname{\CTEX@chaptername\CTEX@chapter@aftername}{}% - \interlinepenalty\@M + \CTEX@hangindent{chapter}% + {\CTEXifname{\CTEX@chaptername\CTEX@chapter@aftername}{}}% % \Huge \bfseries #1\par\nobreak \CTEX@chapter@titleformat{#1}% \CTEX@chapter@aftertitle @@ -7522,11 +7613,11 @@ Copyright and Licence \ifodd \CTEX@chapter@fixskip \CTEX@fixtopskip \fi \vspace*{\CTEX@headingskip}% % {\normalfont \parindent \z@ \raggedright - {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax - \CTEX@chapter@format + {\normalfont \CTEX@chapter@format \interlinepenalty\@M + \CTEX@hangindent{chapter}{}% % \Huge \bfseries #1\par\nobreak - \CTEX@chapter@titleformat{#1} + \CTEX@chapter@titleformat{#1}% \CTEX@chapter@aftertitle \nobreak % \vskip 40\p@ @@ -7700,6 +7791,27 @@ Copyright and Licence %<@@=ctex> % \end{macrocode} % +% \begin{macro}[int]{\CTEX@hangindent} +% 用于实现 \tn{part} 和 \tn{chapter} 标题的 \opt{indent} 和 \opt{hang} 选项。 +% \begin{macrocode} +\cs_new_protected:Npn \CTEX@hangindent #1#2 + { + \bool_if:cTF { CTEX@#1@hang } + { \@hangfrom } + { \noindent \use:n } + { \@@_indent_aux:n {#1} #2 } + } +\cs_new_protected:Npn \@@_indent_aux:n #1 + { + \group_begin: + \skip_set:Nn \l_@@_heading_skip { \use:c { CTEX@#1@indent } } + \dim_compare:nNnF \l_@@_heading_skip = \c_zero_dim + { \skip_horizontal:N \l_@@_heading_skip } + \group_end: + } +% \end{macrocode} +% \end{macro} +% % \begin{macro}[int]{\CTEX@hangfrom} % \opt{hang} 选项控制是否采用悬挂缩进。 % \begin{macrocode} @@ -7718,11 +7830,11 @@ Copyright and Licence \cs_new_protected_nopar:Npn \CTEX@update@sectionformat@n #1 { \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } - \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle } - \cs_set_eq:Nc \CTEX@afterindent { CTEX@#1@afterindent } - \cs_set_eq:Nc \CTEX@fixskip { CTEX@#1@fixskip } - \cs_set_eq:Nc \CTEX@hang { CTEX@#1@hang } - \cs_set_eq:Nc \CTEX@runin { CTEX@#1@runin } + \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle } + \cs_set_eq:Nc \CTEX@afterindent { CTEX@#1@afterindent } + \cs_set_eq:Nc \CTEX@fixskip { CTEX@#1@fixskip } + \cs_set_eq:Nc \CTEX@hang { CTEX@#1@hang } + \cs_set_eq:Nc \CTEX@runin { CTEX@#1@runin } } \cs_new_eq:NN \CTEX@titleformat@n \use:n \cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing: @@ -8123,7 +8235,7 @@ Copyright and Licence \dim_set:Nn \@tempdima { \dim_max:nn { \@tempdima } - { \box_wd:N \l_@@_tmp_box + \f@size \p@ / \c_two } + { \box_wd:N \l_@@_tmp_box + \f@size \p@ / 2 } } } \group_begin: @@ -8236,24 +8348,28 @@ Copyright and Licence \ExplSyntaxOff % \end{macrocode} % +% \changes{v2.4.15}{2019/01/29}{局部指定 \opt{autoindent} 为 \opt{false},并交换 +% \tn{CTEX@XXX@indent} 与 \tn{CTEX@XXX@format} 的顺序。} +% % 对应 \tn{partpage}。 % \begin{macrocode} -\defbeamertemplate*{part page}{CTEX}[1][]{ +\defbeamertemplate*{part page}{CTEX}[1][]{% \begingroup + \ctexset{autoindent=false}% % \centering % {\usebeamerfont{part name}% % \usebeamercolor[fg]{part name}\partname~\insertromanpartnumber} % \vskip1em\par \par \addvspace{\glueexpr\CTEX@part@beforeskip\relax}% - \parindent \dimexpr \CTEX@part@indent \relax \CTEX@part@format + \parindent \dimexpr \CTEX@part@indent \relax \ifodd \CTEX@part@numbering \CTEX@partname \CTEX@part@aftername \fi \begin{beamercolorbox}[sep=16pt,center,#1]{part title} % \usebeamerfont{part title}\insertpart\par \CTEX@part@titleformat \insertpart \CTEX@part@aftertitle - \end{beamercolorbox} + \end{beamercolorbox}% \par \addvspace{\glueexpr\CTEX@part@afterskip\relax}% \endgroup } @@ -8261,22 +8377,23 @@ Copyright and Licence % % 对应 \tn{sectionpage}。 % \begin{macrocode} -\defbeamertemplate*{section page}{CTEX}[1][]{ +\defbeamertemplate*{section page}{CTEX}[1][]{% \begingroup + \ctexset{autoindent=false}% % \centering % {\usebeamerfont{section name}% % \usebeamercolor[fg]{section name}\sectionname~\insertsectionnumber} % \vskip1em\par \par \addvspace{\glueexpr\CTEX@section@beforeskip\relax}% - \parindent \dimexpr \CTEX@section@indent \relax \CTEX@section@format + \parindent \dimexpr \CTEX@section@indent \relax \ifodd \CTEX@section@numbering \CTEX@sectionname \CTEX@section@aftername \fi \begin{beamercolorbox}[sep=12pt,center,#1]{part title} % \usebeamerfont{section title}\insertsection\par \CTEX@section@titleformat \insertsection \CTEX@section@aftertitle - \end{beamercolorbox} + \end{beamercolorbox}% \par \addvspace{\glueexpr\CTEX@section@afterskip\relax}% \endgroup } @@ -8284,22 +8401,23 @@ Copyright and Licence % % 对应 \tn{subsectionpage}。 % \begin{macrocode} -\defbeamertemplate*{subsection page}{CTEX}[1][]{ +\defbeamertemplate*{subsection page}{CTEX}[1][]{% \begingroup + \ctexset{autoindent=false}% % \centering % {\usebeamerfont{subsection name}% % \usebeamercolor[fg]{subsection name}\subsectionname~\insertsubsectionnumber} % \vskip1em\par \par \addvspace{\glueexpr\CTEX@subsection@beforeskip\relax}% - \parindent \dimexpr \CTEX@subsection@indent \relax \CTEX@subsection@format + \parindent \dimexpr \CTEX@subsection@indent \relax \ifodd \CTEX@subsection@numbering \CTEX@subsectionname \CTEX@subsection@aftername \fi \begin{beamercolorbox}[sep=8pt,center,#1]{part title} % \usebeamerfont{subsection title}\insertsubsection\par \CTEX@subsection@titleformat \insertsubsection \CTEX@subsection@aftertitle - \end{beamercolorbox} + \end{beamercolorbox}% \par \addvspace{\glueexpr\CTEX@subsection@afterskip\relax}% \endgroup } @@ -8413,6 +8531,9 @@ Copyright and Licence \keys_set:nn { ctex / part } { aftertitle = \par , +%<*article|book|report> + hang = false , +% %<*plain> name = \partname \space , %<*article|book|report> @@ -8472,6 +8593,7 @@ Copyright and Licence { pagestyle = plain , aftertitle = \par , + hang = false , beforeskip = 50 \p@ , afterskip = 40 \p@ , lofskip = 10 \p@ , @@ -8633,7 +8755,7 @@ Copyright and Licence % % 处理 \opt{sub3section} 与 \opt{sub4section} 的格式。 % \begin{macrocode} -\int_compare:nNnTF \g__ctex_section_depth_flag > \c_two +\int_compare:nNnTF \g__ctex_section_depth_int > 2 { \keys_set:nn { ctex / paragraph } { @@ -8649,7 +8771,7 @@ Copyright and Licence runin = true } } -\int_compare:nNnTF \g__ctex_section_depth_flag > \c_three +\int_compare:nNnTF \g__ctex_section_depth_int > 3 { \keys_set:nn { ctex / subparagraph } { @@ -8665,7 +8787,7 @@ Copyright and Licence runin = true } } -\int_compare:nNnTF \g__ctex_section_depth_flag > \c_two +\int_compare:nNnTF \g__ctex_section_depth_int > 2 { \keys_set:nn { ctex / subparagraph } { indent = \c_zero_dim } } { \keys_set:nn { ctex / subparagraph } { indent = \parindent } } % \end{macrocode} @@ -8829,8 +8951,8 @@ Copyright and Licence % 对 \cls{beamer} 以外的文档类,若用户未设置宏包选项 \opt{zihao},则设置 \tn{normalsize} % 为五号字。\cls{beamer} 不调整默认字体大小。 % \begin{macrocode} -\int_compare:nNnF \g_@@_font_size_flag > { -1 } - { \cs_gset_eq:NN \g_@@_font_size_flag \c_zero } +\int_compare:nNnF \g_@@_font_size_int > { -1 } + { \int_gset:Nn \g_@@_font_size_int { 0 } } % \end{macrocode} % % \changes{v2.4.1}{2016/05/09}{\cls{beamer} 不调整默认行距。} @@ -8866,8 +8988,8 @@ Copyright and Licence \str_if_eq:onTF { \l_@@_encoding_tl } { GBK } { \ctex_file_input:n { ctex-name-gbk.cfg } } { \ctex_file_input:n { ctex-name-utf8.cfg } } - \int_compare:nNnF \g_@@_font_size_flag > { -1 } - { \cs_gset_eq:NN \g_@@_font_size_flag \c_zero } + \int_compare:nNnF \g_@@_font_size_int > { -1 } + { \int_gset:Nn \g_@@_font_size_int { 0 } } \fp_compare:nNnT { \l_@@_line_spread_fp } ? { \c_zero_fp } { \fp_set:Nn \l_@@_line_spread_fp { 1.3 } } % \end{macrocode} @@ -8938,7 +9060,7 @@ Copyright and Licence \prop_gput:Nnn \exp_not:N \c_@@_font_size_prop {#1} { { \dim_to_decimal:n {#2} } - { \dim_to_decimal:n { (#2) * \c_six / \c_five } } + { \dim_to_decimal:n { (#2) * 6 / 5 } } } } \seq_gput_right:Nn \c_@@_font_size_seq {#1} @@ -9031,7 +9153,7 @@ Copyright and Licence % \end{macro} % % \begin{macrocode} -\if_case:w \g_@@_font_size_flag +\if_case:w \g_@@_font_size_int \ctex_file_input:n { ctex-c5size.clo } \or: \ctex_file_input:n { ctex-cs4size.clo } @@ -9271,7 +9393,7 @@ Copyright and Licence { \ctex_if_preamble:TF { - \str_if_eq_x:nnTF {#1} { none } + \str_if_eq:eeTF {#1} { none } { \msg_warning:nnn { ctex } { invalid-value } {#1} } { \str_if_eq:onTF { \g_@@_fontset_tl } { none } @@ -9339,6 +9461,8 @@ Copyright and Licence % % \subsubsection{传统定义方式} % +% \changes{v2.4.15}{2019/04/05}{将 \texttt{JY2} 和 \texttt{JT2} 编码的字体定义提取到单独的文件中。} +% % \begin{macrocode} %<*c19|c70> %% @@ -9362,17 +9486,15 @@ Copyright and Licence % \end{macrocode} % % \changes{v2.4}{2016/04/25}{提供 \upLaTeX{} 的 NFSS 字体定义。} -% \upTeX{} 使用的字体族。\upLaTeX 在 NFSS 下使用字体编码 |JY2| 和 |JT2| 来分别 +% \upLaTeX{} 使用的字体族。\upLaTeX 在 NFSS 下使用字体编码 |JY2| 和 |JT2| 来分别 % 表示横排与直排的日文。 % \begin{macrocode} -%<*uptex|aptex> -\DeclareKanjiFamily{JY2}{rm}{} -\DeclareKanjiFamily{JY2}{sf}{} -\DeclareKanjiFamily{JY2}{tt}{} -\DeclareKanjiFamily{JT2}{rm}{} -\DeclareKanjiFamily{JT2}{sf}{} -\DeclareKanjiFamily{JT2}{tt}{} -% +%\DeclareKanjiFamily{JY2}{zhrm}{} +%\DeclareKanjiFamily{JT2}{zhrm}{} +%\DeclareKanjiFamily{JY2}{zhsf}{} +%\DeclareKanjiFamily{JT2}{zhsf}{} +%\DeclareKanjiFamily{JY2}{zhtt}{} +%\DeclareKanjiFamily{JT2}{zhtt}{} % \end{macrocode} % % @@ -9400,15 +9522,17 @@ Copyright and Licence \DeclareFontShape{C70}{rm}{b}{it}{<-> CJKb * unikai}{\CJKbold} \DeclareFontShape{C70}{rm}{bx}{it}{<-> CJKb * unikai}{\CJKbold} % +%<*jy2> +\DeclareFontShape{JY2}{zhrm}{m}{n}{<-> upzhserif-h}{} +\DeclareFontShape{JY2}{zhrm}{m}{it}{<-> upzhserifit-h}{} +\DeclareFontShape{JY2}{zhrm}{bx}{n}{<-> upzhserifb-h}{} +% +%<*jt2> +\DeclareFontShape{JT2}{zhrm}{m}{n}{<-> upzhserif-v}{} +\DeclareFontShape{JT2}{zhrm}{m}{it}{<-> upzhserifit-v}{} +\DeclareFontShape{JT2}{zhrm}{bx}{n}{<-> upzhserifb-v}{} +% % -%<*uptex|aptex> -\DeclareFontShape{JY2}{rm}{m}{n}{<-> upzhserif-h}{} -\DeclareFontShape{JY2}{rm}{m}{it}{<-> upzhserifit-h}{} -\DeclareFontShape{JY2}{rm}{bx}{n}{<-> upzhserifb-h}{} -\DeclareFontShape{JT2}{rm}{m}{n}{<-> upzhserif-v}{} -\DeclareFontShape{JT2}{rm}{m}{it}{<-> upzhserifit-v}{} -\DeclareFontShape{JT2}{rm}{bx}{n}{<-> upzhserifb-v}{} -% % \end{macrocode} % % \begin{macrocode} @@ -9435,13 +9559,15 @@ Copyright and Licence \DeclareFontShape{C70}{sf}{b}{it}{<-> CJKb * uniyou}{\CJKbold} \DeclareFontShape{C70}{sf}{bx}{it}{<-> CJKb * uniyou}{\CJKbold} % +%<*jy2> +\DeclareFontShape{JY2}{zhsf}{m}{n}{<-> upzhsans-h}{} +\DeclareFontShape{JY2}{zhsf}{bx}{n}{<-> upzhsansb-h}{} +% +%<*jt2> +\DeclareFontShape{JT2}{zhsf}{m}{n}{<-> upzhsans-v}{} +\DeclareFontShape{JT2}{zhsf}{bx}{n}{<-> upzhsansb-v}{} +% % -%<*uptex|aptex> -\DeclareFontShape{JY2}{sf}{m}{n}{<-> upzhsans-h}{} -\DeclareFontShape{JY2}{sf}{bx}{n}{<-> upzhsansb-h}{} -\DeclareFontShape{JT2}{sf}{m}{n}{<-> upzhsans-v}{} -\DeclareFontShape{JT2}{sf}{bx}{n}{<-> upzhsansb-v}{} -% % \end{macrocode} % % \begin{macrocode} @@ -9468,11 +9594,13 @@ Copyright and Licence \DeclareFontShape{C70}{tt}{b}{it}{<-> CJKb * unifs}{\CJKbold} \DeclareFontShape{C70}{tt}{bx}{it}{<-> CJKb * unifs}{\CJKbold} % +%<*jy2> +\DeclareFontShape{JY2}{zhtt}{m}{n}{<-> upzhmono-h}{} +% +%<*jt2> +\DeclareFontShape{JT2}{zhtt}{m}{n}{<-> upzhmono-v}{} +% % -%<*uptex|aptex> -\DeclareFontShape{JY2}{tt}{m}{n}{<-> upzhmono-h}{} -\DeclareFontShape{JT2}{tt}{m}{n}{<-> upzhmono-v}{} -% % \end{macrocode} % % \begin{macrocode} @@ -9774,13 +9902,14 @@ Copyright and Licence % % \end{macrocode} % -% \subsubsection{\pkg{ctex-fontset-mac.def}} +% \subsubsection{\pkg{ctex-fontset-mac.def} 等} % \changes{v2.4.14}{2018/05/01}{区分 \texttt{macold} 及 \texttt{macnew}。} % % 按 \href{https://github.com/CTeX-org/ctex-kit/issues/351}{Issue 351} % 的讨论,以 El Capitan 为分界,分别设置 |macold|(El Capitan 之前) % 和 |macnew|(El Capitan 及之后)。检测方式则以 El Capitan 及之后 % 的苹方字体为准。 +% % \begin{macrocode} %<*mac> \file_if_exist:nTF { /System/Library/Fonts/PingFang.ttc } @@ -9789,47 +9918,10 @@ Copyright and Licence % % \end{macrocode} % -% \subsubsection{\pkg{ctex-fontset-macold.def}} +% |macold| 的设置参考了 ^^A +% \href{https://github.com/CTeX-org/ctex-kit/wiki/OS-X-Mavericks-(10.9)-\%E9\%A2\%84\%E8\%A3\%85\%E7\%9A\%84\%E4\%B8\%BB\%E8\%A6\%81\%E7\%AE\%80\%E4\%BD\%93\%E4\%B8\%AD\%E6\%96\%87\%E5\%AD\%97\%E4\%BD\%93}^^A +% {OS X Mavericks (10.9) 预装的主要简体中文字体列表}。 % -% OS X Mavericks (10.9) 预装的主要简体中文字体如下^^A -% \footnote{\url{http://support.apple.com/kb/HT5944}}: -% \begin{verbatim} -% /Library/Fonts/Baoli.ttc: 报隶-简,Baoli SC:style=Regular -% /Library/Fonts/Hannotate.ttc: 手札体-简,Hannotate SC:style=Bold -% /Library/Fonts/Hannotate.ttc: 手札体-简,Hannotate SC:style=Regular -% /Library/Fonts/Hanzipen.ttc: 翩翩体-简,HanziPen SC:style=Bold -% /Library/Fonts/Hanzipen.ttc: 翩翩体-简,HanziPen SC:style=Regular -% /Library/Fonts/Hei.ttf: Hei -% /Library/Fonts/Hiragino Sans GB W3.otf: 冬青黑体简体中文 W3,Hiragino Sans GB W3 -% /Library/Fonts/Hiragino Sans GB W6.otf: 冬青黑体简体中文 W6,Hiragino Sans GB W6 -% /Library/Fonts/Kai.ttf: Kai -% /Library/Fonts/Kaiti.ttc: STKaiti -% /Library/Fonts/Kaiti.ttc: 楷体-简,Kaiti SC:style=Black -% /Library/Fonts/Kaiti.ttc: 楷体-简,Kaiti SC:style=Bold -% /Library/Fonts/Kaiti.ttc: 楷体-简,Kaiti SC:style=Regular -% /Library/Fonts/Lantinghei.ttc: 兰亭黑-简,Lantinghei SC:style=Demibold -% /Library/Fonts/Lantinghei.ttc: 兰亭黑-简,Lantinghei SC:style=Heavy -% /Library/Fonts/Lantinghei.ttc: 兰亭黑-简,Lantinghei SC:style=Extralight -% /Library/Fonts/Libian.ttc: 隶变-简,Libian SC -% /Library/Fonts/Songti.ttc: STSong -% /Library/Fonts/Songti.ttc: 宋体-简,Songti SC:style=Black -% /Library/Fonts/Songti.ttc: 宋体-简,Songti SC:style=Bold -% /Library/Fonts/Songti.ttc: 宋体-简,Songti SC:style=Light -% /Library/Fonts/Songti.ttc: 宋体-简,Songti SC:style=Regular -% /Library/Fonts/WawaSC-Regular.otf: 娃娃体-简,Wawati SC -% /Library/Fonts/WeibeiSC-Bold.otf: 魏碑-简,Weibei SC -% /Library/Fonts/Xingkai.ttc: 行楷-简,Xingkai SC:style=Bold -% /Library/Fonts/Xingkai.ttc: 行楷-简,Xingkai SC:style=Light -% /Library/Fonts/Yuanti.ttc: 圆体-简,Yuanti SC:style=Bold -% /Library/Fonts/Yuanti.ttc: 圆体-简,Yuanti SC:style=Light -% /Library/Fonts/Yuanti.ttc: 圆体-简,Yuanti SC:style=Regular -% /Library/Fonts/YuppySC-Regular.otf: 雅痞-简,Yuppy SC -% /Library/Fonts/华文仿宋.ttf: STFangsong -% /Library/Fonts/华文细黑.ttf: STHeiti:style=Light -% /Library/Fonts/华文黑体.ttf: STHeiti:style=Regular -% /System/Library/Fonts/STHeiti Light.ttc: 黑体-简,Heiti SC:style=Light -% /System/Library/Fonts/STHeiti Medium.ttc: 黑体-简,Heiti SC:style=Medium -% \end{verbatim} % 在 \dvipdfmx{} 下,可以通过下述方式使用华文宋体和华文楷体: % \begin{verbatim} % \special{pdf:mapline unisong@Unicode@ unicode :4:Songti.ttc} @@ -9858,66 +9950,67 @@ Copyright and Licence % 这确认为 \dvipdfmx{} 的 bug^^A % \begingroup\makeatletter\@makeother\#\@firstofone{\endgroup % \footnote{\url{https://github.com/clerkma/ptex-ng/blob/master/texk/libdpx/cidtype2.c#L597}}}。 -% \begin{macrocode} -%<*macold> -\sys_if_engine_pdftex:TF - { \ctex_fontset_error:n { mac } } - { - \sys_if_engine_uptex:TF - { \ctex_fontset_error:n { mac } } - { - \setCJKmainfont [ BoldFont = STHeiti , ItalicFont = STKaiti ] { STSong } - \setCJKsansfont [ BoldFont = STHeiti ] { STXihei } - \setCJKmonofont { STFangsong } - \setCJKfamilyfont { zhsong } { STSong } - \setCJKfamilyfont { zhhei } { STHeiti } - \setCJKfamilyfont { zhfs } { STFangsong } - \setCJKfamilyfont { zhkai } { STKaiti } - } - } -% -% \end{macrocode} % -% \subsubsection{\pkg{ctex-fontset-macnew.def}} % \changes{v2.4.14}{2018/05/01}{配置 \texttt{macnew} 的默认字体设置。} % % |macnew| 在默认字体设置方面,引入了多字重的宋体作为罗马字族, % 以及引入了苹方黑体作为无衬线字族。 % +% 由于 Songti SC Light 的字重与 STSong 及 Windows 上的 SimSun 更接近,故默认字重 +% 使用 Songti SC Light,而不带后缀的正常字重事实上没有使用。下方关于 |zhsong| 的字族 +% 设置也有同样的情况。 +% % \begin{macrocode} -%<*macnew> +%<*macold|macnew> \sys_if_engine_pdftex:TF { \ctex_fontset_error:n { mac } } { \sys_if_engine_uptex:TF { \ctex_fontset_error:n { mac } } { +%<*macold> + \setCJKmainfont [ BoldFont = STHeiti , ItalicFont = STKaiti ] { STSong } + \setCJKsansfont [ BoldFont = STHeiti ] { STXihei } +% +%<*macnew> \setCJKmainfont [ - UprightFont = Songti~SC~Light, - ItalicFont = Kaiti~SC, + UprightFont = *~Light , + BoldFont = *~Bold , + ItalicFont = Kaiti~SC , BoldItalicFont = Kaiti~SC~Bold ] { Songti~SC } \setCJKsansfont { PingFang~SC } +% \setCJKmonofont { STFangsong } +%<*macold> + \setCJKfamilyfont { zhsong } { STSong } + \setCJKfamilyfont { zhhei } { STHeiti } +% +%<*macnew> \setCJKfamilyfont { zhsong } [ - UprightFont = Songti~SC~Light, + UprightFont = *~Light , + BoldFont = *~Bold , ] { Songti~SC } \setCJKfamilyfont { zhhei } { Heiti~SC } \setCJKfamilyfont { zhpf } { PingFang~SC } +% \setCJKfamilyfont { zhfs } { STFangsong } - \setCJKfamilyfont { zhkai } { Kaiti~SC } +%\setCJKfamilyfont { zhkai } { STKaiti } +%\setCJKfamilyfont { zhkai } { Kaiti~SC } } } -% +% % \end{macrocode} % +% \subsubsection{\pkg{ctex-fontset-founder.def}} +% % \begin{macrocode} %<*founder> % \end{macrocode} % -% \subsubsection{\pkg{ctex-fontset-founder.def}} +% \changes{v2.4.15}{2019/03/28}{统一“方正细黑一\_GBK”的名称为 \texttt{FZXiHeiI-Z08}。} % % \begin{macrocode} \sys_if_engine_pdftex:TF @@ -9971,18 +10064,7 @@ Copyright and Licence { \setCJKmainfont [ BoldFont = FZXiaoBiaoSong-B05 , ItalicFont = FZKai-Z03 ] { FZShuSong-Z01 } -% \end{macrocode} -% -% 在 WPS For Linux 附带的 5.00 版和家庭版 5.20 版的“方正细黑一\_GBK”的字体名称 -% 是 |FZXiHeiI-Z08|。但在网上发现不少文档和资料都是 \verb*|FZXiHei I-Z08|,而在 -% 官方资料《2013 方正字库字体样张》中对应的英文名字是 \verb*|FZXiHei I|。可以用 -% Postscript 名字 |FZXH1K--GBK1-0| 来统一。经测试时发现(WPS 中的字体),\XeTeX{} -% 找该字体时会出现明显的延迟,而用字体文件名 |FZXH1K.TTF| 又可能会出现大小写问题, -% 遂采用汉字名称。由于 \pkg{luaotfload} 不支持汉字名称,故使用 Postscript 名字, -% 速度不受影响。 -% \begin{macrocode} - \setCJKsansfont [ BoldFont = FZHei-B01 ] - { \sys_if_engine_xetex:TF { 方正细黑一_GBK } { FZXH1K--GBK1-0 } } + \setCJKsansfont [ BoldFont = FZHei-B01 ] { FZXiHeiI-Z08 } \setCJKmonofont { FZFangSong-Z02 } \setCJKfamilyfont { zhsong } [ BoldFont = FZXiaoBiaoSong-B05 ] { FZShuSong-Z01 } \setCJKfamilyfont { zhhei } { FZHei-B01 } @@ -10081,8 +10163,10 @@ Copyright and Licence \NewDocumentCommand \youyuan { } { \CJKfamily { zhyou } } % %\NewDocumentCommand \yahei { } { \CJKfamily { zhyahei } } -%\NewDocumentCommand \yahei { } { \CJKfamily { zhpf } } -%\NewDocumentCommand \pingfang { } { \CJKfamily { zhpf } } +%<*macnew> +\NewDocumentCommand \yahei { } { \CJKfamily { zhpf } } +\NewDocumentCommand \pingfang { } { \CJKfamily { zhpf } } +% % \end{macrocode} % % \begin{macrocode} @@ -10158,7 +10242,7 @@ Copyright and Licence % \begin{macrocode} %<*windows> \ProvidesFile{zhwindowsfonts.tex}% - [2018/05/01 v2.4.14 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)] + [2019/04/07 v2.4.15 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)] \ifzhmappdf \pdfmapline{=gbk@UGBK@ \ProvidesFile{zhadobefonts.tex}% - [2018/05/01 v2.4.14 Adobe font map loader for DVIPDFMx (CTEX)] + [2019/04/07 v2.4.15 Adobe font map loader for DVIPDFMx (CTEX)] \ifzhmappdf %% pdfTeX does not support OTF fonts @@ -10266,7 +10350,7 @@ Copyright and Licence % \begin{macrocode} %<*fandol> \ProvidesFile{zhfandolfonts.tex}% - [2018/05/01 v2.4.14 Fandol font map loader for DVIPDFMx (CTEX)] + [2019/04/07 v2.4.15 Fandol font map loader for DVIPDFMx (CTEX)] \ifzhmappdf %% pdfTeX does not support OTF fonts @@ -10302,7 +10386,7 @@ Copyright and Licence % \begin{macrocode} %<*founder> \ProvidesFile{zhfounderfonts.tex}% - [2018/05/01 v2.4.14 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)] + [2019/04/07 v2.4.15 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)] \ifzhmappdf \pdfmapline{=gbk@UGBK@ \ProvidesFile{zhubuntufonts.tex}% - [2018/05/01 v2.4.14 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)] + [2019/04/07 v2.4.15 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)] \ifzhmappdf \pdfmapline{=gbk@UGBK@ \c_two + \int_compare:nNnF \l_tmpa_int > 2 { \tl_put_right:Nx \l_@@_tmp_tl - { \prg_replicate:nn { \c_three - \l_tmpa_int } { 00000 } } + { \prg_replicate:nn { 3 - \l_tmpa_int } { 00000 } } } \@@_ltx_changes:nnn { \l_@@_tmp_tl \actualchar #2 } } @@ -11631,7 +11711,7 @@ Copyright and Licence \tl_new:N \g_@@_verbatim_verb_stop_tl \cs_new_protected_nopar:Npn \@@_process_normal_line: { - \str_if_eq_x:nnTF + \str_if_eq:eeTF { \str_head:N \l_@@_verbatim_line_tl } { \c_percent_str } { \@@_check_angle:x { \tl_tail:N \l_@@_verbatim_line_tl } } { \@@_output_line: } @@ -11658,7 +11738,7 @@ Copyright and Licence { \cs_set_eq:NN \@@_verbatim_process_line: \@@_output_line: } \cs_new_protected:Npn \@@_check_angle:n #1 { - \str_if_eq_x:nnTF { \str_head:n {#1} } { < } + \str_if_eq:eeTF { \str_head:n {#1} } { < } { \@@_check_module:x { \tl_tail:n {#1} } } { \@@_output_percent_line: } } @@ -11755,7 +11835,7 @@ Copyright and Licence \tl_if_eq:NNTF \l_@@_verbatim_line_tl \c_@@_active_cr_tl { \tl_use:N \l_@@_verbatim_line_tl } { - \str_if_eq_x:nnTF + \str_if_eq:eeTF { \str_head:N \l_@@_verbatim_line_tl } { \c_percent_str } { \@@_output_percent_line: } @@ -11768,7 +11848,7 @@ Copyright and Licence \group_begin: \color { code@gray } \@@_swap_cr: - \str_if_eq_x:nnTF { \f@shape } { \updefault } + \str_if_eq:eeTF { \f@shape } { \updefault } { \slshape } { \upshape } \@@_output_line: diff --git a/Master/texmf-dist/source/latex/ctex/ctex.ins b/Master/texmf-dist/source/latex/ctex/ctex.ins index f86b44f9c1a..e7082416c34 100644 --- a/Master/texmf-dist/source/latex/ctex/ctex.ins +++ b/Master/texmf-dist/source/latex/ctex/ctex.ins @@ -6,7 +6,7 @@ %% %% ctex.dtx (with options: `install') %% -%% Copyright (C) 2003--2018 +%% Copyright (C) 2003--2019 %% CTEX.ORG and any individual authors listed in the documentation. %% ------------------------------------------------------------------------------ %% @@ -31,7 +31,7 @@ \preamble - Copyright (C) 2003--2018 + Copyright (C) 2003--2019 CTEX.ORG and any individual authors listed in the documentation. ------------------------------------------------------------------------------ @@ -99,6 +99,12 @@ c70rm.fd, c70sf.fd, c70tt.fd, + jy2zhrm.fd, + jy2zhsf.fd, + jy2zhtt.fd, + jt2zhrm.fd, + jt2zhsf.fd, + jt2zhtt.fd, ctex-fontset-windows.def, ctex-fontset-windowsnew.def, ctex-fontset-windowsold.def, @@ -164,12 +170,18 @@ \file{ctex-engine-luatex.def} {\from{\jobname.dtx}{luatex}} \file{ctex-engine-aptex.def} {\from{\jobname.dtx}{aptex}} \file{ctex-engine-uptex.def} {\from{\jobname.dtx}{uptex}} - \file{c19rm.fd} {\from{\jobname.dtx}{rm,c19}} - \file{c19sf.fd} {\from{\jobname.dtx}{sf,c19}} - \file{c19tt.fd} {\from{\jobname.dtx}{tt,c19}} - \file{c70rm.fd} {\from{\jobname.dtx}{rm,c70}} - \file{c70sf.fd} {\from{\jobname.dtx}{sf,c70}} - \file{c70tt.fd} {\from{\jobname.dtx}{tt,c70}} + \file{c19rm.fd} {\from{\jobname.dtx}{fd,rm,c19}} + \file{c19sf.fd} {\from{\jobname.dtx}{fd,sf,c19}} + \file{c19tt.fd} {\from{\jobname.dtx}{fd,tt,c19}} + \file{c70rm.fd} {\from{\jobname.dtx}{fd,rm,c70}} + \file{c70sf.fd} {\from{\jobname.dtx}{fd,sf,c70}} + \file{c70tt.fd} {\from{\jobname.dtx}{fd,tt,c70}} + \file{jy2zhrm.fd} {\from{\jobname.dtx}{fd,rm,jy2}} + \file{jy2zhsf.fd} {\from{\jobname.dtx}{fd,sf,jy2}} + \file{jy2zhtt.fd} {\from{\jobname.dtx}{fd,tt,jy2}} + \file{jt2zhrm.fd} {\from{\jobname.dtx}{fd,rm,jt2}} + \file{jt2zhsf.fd} {\from{\jobname.dtx}{fd,sf,jt2}} + \file{jt2zhtt.fd} {\from{\jobname.dtx}{fd,tt,jt2}} \file{ctex-fontset-windows.def} {\from{\jobname.dtx}{fontset,windows}} \file{ctex-fontset-windowsnew.def} {\from{\jobname.dtx}{fontset,windowsnew}} \file{ctex-fontset-windowsold.def} {\from{\jobname.dtx}{fontset,windowsold}} @@ -254,6 +266,12 @@ \Msg{* c70rm.fd *} \Msg{* c70sf.fd *} \Msg{* c70tt.fd *} +\Msg{* jy2zhrm.fd *} +\Msg{* jy2zhsf.fd *} +\Msg{* jy2zhtt.fd *} +\Msg{* jt2zhrm.fd *} +\Msg{* jt2zhsf.fd *} +\Msg{* jt2zhtt.fd *} \Msg{* ctex-fontset-windows.def *} \Msg{* ctex-fontset-windowsnew.def *} \Msg{* ctex-fontset-windowsold.def *} -- cgit v1.2.3