From cdbf5b2c845ca6b373fff9043f2e00b14807950a Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 25 Sep 2016 21:05:03 +0000
Subject: ctex

git-svn-id: svn://tug.org/texlive/trunk@42148 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/ctex/engine/ctex-engine-pdftex.def   | 23 +++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 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 7163206437a..6efb3dc6c33 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,15 +26,15 @@
 %% 
 %% ------------------------------------------------------------------------------
 %% 
-\GetIdInfo$Id: ctex.dtx e653f84 2016-08-27 11:05:06 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx b7f83de 2016-09-21 21:27:31 +0800 Qing Lee <sobenlee@gmail.com> $
   {(pdf)LaTeX adapter (CTEX)}
 \ProvidesExplFile{ctex-engine-pdftex.def}
-  {\ExplFileDate}{2.4.3}{\ExplFileDescription}
+  {\ExplFileDate}{2.4.4}{\ExplFileDescription}
 \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1
   {
-    \AtBeginDvi { #1 }
+    \AtBeginDvi {#1}
     \ctex_at_end_package:nn { atbegshi }
-      { \AtBeginShipoutFirst { #1 } }
+      { \AtBeginShipoutFirst {#1} }
   }
 \@onlypreamble \ctex_set_zhmap:n
 \seq_new:N \c__ctex_cmap_encoding_seq
@@ -98,9 +98,22 @@
       \tl_set:Nn \CJKrmdefault {#1}
       \tl_set:Nn \CJKsfdefault {#2}
       \tl_set:Nn \CJKttdefault {#3}
-      \ctex_set_zhmap:n { \file_input:n {#4} }
+      \ctex_set_zhmap:n { \ctex_zhmap_input:n {#4} }
     }
   \@onlypreamble \ctex_load_zhmap:nnnn
+  \cs_new_protected_nopar:Npn \ctex_zhmap_input:n #1
+    {
+      \ctex_file_wrapper:nnn
+        {
+          \char_set_catcode_comment:n { 37 } % %
+          \char_set_catcode_escape:n  { 92 } % \
+        }
+        { \file_input:n {#1} }
+        {
+          \char_set_catcode:nn { 37 } { \char_value_catcode:n { 37 } }
+          \char_set_catcode:nn { 92 } { \char_value_catcode:n { 92 } }
+        }
+    }
   \tl_if_exist:NF \CJKfamilydefault
     { \tl_const:Nn \CJKfamilydefault { \CJKrmdefault } }
   \tl_if_exist:NF \CJKrmdefault { \tl_new:N \CJKrmdefault }
-- 
cgit v1.2.3

