diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/ctex.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/ctex/ctex.sty | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex.sty b/Master/texmf-dist/tex/latex/ctex/ctex.sty index 699ceb748fa..14134e13433 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctex.sty @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx cb8bf3c 2019-04-07 23:32:09 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: ctex.dtx 735dfe2 2019-05-29 21:42:29 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter in LaTeX (CTEX)} \ProvidesExplPackage{\ExplFileName} - {\ExplFileDate}{2.4.15}{\ExplFileDescription} + {\ExplFileDate}{2.4.16}{\ExplFileDescription} \tl_const:Nx \c__ctex_version_tl { \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } } \msg_new:nnnn { ctex } { subpackage-loaded } @@ -118,24 +118,17 @@ { \cs_new_eq:NN \ifctexpdf \if_false: } \cs_new_eq:NN \ctex_if_preamble:TF \use_i:nn \ctex_after_end_preamble:n { \cs_set_eq:NN \ctex_if_preamble:TF \use_ii:nn } -\cs_new:Npn \ctex_set_default_ccwd:Nn #1#2 +\cs_new_protected:Npn \ctex_set_default_ccwd:Nn #1#2 + { \tl_set:Nx #1 { \__ctex_default_ccwd_aux:n {#2} } } +\cs_new:Npn \__ctex_default_ccwd_aux:n #1 { - \dim_compare:nNnTF - { \ctex_default_pt:n {#2} } = { \ctex_default_pt:n { #2 ~ mm } } - { \tl_set:Nn #1 {#2} } - { \tl_set:Nn #1 { #2 \ccwd } } - } -\cs_new:Npn \ctex_default_pt:n #1 - { - \exp_after:wN \__ctex_default_pt:w + \exp_not:n {#1} + \exp_after:wN \__ctex_default_ccwd_aux:w \dim_use:N \tex_dimexpr:D #1 pt \scan_stop: \q_stop } -\use:x - { - \cs_new:Npn \exp_not:N \__ctex_default_pt:w - ##1 \tl_to_str:n { pt } ##2 \exp_not:N \q_stop - { ##1 \tl_to_str:n { pt } } - } +\exp_last_unbraced:NNNNo + \cs_new:Npn \__ctex_default_ccwd_aux:w #1 { \tl_to_str:n { pt } } #2 \q_stop + { \tl_if_empty:nT {#2} { \ccwd } } \tl_new:N \l__ctex_encoding_tl \tl_set:Nx \l__ctex_encoding_tl { \sys_if_engine_pdftex:TF { GBK } { UTF8 } } |