diff options
author | Karl Berry <karl@freefriends.org> | 2019-04-07 21:22:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-04-07 21:22:23 +0000 |
commit | fc7eee8c175b307abf9396aed71c1d49bd1c0fe4 (patch) | |
tree | 6173e8f922c539a792fcbde24e58cb8db06dd5e2 /Master/texmf-dist/tex/latex/ctex/ctex.sty | |
parent | bb3a18a8791a2f32a6c8a3e0c9ee15a643aefd89 (diff) |
ctex (7apr19)
git-svn-id: svn://tug.org/texlive/trunk@50843 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/ctex.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/ctex/ctex.sty | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex.sty b/Master/texmf-dist/tex/latex/ctex/ctex.sty index a5947bb6999..699ceb748fa 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctex.sty @@ -6,7 +6,7 @@ %% %% ctex.dtx (with options: `style,ctex') %% -%% Copyright (C) 2003--2018 +%% Copyright (C) 2003--2019 %% CTEX.ORG and any individual authors listed in the documentation. %% ------------------------------------------------------------------------------ %% @@ -28,10 +28,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: ctex.dtx 096f319 2018-05-02 19:51:41 +0800 Liam Huang <liamhuang0205@gmail.com> $ +\GetIdInfo$Id: ctex.dtx cb8bf3c 2019-04-07 23:32:09 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese adapter in LaTeX (CTEX)} \ProvidesExplPackage{\ExplFileName} - {\ExplFileDate}{2.4.14}{\ExplFileDescription} + {\ExplFileDate}{2.4.15}{\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 } @@ -54,7 +54,7 @@ `l3kernel'~and~`l3packages'\\\\ using~your~TeX~package~manager~or~from~CTAN. } -\@ifpackagelater { expl3 } { 2017/12/16 } { } +\@ifpackagelater { expl3 } { 2019/03/05 } { } { \msg_error:nnn { ctex } { l3-too-old } { expl3 } } \str_const:Nx \c__ctex_engine_str { \cs_if_exist:NTF \ngostype { aptex } { \c_sys_engine_str } } @@ -105,7 +105,8 @@ { } } \cs_generate_variant:Nn \ctex_scheme_input:n { o } -\cs_new_eq:NN \g__ctex_section_depth_flag \c_two +\int_new:N \g__ctex_section_depth_int +\int_gset:Nn \g__ctex_section_depth_int { 2 } \msg_new:nnnn { ctex } { package-too-old } { Support~package~`#1'~too~old. } { @@ -127,7 +128,7 @@ \cs_new:Npn \ctex_default_pt:n #1 { \exp_after:wN \__ctex_default_pt:w - \dim_use:N \etex_dimexpr:D #1 pt \scan_stop: \q_stop + \dim_use:N \tex_dimexpr:D #1 pt \scan_stop: \q_stop } \use:x { @@ -153,15 +154,15 @@ { Command~ #1 is~ deprecated.\\ #2 } \msg_new:nnn { ctex } { deprecated-environment } { Environment~ `#1'~ is~ deprecated.\\ #2 } -\int_new:N \g__ctex_font_size_flag -\int_set:Nn \g__ctex_font_size_flag { -1 } +\int_new:N \g__ctex_font_size_int +\int_set:Nn \g__ctex_font_size_int { -1 } \keys_define:nn { ctex / option } { zihao .choice: , zihao .value_required:n = true , - zihao / 5 .code:n = { \cs_gset_eq:NN \g__ctex_font_size_flag \c_zero } , - zihao / -4 .code:n = { \cs_gset_eq:NN \g__ctex_font_size_flag \c_one } , - zihao / false .code:n = { \cs_gset_eq:NN \g__ctex_font_size_flag \c_two } , + zihao / 5 .code:n = { \int_gset:Nn \g__ctex_font_size_int { 0 } } , + zihao / -4 .code:n = { \int_gset:Nn \g__ctex_font_size_int { 1 } } , + zihao / false .code:n = { \int_gset:Nn \g__ctex_font_size_int { 2 } } , c5size .code:n = { \msg_warning:nnn { ctex } { deprecated-option } @@ -301,9 +302,9 @@ nospace .value_forbidden:n = true , heading .bool_set:N = \l__ctex_heading_bool , sub3section .code:n = - { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_three } , + { \int_gset:Nn \g__ctex_section_depth_int { 3 } } , sub4section .code:n = - { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_four } , + { \int_gset:Nn \g__ctex_section_depth_int { 4 } } , sub3section .value_forbidden:n = true , sub4section .value_forbidden:n = true , scheme .tl_set:N = \l__ctex_scheme_tl , @@ -356,7 +357,7 @@ \tl_put_right:Nn \l__ctex_tmp_tl { #1 .code:n = - { \cs_gset_eq:NN \g__ctex_font_size_flag \c_two } , + { \int_gset:Nn \g__ctex_font_size_int { 2 } } , #1 .value_forbidden:n = true , } } @@ -442,7 +443,7 @@ { \ctex_update_ccwd: } { \dim_set:Nn \l__ctex_tmp_dim - { \baselinestretch \etex_glueexpr:D \f@baselineskip \scan_stop: } + { \baselinestretch \tex_glueexpr:D \f@baselineskip \scan_stop: } \skip_set:Nn \l__ctex_ccglue_skip { \c_zero_dim plus .08 \l__ctex_tmp_dim } \ctex_update_ccglue: @@ -450,9 +451,9 @@ } { \int_set:Nn \l__ctex_tmp_int - { \etex_dimexpr:D \linewidth - \ccwd - \l__ctex_tmp_dim \scan_stop: } + { \tex_dimexpr:D \linewidth - \ccwd - \l__ctex_tmp_dim \scan_stop: } \tex_divide:D \l__ctex_tmp_int \ccwd - \int_compare:nNnTF \l__ctex_tmp_int > \c_zero + \int_compare:nNnTF \l__ctex_tmp_int > \c_zero_int { \skip_set:Nn \l__ctex_ccglue_skip { @@ -496,15 +497,15 @@ \dim_sub:Nn \l__ctex_tmp_dim { \l__ctex_tmp_int \ccwd } \dim_compare:nNnF \parindent = \c_zero_dim { - \int_compare:nNnF \l__ctex_tmp_int < \c_three - { \int_sub:Nn \l__ctex_tmp_int { \c_two } } + \int_compare:nNnF \l__ctex_tmp_int < 3 + { \int_sub:Nn \l__ctex_tmp_int { 2 } } } \skip_set:Nn \l__ctex_ccglue_skip { \l__ctex_ziju_dim plus \dim_eval:n { \l__ctex_tmp_dim / \l__ctex_tmp_int } minus \dim_min:nn { \dim_abs:n { \l__ctex_ziju_dim } } - { ( \ccwd - \l__ctex_tmp_dim ) / ( \l__ctex_tmp_int + \c_one ) } + { ( \ccwd - \l__ctex_tmp_dim ) / ( \l__ctex_tmp_int + 1 ) } } } { \skip_set:Nn \l__ctex_ccglue_skip { \l__ctex_ziju_dim } } @@ -662,7 +663,7 @@ \prop_gput:Nnn \exp_not:N \c__ctex_font_size_prop {#1} { { \dim_to_decimal:n {#2} } - { \dim_to_decimal:n { (#2) * \c_six / \c_five } } + { \dim_to_decimal:n { (#2) * 6 / 5 } } } } \seq_gput_right:Nn \c__ctex_font_size_seq {#1} @@ -730,7 +731,7 @@ } \cs_new_protected:Npn \__ctex_set_font_size:nnNn #1#2#3#4 { \cs_set_protected_nopar:Npn #3 { \@setfontsize #3 {#1} {#2} #4 } } -\if_case:w \g__ctex_font_size_flag +\if_case:w \g__ctex_font_size_int \ctex_file_input:n { ctex-c5size.clo } \or: \ctex_file_input:n { ctex-cs4size.clo } @@ -792,7 +793,7 @@ { \ctex_if_preamble:TF { - \str_if_eq_x:nnTF {#1} { none } + \str_if_eq:eeTF {#1} { none } { \msg_warning:nnn { ctex } { invalid-value } {#1} } { \str_if_eq:onTF { \g__ctex_fontset_tl } { none } @@ -868,6 +869,12 @@ %% c70rm.fd, %% c70sf.fd, %% c70tt.fd, +%% jy2zhrm.fd, +%% jy2zhsf.fd, +%% jy2zhtt.fd, +%% jt2zhrm.fd, +%% jt2zhsf.fd, +%% jt2zhtt.fd, %% ctex-fontset-windows.def, %% ctex-fontset-windowsnew.def, %% ctex-fontset-windowsold.def, |