diff options
author | Karl Berry <karl@freefriends.org> | 2017-01-02 23:52:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-01-02 23:52:32 +0000 |
commit | d3ca92dc94742e57f13d443db5cbafa4367799c0 (patch) | |
tree | eb8bc8c264cb4b23f78c682dc68b8f2be5c09f28 /Master/texmf-dist/tex/latex/ctex/engine | |
parent | aa1a932fe76016a8027d7db1c45d07963bf2f6d5 (diff) |
ctex (27dec16)
git-svn-id: svn://tug.org/texlive/trunk@42847 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/engine')
5 files changed, 112 insertions, 94 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 a7605fb0a7a..e8c8b72ab49 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 @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx 88a59e5 2016-11-22 17:09:10 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 6471e87 2016-12-27 17:33:18 +0800 Qing Lee <sobenlee@gmail.com> $ {Asian pTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-aptex.def} - {\ExplFileDate}{2.4.6}{\ExplFileDescription} + {\ExplFileDate}{2.4.7}{\ExplFileDescription} \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 { \AtBeginDvi {#1} @@ -97,28 +97,7 @@ \ctex_set_upmap:nnn { upmono } { #6 } {} } \@onlypreamble \ctex_set_upfonts:nnnnnn -\cs_set_nopar:Npn \@EverySelectfont@Init - { - \ctex_patch_cmd:Nnn \selectfont - { \enc@update } - { - \@EverySelectfont@EveryHook - \@EverySelectfont@AtNextHook - \gdef \@EverySelectfont@AtNextHook { } - \enc@update - } - \@ifpackageloaded { tracefnt } - { - \EverySelectfont - { - \ifnum \tracingfonts > \tw@ - \@font@info { Switching~ to~ \font@name } - \fi - } - } - { } - \let \@EverySelectfont@Init \undefined - } +\RequirePackage { pxeverysel } \cs_new_protected_nopar:Npn \ctex_update_default_family: { \tl_if_eq:NNT \CJKfamilydefault \l__ctex_family_default_init_tl @@ -189,14 +168,26 @@ { \exp_not:o { \CTEX@selectfont@hook #1 } } } \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: -\cs_new_eq:Nc \__ctex_save_selectfont: { selectfont ~ } -\ctex_preto_cmd:NnnTF \selectfont { \ExplSyntaxOff } - { \CTEX@selectfont@hook } - { - \tl_put_left:Nn \@EverySelectfont@Init - { \cs_set_eq:cN { selectfont ~ } \__ctex_save_selectfont: } - } - { \ctex_patch_failure:N \selectfont } +\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_nopar:Npn \__ctex_restore_selectfont: + { + \tl_put_left:Nn \@EverySelectfont@Init + { \let #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_preto_cmd:NnnTF { \l__ctex_tmp_tl } { \ExplSyntaxOff } + { \CTEX@selectfont@hook } + { \__ctex_restore_selectfont: } + { \ctex_patch_failure:N \selectfont } +\fi: \EverySelectfont { \CTEX@selectfont@hook } \cs_new_protected_nopar: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 b6b009ba8fe..d57593d2fe3 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 @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx 88a59e5 2016-11-22 17:09:10 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 6471e87 2016-12-27 17:33:18 +0800 Qing Lee <sobenlee@gmail.com> $ {LuaLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-luatex.def} - {\ExplFileDate}{2.4.6}{\ExplFileDescription} + {\ExplFileDate}{2.4.7}{\ExplFileDescription} \msg_new:nnn { ctex } { luatexja-loaded } { Package~`luatexja'~can~not~be~loaded~before~`ctex'.\\ @@ -1060,14 +1060,26 @@ { \exp_not:o { \CTEX@selectfont@hook #1 } } } \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: -\cs_new_eq:Nc \__ctex_save_selectfont: { selectfont ~ } -\ctex_preto_cmd:NnnTF \selectfont { \ExplSyntaxOff } - { \CTEX@selectfont@hook } - { - \tl_put_left:Nn \@EverySelectfont@Init - { \cs_set_eq:cN { selectfont ~ } \__ctex_save_selectfont: } - } - { \ctex_patch_failure:N \selectfont } +\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_nopar:Npn \__ctex_restore_selectfont: + { + \tl_put_left:Nn \@EverySelectfont@Init + { \let #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_preto_cmd:NnnTF { \l__ctex_tmp_tl } { \ExplSyntaxOff } + { \CTEX@selectfont@hook } + { \__ctex_restore_selectfont: } + { \ctex_patch_failure:N \selectfont } +\fi: \EverySelectfont { \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 a5485a5c7d0..f877caa4e15 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 @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx 88a59e5 2016-11-22 17:09:10 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 6471e87 2016-12-27 17:33:18 +0800 Qing Lee <sobenlee@gmail.com> $ {(pdf)LaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-pdftex.def} - {\ExplFileDate}{2.4.6}{\ExplFileDescription} + {\ExplFileDate}{2.4.7}{\ExplFileDescription} \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 { \AtBeginDvi {#1} @@ -383,14 +383,26 @@ { \exp_not:o { \CTEX@selectfont@hook #1 } } } \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: -\cs_new_eq:Nc \__ctex_save_selectfont: { selectfont ~ } -\ctex_preto_cmd:NnnTF \selectfont { \ExplSyntaxOff } - { \CTEX@selectfont@hook } - { - \tl_put_left:Nn \@EverySelectfont@Init - { \cs_set_eq:cN { selectfont ~ } \__ctex_save_selectfont: } - } - { \ctex_patch_failure:N \selectfont } +\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_nopar:Npn \__ctex_restore_selectfont: + { + \tl_put_left:Nn \@EverySelectfont@Init + { \let #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_preto_cmd:NnnTF { \l__ctex_tmp_tl } { \ExplSyntaxOff } + { \CTEX@selectfont@hook } + { \__ctex_restore_selectfont: } + { \ctex_patch_failure:N \selectfont } +\fi: \EverySelectfont { \cs_if_exist:NF \CJK@plane { \CTEX@selectfont@hook } } \keys_define:nn { ctex } { 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 8d876bc7850..1f062922038 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 @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx 88a59e5 2016-11-22 17:09:10 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 6471e87 2016-12-27 17:33:18 +0800 Qing Lee <sobenlee@gmail.com> $ {upTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-uptex.def} - {\ExplFileDate}{2.4.6}{\ExplFileDescription} + {\ExplFileDate}{2.4.7}{\ExplFileDescription} \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 { \AtBeginDvi {#1} @@ -97,28 +97,7 @@ \ctex_set_upmap:nnn { upmono } { #6 } {} } \@onlypreamble \ctex_set_upfonts:nnnnnn -\cs_set_nopar:Npn \@EverySelectfont@Init - { - \ctex_patch_cmd:Nnn \selectfont - { \enc@update } - { - \@EverySelectfont@EveryHook - \@EverySelectfont@AtNextHook - \gdef \@EverySelectfont@AtNextHook { } - \enc@update - } - \@ifpackageloaded { tracefnt } - { - \EverySelectfont - { - \ifnum \tracingfonts > \tw@ - \@font@info { Switching~ to~ \font@name } - \fi - } - } - { } - \let \@EverySelectfont@Init \undefined - } +\RequirePackage { pxeverysel } \cs_new_protected_nopar:Npn \ctex_update_default_family: { \tl_if_eq:NNT \CJKfamilydefault \l__ctex_family_default_init_tl @@ -199,14 +178,26 @@ { \exp_not:o { \CTEX@selectfont@hook #1 } } } \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: -\cs_new_eq:Nc \__ctex_save_selectfont: { selectfont ~ } -\ctex_preto_cmd:NnnTF \selectfont { \ExplSyntaxOff } - { \CTEX@selectfont@hook } - { - \tl_put_left:Nn \@EverySelectfont@Init - { \cs_set_eq:cN { selectfont ~ } \__ctex_save_selectfont: } - } - { \ctex_patch_failure:N \selectfont } +\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_nopar:Npn \__ctex_restore_selectfont: + { + \tl_put_left:Nn \@EverySelectfont@Init + { \let #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_preto_cmd:NnnTF { \l__ctex_tmp_tl } { \ExplSyntaxOff } + { \CTEX@selectfont@hook } + { \__ctex_restore_selectfont: } + { \ctex_patch_failure:N \selectfont } +\fi: \EverySelectfont { \CTEX@selectfont@hook } \cs_new_protected_nopar: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 72253922102..f8880f04789 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 @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\GetIdInfo$Id: ctex.dtx 88a59e5 2016-11-22 17:09:10 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 6471e87 2016-12-27 17:33:18 +0800 Qing Lee <sobenlee@gmail.com> $ {XeLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-xetex.def} - {\ExplFileDate}{2.4.6}{\ExplFileDescription} + {\ExplFileDate}{2.4.7}{\ExplFileDescription} \RequirePackage { xeCJK } \exp_args:Nx \xeCJKsetup { @@ -113,14 +113,26 @@ { \exp_not:o { \CTEX@selectfont@hook #1 } } } \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: -\cs_new_eq:Nc \__ctex_save_selectfont: { selectfont ~ } -\ctex_preto_cmd:NnnTF \selectfont { \ExplSyntaxOff } - { \CTEX@selectfont@hook } - { - \tl_put_left:Nn \@EverySelectfont@Init - { \cs_set_eq:cN { selectfont ~ } \__ctex_save_selectfont: } - } - { \ctex_patch_failure:N \selectfont } +\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_nopar:Npn \__ctex_restore_selectfont: + { + \tl_put_left:Nn \@EverySelectfont@Init + { \let #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_preto_cmd:NnnTF { \l__ctex_tmp_tl } { \ExplSyntaxOff } + { \CTEX@selectfont@hook } + { \__ctex_restore_selectfont: } + { \ctex_patch_failure:N \selectfont } +\fi: \EverySelectfont { \CTEX@selectfont@hook } \keys_define:nn { ctex } { |