diff options
author | Karl Berry <karl@freefriends.org> | 2020-05-16 21:26:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-05-16 21:26:14 +0000 |
commit | bc3f8ae7a070c0635a7f6aa2febefcc6bd639677 (patch) | |
tree | 8c74427547bb691ef1dbe4a7edffa535251c4702 /Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def | |
parent | 74dfa355b56ae4ff3cde96e2b636198c15bcf1fc (diff) |
ctex (16may20)
git-svn-id: svn://tug.org/texlive/trunk@55162 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def index 24584de60d4..ea96488d56d 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def @@ -24,10 +24,10 @@ %% %% --------------------------------------------------------------------- %% -\GetIdInfo$Id: ctex.dtx 320df30 2020-05-02 06:45:05 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 4819efe 2020-05-16 21:20:43 +0800 Qing Lee <sobenlee@gmail.com> $ {Asian pTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-aptex.def} - {\ExplFileDate}{2.5.1}{\ExplFileDescription} + {\ExplFileDate}{2.5.2}{\ExplFileDescription} \cs_new_protected:Npn \ctex_set_zhmap:n { \tl_gput_right:Nx \g__ctex_zhmap_tl } \cs_new_protected:Npn \ctex_use_zhmap: @@ -42,15 +42,6 @@ } \tl_new:N \g__ctex_zhmap_tl \@onlypreamble \ctex_set_zhmap:n -\tl_if_exist:NF \CJKfamilydefault - { \tl_const:Nn \CJKfamilydefault { \CJKrmdefault } } -\tl_if_exist:NF \CJKrmdefault { \tl_const:Nn \CJKrmdefault { zhrm } } -\tl_if_exist:NF \CJKsfdefault { \tl_const:Nn \CJKsfdefault { zhsf } } -\tl_if_exist:NF \CJKttdefault { \tl_const:Nn \CJKttdefault { zhtt } } -\tl_set:Nn \kanjifamilydefault { \CJKfamilydefault } -\g@addto@macro \@rmfamilyhook { \kanjifamily { \CJKrmdefault } } -\g@addto@macro \@sffamilyhook { \kanjifamily { \CJKsfdefault } } -\g@addto@macro \@ttfamilyhook { \kanjifamily { \CJKttdefault } } \NewDocumentCommand \CJKfamily { m } { \kanjifamily {#1} \selectfont } \DeclareErrorKanjiFont {JY2}{zhrm}{m}{n}{10} @@ -59,8 +50,6 @@ \DeclareSymbolFont{mincho}{JY2}{zhrm}{m}{n} \SetSymbolFont{mincho}{bold}{JY2}{zhrm}{bx}{n} \jfam \symmincho -\ctex_at_end_preamble:n { \ctex_update_default_family: } -\normalfont \ctex_patch_cmd_once:NnnnTF \em { \ExplSyntaxOff } { \eminnershape \else \gtfamily \itshape } @@ -124,6 +113,32 @@ \@onlypreamble \ctex_set_upmap_unicode:nnn \@onlypreamble \ctex_set_upfonts:nnnnnn \RequirePackage { pxeverysel } +\cs_new_protected:Npn \ctex_provide_font_hook:NNN #1#2 + { + \exp_args:Nc \__ctex_provide_font_hook_aux:NNNN + { CTEX \cs_to_str:N #2 } #1#2 + } +\cs_new_protected:Npn \__ctex_provide_font_hook_aux:NNNN #1#2#3#4 + { + \tl_new:N #1 + \cs_if_exist:NTF #3 + { \tl_gput_right:Nn #3 {#1} } + { \ctex_patch_cmd:Nnn #2 {#4} { #1#4 } } + } +\ctex_provide_font_hook:NNN \rmfamily \@rmfamilyhook \selectfont +\ctex_provide_font_hook:NNN \sffamily \@sffamilyhook \selectfont +\ctex_provide_font_hook:NNN \ttfamily \@ttfamilyhook \selectfont +\tl_if_exist:NF \CJKfamilydefault + { \tl_const:Nn \CJKfamilydefault { \CJKrmdefault } } +\tl_if_exist:NF \CJKrmdefault { \tl_const:Nn \CJKrmdefault { zhrm } } +\tl_if_exist:NF \CJKsfdefault { \tl_const:Nn \CJKsfdefault { zhsf } } +\tl_if_exist:NF \CJKttdefault { \tl_const:Nn \CJKttdefault { zhtt } } +\tl_gput_right:Nn \CTEX@rmfamilyhook { \kanjifamily { \CJKrmdefault } } +\tl_gput_right:Nn \CTEX@sffamilyhook { \kanjifamily { \CJKsfdefault } } +\tl_gput_right:Nn \CTEX@ttfamilyhook { \kanjifamily { \CJKttdefault } } +\tl_gset:Nn \kanjifamilydefault { \CJKfamilydefault } +\normalfont +\ctex_at_end_preamble:n { \ctex_update_default_family: } \cs_new_protected:Npn \ctex_update_default_family: { \tl_if_eq:NNT \CJKfamilydefault \l__ctex_family_default_init_tl |