summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def27
1 files changed, 16 insertions, 11 deletions
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 f4d9c367d76..617423d572e 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
@@ -6,7 +6,7 @@
%%
%% ctex.dtx (with options: `pdftex')
%%
-%% Copyright (C) 2003--2015
+%% Copyright (C) 2003--2016
%% CTEX.ORG and any individual authors listed in the documentation.
%% ------------------------------------------------------------------------------
%%
@@ -26,10 +26,17 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 4e02493 2016-02-02 17:10:17 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx 1fcc459 2016-04-25 13:35:13 +0800 Liu Haiyang <leoliu.pku@gmail.com> $
{(pdf)LaTeX adapter (CTEX)}
\ProvidesExplFile{ctex-engine-pdftex.def}
- {\ExplFileDate}{2.3}{\ExplFileDescription}
+ {\ExplFileDate}{2.4}{\ExplFileDescription}
+\cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1
+ {
+ \AtBeginDvi { #1 }
+ \ctex_at_end_package:nn { atbegshi }
+ { \AtBeginShipoutFirst { #1 } }
+ }
+\@onlypreamble \ctex_set_zhmap:n
\seq_new:N \c__ctex_cmap_encoding_seq
\seq_set_from_clist:Nn \c__ctex_cmap_encoding_seq
{ C19 , C10 , C00 , C09 , C40 , C60 }
@@ -57,11 +64,11 @@
\cs_new_protected_nopar:Npn \__ctex_save_cmap:Nn #1#2
{
\tl_set:Nx \l__ctex_tmp_tl { \str_lower_case:n {#2} \CJK@plane }
- \tex_immediate:D \pdfobj stream ~ file { \l__ctex_tmp_tl .cmap }
+ \tex_immediate:D \pdftex_pdfobj:D stream ~ file { \l__ctex_tmp_tl .cmap }
\cs_new_protected_nopar:Npx #1
{
- \exp_not:N \pdffontattr \exp_not:N \font
- { /ToUnicode ~ \int_use:N \pdflastobj \c_space_tl 0 ~ R }
+ \exp_not:N \pdftex_pdffontattr:D \exp_not:N \tex_font:D
+ { /ToUnicode ~ \int_use:N \pdftex_pdflastobj:D \c_space_tl 0 ~ R }
}
}
\group_begin:
@@ -91,11 +98,9 @@
\tl_set:Nn \CJKrmdefault {#1}
\tl_set:Nn \CJKsfdefault {#2}
\tl_set:Nn \CJKttdefault {#3}
- \AtBeginDvi { \file_input:n {#4} }
- \ctex_at_end_package:nn { atbegshi }
- { \AtBeginShipoutFirst { \file_input:n {#4} } }
+ \ctex_set_zhmap:n { \file_input:n {#4} }
}
- \@onlypreamble \ctex_load_zhmap:n
+ \@onlypreamble \ctex_load_zhmap:nnnn
\tl_if_exist:NF \CJKfamilydefault
{ \tl_const:Nn \CJKfamilydefault { \CJKrmdefault } }
\tl_if_exist:NF \CJKrmdefault { \tl_new:N \CJKrmdefault }
@@ -160,6 +165,7 @@
\str_if_eq_x:nnF { \l__ctex_punct_tl } { quanjiao }
{ \punctstyle { \l__ctex_punct_tl } }
}
+\ctex_at_end_preamble:n { \ctex_update_default_family: }
\reverse_if:N \if_bool:N \g__ctex_zhmCJK_bool
\str_if_eq:onF { \l__ctex_encoding_tl } { UTF8 }
{
@@ -254,7 +260,6 @@
\group_end:
}
}
-\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