diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/engine')
5 files changed, 70 insertions, 38 deletions
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 e8c8b72ab49..5e88b9af511 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 @@ -6,7 +6,7 @@ %% %% ctex.dtx (with options: `aptex') %% -%% Copyright (C) 2003--2016 +%% Copyright (C) 2003--2017 %% CTEX.ORG and any individual authors listed in the documentation. %% ------------------------------------------------------------------------------ %% @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx 6471e87 2016-12-27 17:33:18 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx d459e18 2017-02-23 02:07:49 +0800 Qing Lee <sobenlee@gmail.com> $ {Asian pTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-aptex.def} - {\ExplFileDate}{2.4.7}{\ExplFileDescription} + {\ExplFileDate}{2.4.8}{\ExplFileDescription} \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 { \AtBeginDvi {#1} @@ -41,9 +41,22 @@ \tl_set:Nn \CJKsfdefault { sf } \tl_set:Nn \CJKttdefault { tt } \tl_set:Nn \CJKfamilydefault { \CJKrmdefault } -\tl_put_left:Nn \rmfamily { \kanjifamily { \CJKrmdefault } } -\tl_put_left:Nn \sffamily { \kanjifamily { \CJKsfdefault } } -\tl_put_left:Nn \ttfamily { \kanjifamily { \CJKttdefault } } +\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 } \NewDocumentCommand \CJKfamily { m } { \kanjifamily { #1 } 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 d57593d2fe3..51d4cd34a26 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 @@ -6,7 +6,7 @@ %% %% ctex.dtx (with options: `luatex') %% -%% Copyright (C) 2003--2016 +%% Copyright (C) 2003--2017 %% CTEX.ORG and any individual authors listed in the documentation. %% ------------------------------------------------------------------------------ %% @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx 6471e87 2016-12-27 17:33:18 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx d459e18 2017-02-23 02:07:49 +0800 Qing Lee <sobenlee@gmail.com> $ {LuaLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-luatex.def} - {\ExplFileDate}{2.4.7}{\ExplFileDescription} + {\ExplFileDate}{2.4.8}{\ExplFileDescription} \msg_new:nnn { ctex } { luatexja-loaded } { Package~`luatexja'~can~not~be~loaded~before~`ctex'.\\ @@ -331,7 +331,7 @@ \keys_define:nn { fontspec-preparse-external } { NoEmbed .code:n = - { \cs_set_eq:NN \__fontspec_namewrap:n \__ctex_ltj_noembed_wrap:n } + { \cs_set_eq:NN \__fontspec_fontname_wrap:n \__ctex_ltj_noembed_wrap:n } } \cs_new:Npn \__ctex_ltj_noembed_wrap:n #1 { psft: #1 } \cs_new_protected:Npn \ctex_ltj_set_family:nnn #1#2#3 @@ -389,6 +389,7 @@ \group_begin: \__ctex_ltj_change_encoding: \exp_not:n { \cs_set_eq:NN \CJKfamily \use_none:n } + \exp_not:n { \cs_set_eq:NN \CTEX@fontfamily \use_none:n } \exp_not:n { \fontspec_set_family:Nnn \g__ctex_ltj_fontspec_family_tl } { \exp_not:o { \l__ctex_ltj_font_options_clist } } {#2} \prop_gput:Nno \exp_not:N \g__ctex_ltj_family_name_prop {#1} @@ -617,22 +618,27 @@ \tl_if_exist:NF \CJKrmdefault { \tl_const:Nn \CJKrmdefault { rm } } \tl_if_exist:NF \CJKsfdefault { \tl_const:Nn \CJKsfdefault { sf } } \tl_if_exist:NF \CJKttdefault { \tl_const:Nn \CJKttdefault { tt } } -\ctex_preto_cmd:NnnTF \rmfamily { \ExplSyntaxOff } - { \CJKfamily { \CJKrmdefault } } - { } - { \ctex_patch_failure:N \rmfamily } -\ctex_preto_cmd:NnnTF \sffamily { \ExplSyntaxOff } - { \CJKfamily { \CJKsfdefault } } - { } - { \ctex_patch_failure:N \sffamily } -\ctex_preto_cmd:NnnTF \ttfamily { \ExplSyntaxOff } - { \CJKfamily { \CJKttdefault } } - { } - { \ctex_patch_failure:N \ttfamily } -\ctex_preto_cmd:NnnTF \normalfont { \ExplSyntaxOff } - { \CJKfamily { \CJKfamilydefault } } - { \cs_set_eq:NN \reset@font \normalfont } - { \ctex_patch_failure:N \normalfont } +\RenewDocumentCommand \fontfamily { m } + { + \tl_set:Nx \f@family {#1} + \CTEX@fontfamily {#1} + } +\cs_new_protected_nopar:Npn \CTEX@fontfamily #1 + { + \str_if_eq:nnTF {#1} { \familydefault } + { \CJKfamily { \CJKfamilydefault } } + { \__ctex_ltj_update_family_aux: } + } +\cs_new_protected_nopar:Npn \__ctex_ltj_update_family_aux: + { + \str_case_x:nn { \f@family } + { + { \rmdefault } { \CJKfamily { \CJKrmdefault } } + { \sfdefault } { \CJKfamily { \CJKsfdefault } } + { \ttdefault } { \CJKfamily { \CJKttdefault } } + { \familydefault } { \CJKfamily { \CJKfamilydefault } } + } + } \ctex_at_end_preamble:n { \ctex_update_default_family: } \cs_new_protected_nopar:Npn \ctex_ltj_ensure_default_family: { 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 f877caa4e15..c7014cd8cf8 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 @@ -6,7 +6,7 @@ %% %% ctex.dtx (with options: `pdftex') %% -%% Copyright (C) 2003--2016 +%% Copyright (C) 2003--2017 %% CTEX.ORG and any individual authors listed in the documentation. %% ------------------------------------------------------------------------------ %% @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx 6471e87 2016-12-27 17:33:18 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx d459e18 2017-02-23 02:07:49 +0800 Qing Lee <sobenlee@gmail.com> $ {(pdf)LaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-pdftex.def} - {\ExplFileDate}{2.4.7}{\ExplFileDescription} + {\ExplFileDate}{2.4.8}{\ExplFileDescription} \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 { \AtBeginDvi {#1} 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 1f062922038..a87d96cf940 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 @@ -6,7 +6,7 @@ %% %% ctex.dtx (with options: `uptex') %% -%% Copyright (C) 2003--2016 +%% Copyright (C) 2003--2017 %% CTEX.ORG and any individual authors listed in the documentation. %% ------------------------------------------------------------------------------ %% @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx 6471e87 2016-12-27 17:33:18 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx d459e18 2017-02-23 02:07:49 +0800 Qing Lee <sobenlee@gmail.com> $ {upTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-uptex.def} - {\ExplFileDate}{2.4.7}{\ExplFileDescription} + {\ExplFileDate}{2.4.8}{\ExplFileDescription} \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 { \AtBeginDvi {#1} @@ -41,9 +41,22 @@ \tl_set:Nn \CJKsfdefault { sf } \tl_set:Nn \CJKttdefault { tt } \tl_set:Nn \CJKfamilydefault { \CJKrmdefault } -\tl_put_left:Nn \rmfamily { \kanjifamily { \CJKrmdefault } } -\tl_put_left:Nn \sffamily { \kanjifamily { \CJKsfdefault } } -\tl_put_left:Nn \ttfamily { \kanjifamily { \CJKttdefault } } +\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 } \NewDocumentCommand \CJKfamily { m } { \kanjifamily { #1 } 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 f8880f04789..c2d45869029 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 @@ -6,7 +6,7 @@ %% %% ctex.dtx (with options: `xetex') %% -%% Copyright (C) 2003--2016 +%% Copyright (C) 2003--2017 %% CTEX.ORG and any individual authors listed in the documentation. %% ------------------------------------------------------------------------------ %% @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx 6471e87 2016-12-27 17:33:18 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx d459e18 2017-02-23 02:07:49 +0800 Qing Lee <sobenlee@gmail.com> $ {XeLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-xetex.def} - {\ExplFileDate}{2.4.7}{\ExplFileDescription} + {\ExplFileDate}{2.4.8}{\ExplFileDescription} \RequirePackage { xeCJK } \exp_args:Nx \xeCJKsetup { |