diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def | 32 |
1 files changed, 22 insertions, 10 deletions
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 } { |