From aaec8ff3cf7236ae9429a6d9238b1838af2441d6 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 30 Jun 2015 21:26:14 +0000
Subject: ctex (30jun15)

git-svn-id: svn://tug.org/texlive/trunk@37720 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/ctex/engine/ctex-engine-pdftex.def   | 42 +++++++++++-----------
 1 file changed, 22 insertions(+), 20 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def')

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 8b8d9f876cb..49dc80aca67 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 ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx 6255367 2015-07-01 01:15:24 +0800 Qing Lee <sobenlee@gmail.com> $
   {(pdf)LaTeX adapter (CTEX)}
 \ProvidesExplFile{ctex-engine-pdftex.def}
-  {\ExplFileDate}{2.1}{\ExplFileDescription}
+  {\ExplFileDate}{2.2}{\ExplFileDescription}
 \seq_new:N \c__ctex_cmap_encoding_seq
 \seq_set_from_clist:Nn \c__ctex_cmap_encoding_seq
   { C19 , C10 , C00 , C09 , C40 , C60 }
@@ -69,14 +69,13 @@
 \ctex_if_pdfmode:TF
   {
     \group_end:
-    \ExplSyntaxOff
-    \ctex_appto_cmd:NnTF \DeclareFontFamily { \CTEX@Family@CMap {#1} {#2} }
+    \ctex_appto_cmd:NnnTF \DeclareFontFamily { \ExplSyntaxOff }
+      { \CTEX@Family@CMap {#1} {#2} }
       {
         \ctex_at_end_package:nn { cmap }
           { \cs_gset_eq:NN \CTEX@Family@CMap \use_none:nn }
       }
       { \ctex_patch_failure:N \DeclareFontFamily }
-    \ExplSyntaxOn
   }
   { \group_end: }
 \if_bool:N \g__ctex_zhmCJK_bool
@@ -102,13 +101,20 @@
   \tl_if_exist:NF \CJKrmdefault { \tl_new:N \CJKrmdefault }
   \tl_if_exist:NF \CJKsfdefault { \tl_new:N \CJKsfdefault }
   \tl_if_exist:NF \CJKttdefault { \tl_new:N \CJKttdefault }
-  \ctex_preto_cmd:NnTF \rmfamily { \CJKfamily { \CJKrmdefault } } { }
+  \ctex_preto_cmd:NnnTF \rmfamily { \ExplSyntaxOff }
+    { \CJKfamily { \CJKrmdefault } }
+    { }
     { \ctex_patch_failure:N \rmfamily }
-  \ctex_preto_cmd:NnTF \sffamily { \CJKfamily { \CJKsfdefault } } { }
+  \ctex_preto_cmd:NnnTF \sffamily { \ExplSyntaxOff }
+    { \CJKfamily { \CJKsfdefault } }
+    { }
     { \ctex_patch_failure:N \sffamily }
-  \ctex_preto_cmd:NnTF \ttfamily { \CJKfamily { \CJKttdefault } } { }
+  \ctex_preto_cmd:NnnTF \ttfamily { \ExplSyntaxOff }
+    { \CJKfamily { \CJKttdefault } }
+    { }
     { \ctex_patch_failure:N \ttfamily }
-  \ctex_preto_cmd:NnTF \normalfont { \CJKfamily { \CJKfamilydefault } }
+  \ctex_preto_cmd:NnnTF \normalfont { \ExplSyntaxOff }
+    { \CJKfamily { \CJKfamilydefault } }
     { \cs_set_eq:NN \reset@font \normalfont }
     { \ctex_patch_failure:N \normalfont }
 \fi:
@@ -160,7 +166,7 @@
       \CJK@makeActive
       \CJK@loadBinding { standard }
     }
-  \exp_args:Nx \AtEndPreamble
+  \exp_args:Nx \ctex_at_end_preamble:n
     {
       \exp_not:N \CJK@envStart
         { } { \l__ctex_encoding_tl } { \exp_not:N \CJKfamilydefault }
@@ -248,7 +254,7 @@
         \group_end:
       }
   }
-\AtEndPreamble { \ctex_update_default_family: }
+\ctex_at_end_preamble:n { \ctex_update_default_family: }
 \tl_new:N \l__ctex_family_default_init_tl
 \cs_new_eq:NN \__ctex_family_default_wrap:n \use:n
 \tl_set:Nx \l__ctex_family_default_init_tl
@@ -363,17 +369,13 @@
   }
 \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing:
 \cs_new_eq:Nc \__ctex_save_selectfont: { selectfont ~ }
-\use:n
+\ctex_preto_cmd:NnnTF \selectfont { \ExplSyntaxOff }
+  { \CTEX@selectfont@hook }
   {
-    \ExplSyntaxOff
-    \ctex_preto_cmd:NnTF \selectfont { \CTEX@selectfont@hook }
-      {
-        \tl_put_left:Nn \@EverySelectfont@Init
-          { \cs_set_eq:cN { selectfont ~ } \__ctex_save_selectfont: }
-      }
-      { \ctex_patch_failure:N \selectfont }
+    \tl_put_left:Nn \@EverySelectfont@Init
+      { \cs_set_eq:cN { selectfont ~ } \__ctex_save_selectfont: }
   }
-\ExplSyntaxOn
+  { \ctex_patch_failure:N \selectfont }
 \EverySelectfont { \cs_if_exist:NF \CJK@plane { \CTEX@selectfont@hook } }
 \keys_define:nn { ctex }
   {
-- 
cgit v1.2.3

