diff options
author | Karl Berry <karl@freefriends.org> | 2020-05-02 22:24:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-05-02 22:24:14 +0000 |
commit | 15f0c94913f0d5cb24dd909c5358b3a997994dd7 (patch) | |
tree | 9043df32cd0199835f5b3f9804ad132907857139 /Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def | |
parent | 151fbc4b66cb3705f6ce20368a2c6f7c06b8d57d (diff) |
ctex (2may20)
git-svn-id: svn://tug.org/texlive/trunk@54976 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def | 96 |
1 files changed, 31 insertions, 65 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def index 3b3752a9bca..26435410903 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def @@ -6,9 +6,9 @@ %% %% ctex.dtx (with options: `xetex') %% -%% Copyright (C) 2003--2019 +%% Copyright (C) 2003--2020 %% CTEX.ORG and any individual authors listed in the documentation. -%% ------------------------------------------------------------------------------ +%% --------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -20,16 +20,14 @@ %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. %% -%% This work has the LPPL maintenance status `maintained'. +%% This work has the LPPL maintenance status "maintained". %% -%% The Current Maintainers of this work are Leo Liu, Qing Lee and Liam Huang. +%% --------------------------------------------------------------------- %% -%% ------------------------------------------------------------------------------ -%% -\GetIdInfo$Id: ctex.dtx 735dfe2 2019-05-29 21:42:29 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 320df30 2020-05-02 06:45:05 +0800 Qing Lee <sobenlee@gmail.com> $ {XeLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-xetex.def} - {\ExplFileDate}{2.4.16}{\ExplFileDescription} + {\ExplFileDate}{2.5.1}{\ExplFileDescription} \RequirePackage { xeCJK } \exp_args:Nx \xeCJKsetup { @@ -38,67 +36,31 @@ } \@ifpackagelater { fontspec } { 2014/05/25 } { } { \msg_error:nnn { ctex } { package-too-old } { fontspec } } -\cs_new_protected_nopar:Npn \ctex_detected_platform: +\ctex_hypersetup:n { pdfencoding = unicode } +\ctex_at_end_package:nn { xeCJKfntef } { - \file_if_exist:nTF { /dev/null } + \@ifpackagelater { xeCJKfntef } { 2014/11/04 } { - \file_if_exist:nTF { nul: } - { - \file_if_exist:nTF { \c__ctex_upper_case_file_str } - { \ctex_if_macosx:TF { mac } { windows } } - { \ctex_if_macosx:TF { mac } { fandol } } - } - { \ctex_if_macosx:TF { mac } { fandol } } + \cs_new_protected:Npn \__ctex_clear_fntef_color:n #1 + { \xeCJKsetup { #1 / format = { } } } } - { \tl_gset:Nn \g__ctex_fontset_tl { windows } } - } -\str_const:Nx \c__ctex_upper_case_file_str - { \exp_args:No \str_upper_case:n { \g_file_curr_name_str } } -\cs_new_protected_nopar:Npn \ctex_if_macosx:TF #1#2 - { - \file_if_exist:nTF { \c__ctex_macosx_file_str } - { \tl_gset:Nn \g__ctex_fontset_tl {#1} } - { \tl_gset:Nn \g__ctex_fontset_tl {#2} } - } -\str_const:Nn \c__ctex_macosx_file_str { /Library/Fonts/Songti.ttc } -\ctex_hypersetup:n { pdfencoding = unicode } -\RequirePackage { xeCJKfntef } -\@ifpackagelater { xeCJKfntef } { 2014/11/04 } - { - \cs_new_protected_nopar:Npn \__ctex_clear_fntef_color:n #1 - { \xeCJKsetup { #1 / format = { } } } - } - { - \cs_new_protected_nopar:Npn \__ctex_clear_fntef_color:n #1 - { \tl_clear:c { CJK#1color } } - } -\clist_map_inline:nn - { underdot , underline , underdblline , underwave , sout , xout } - { - \__ctex_clear_fntef_color:n {#1} - \cs_new_protected_nopar:cpx { CTEX#1 } { - \msg_warning:nnnn { ctex } { deprecated-command } { \exp_not:c { CTEX#1 } } - { You~ can~ use~ the~ command~ with~ prefix~ \exp_not:N \CJK~ instead. } - \exp_not:c { CJK#1 } + \cs_new_protected:Npn \__ctex_clear_fntef_color:n #1 + { \tl_clear:c { CJK#1color } } } + \clist_map_inline:nn + { underdot , underline , underdblline , underwave , sout , xout } + { \__ctex_clear_fntef_color:n {#1} } } -\cs_new_protected_nopar:Npn { \CTEXfilltwosides } - { - \msg_warning:nnnn { ctex } { deprecated-environment } { CTEXfilltwosides } - { You~ can~ use~ `CJKfilltwosides'~ environment~ instead. } - \CJKfilltwosides - } -\cs_new_protected_nopar:Npn { \endCTEXfilltwosides } { \endCJKfilltwosides } -\cs_new_protected_nopar:Npn \ctex_update_ccwd: +\cs_new_protected:Npn \ctex_update_ccwd: { \hbox_set:Nn \l__ctex_tmp_box { \CJKglue } \dim_set:Nn \ccwd { \box_wd:N \l__ctex_tmp_box + \f@size \p@ } } \dim_new:N \ccwd -\cs_new_protected_nopar:Npn \ctex_update_ccglue: +\cs_new_protected:Npn \ctex_update_ccglue: { - \cs_set_protected_nopar:Npn \CJKglue + \cs_set_protected:Npn \CJKglue { \skip_horizontal:N \l__ctex_ccglue_skip } } \skip_new:N \l__ctex_ccglue_skip @@ -108,11 +70,11 @@ \prg_return_false: \else: \prg_return_true: \fi: } \ctex_at_end:n { \cs_new_eq:NN \__ctex_ccglue: \CJKglue } -\cs_new_protected_nopar:Npn \ctex_update_em_unit: +\cs_new_protected:Npn \ctex_update_em_unit: { \dim_set:Nn \ccwd { \f@size \p@ } } \cs_new_protected:Npn \ctex_add_to_selectfont:n #1 { - \cs_set_protected_nopar:Npx \CTEX@selectfont@hook + \cs_set_protected:Npx \CTEX@selectfont@hook { \exp_not:o { \CTEX@selectfont@hook #1 } } } \cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: @@ -122,10 +84,15 @@ { \tl_set:Nn \l__ctex_tmp_tl {#1} \cs_new_eq:NN \CTEX@selectfont@save #1 - \cs_new_protected_nopar:Npn \__ctex_restore_selectfont: + \cs_new_protected:Npn \__ctex_restore_selectfont: { + \cs_if_free:NF \scr@new@selectfont + { + \cs_set_eq:NN \scr@new@selectfont #1 + \cs_set_eq:NN \CTEX@selectfont@save \scr@selectfont + } \tl_put_left:Nn \@EverySelectfont@Init - { \let #1 \CTEX@selectfont@save } + { \cs_set_eq:NN #1 \CTEX@selectfont@save } \cs_undefine:N \__ctex_restore_selectfont: } } @@ -139,7 +106,7 @@ { \ctex_patch_failure:N \selectfont } \fi: \EverySelectfont { \CTEX@selectfont@hook } -\keys_define:nn { ctex } +\ctex_define:n { space .choice: , space / true .code:n = @@ -151,16 +118,15 @@ space .default:n = { true } , space .initial:n = { auto } } -\keys_define:nn { ctex } +\ctex_define:n { punct .code:n = { - \tl_set:Nx \l__ctex_punct_tl { #1 } + \tl_set:Nx \l__ctex_punct_tl {#1} \xeCJKsetup { PunctStyle = \l__ctex_punct_tl } } , punct .default:n = { quanjiao } , } -\tl_set:Nn \l__ctex_encoding_tl { UTF8 } %% %% %% End of file `ctex-engine-xetex.def'. |