summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def55
1 files changed, 23 insertions, 32 deletions
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:
{