diff options
author | Karl Berry <karl@freefriends.org> | 2017-08-07 21:09:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-08-07 21:09:08 +0000 |
commit | 53fbec492a3c2c5abfb4a1cb183e2df23f8a928a (patch) | |
tree | 4359ad038f1461300047655f2c80fd7decdec33e /Master/texmf-dist/tex/latex/zhnumber | |
parent | fa02c7417cb6920fb203f2a7e4fe0365cebb54b0 (diff) |
zhnumber (7aug17)
git-svn-id: svn://tug.org/texlive/trunk@44977 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/zhnumber')
4 files changed, 33 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/latex/zhnumber/zhnumber-big5.cfg b/Master/texmf-dist/tex/latex/zhnumber/zhnumber-big5.cfg index e215fbf1aa0..8b2303be69f 100644 --- a/Master/texmf-dist/tex/latex/zhnumber/zhnumber-big5.cfg +++ b/Master/texmf-dist/tex/latex/zhnumber/zhnumber-big5.cfg @@ -6,7 +6,7 @@ %% %% zhnumber.dtx (with options: `config,big5') %% -%% Copyright (C) 2012, 2014-2016 by Qing Lee <sobenlee@gmail.com> +%% Copyright (C) 2012, 2014-2017 by Qing Lee <sobenlee@gmail.com> %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -25,10 +25,10 @@ %% %% -------------------------------------------------------------------------- %% -\GetIdInfo$Id: zhnumber.dtx e19bfb4 2016-05-14 12:23:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: zhnumber.dtx 858feab 2017-08-07 17:05:19 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese numerals with Big5 encoding} \ProvidesExplFile{\ExplFileName-big5.cfg} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.5}{\ExplFileDescription} \zhnum_set_digits_map:nn { minus } { t } \zhnum_set_digits_map:nn { 0 } { ¹s } \zhnum_set_digits_map:nn { null } { ¡³ } diff --git a/Master/texmf-dist/tex/latex/zhnumber/zhnumber-gbk.cfg b/Master/texmf-dist/tex/latex/zhnumber/zhnumber-gbk.cfg index c0b35fdd2d6..dd730781fbb 100644 --- a/Master/texmf-dist/tex/latex/zhnumber/zhnumber-gbk.cfg +++ b/Master/texmf-dist/tex/latex/zhnumber/zhnumber-gbk.cfg @@ -6,7 +6,7 @@ %% %% zhnumber.dtx (with options: `config,gbk') %% -%% Copyright (C) 2012, 2014-2016 by Qing Lee <sobenlee@gmail.com> +%% Copyright (C) 2012, 2014-2017 by Qing Lee <sobenlee@gmail.com> %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -25,10 +25,10 @@ %% %% -------------------------------------------------------------------------- %% -\GetIdInfo$Id: zhnumber.dtx e19bfb4 2016-05-14 12:23:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: zhnumber.dtx 858feab 2017-08-07 17:05:19 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese numerals with GBK encoding} \ProvidesExplFile{\ExplFileName-gbk.cfg} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.5}{\ExplFileDescription} \zhnum_set_digits_map:nnn { minus } { simp } { ¸º } \zhnum_set_digits_map:nnn { minus } { trad } { Ø“ } \zhnum_set_digits_map:nn { 0 } { Áã } diff --git a/Master/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg b/Master/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg index 59c223f1323..09c20e02986 100644 --- a/Master/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg +++ b/Master/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg @@ -6,7 +6,7 @@ %% %% zhnumber.dtx (with options: `config,utf8') %% -%% Copyright (C) 2012, 2014-2016 by Qing Lee <sobenlee@gmail.com> +%% Copyright (C) 2012, 2014-2017 by Qing Lee <sobenlee@gmail.com> %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -25,10 +25,10 @@ %% %% -------------------------------------------------------------------------- %% -\GetIdInfo$Id: zhnumber.dtx e19bfb4 2016-05-14 12:23:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: zhnumber.dtx 858feab 2017-08-07 17:05:19 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese numerals with UTF8 encoding} \ProvidesExplFile{\ExplFileName-utf8.cfg} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.5}{\ExplFileDescription} \zhnum_set_digits_map:nnn { minus } { simp } { è´Ÿ } \zhnum_set_digits_map:nnn { minus } { trad } { è² } \zhnum_set_digits_map:nn { 0 } { 零 } diff --git a/Master/texmf-dist/tex/latex/zhnumber/zhnumber.sty b/Master/texmf-dist/tex/latex/zhnumber/zhnumber.sty index 9a7b55f861c..9d558cb4bab 100644 --- a/Master/texmf-dist/tex/latex/zhnumber/zhnumber.sty +++ b/Master/texmf-dist/tex/latex/zhnumber/zhnumber.sty @@ -6,7 +6,7 @@ %% %% zhnumber.dtx (with options: `package') %% -%% Copyright (C) 2012, 2014-2016 by Qing Lee <sobenlee@gmail.com> +%% Copyright (C) 2012, 2014-2017 by Qing Lee <sobenlee@gmail.com> %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -27,10 +27,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: zhnumber.dtx e19bfb4 2016-05-14 12:23:34 +0800 Qing Lee <sobenlee@gmail.com> $ +\GetIdInfo$Id: zhnumber.dtx 858feab 2017-08-07 17:05:19 +0800 Qing Lee <sobenlee@gmail.com> $ {Typesetting numbers with Chinese glyphs} \ProvidesExplPackage{\ExplFileName} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.5}{\ExplFileDescription} \msg_new:nnn { zhnumber } { l3-too-old } { Support~package~'expl3'~too~old. \\\\ @@ -38,7 +38,7 @@ 'l3kernel'~and~'l3packages'\\\\ using~your~TeX~package~manager~or~from~CTAN. } -\@ifpackagelater { expl3 } { 2015/09/24 } { } +\@ifpackagelater { expl3 } { 2017/07/19 } { } { \msg_error:nn { zhnumber } { l3-too-old } } \RequirePackage { xparse , l3keys2e } \DeclareExpandableDocumentCommand \zhnumber { +o +m } @@ -260,27 +260,26 @@ \int_compare:nNnTF {#2} = \c_zero { \int_compare:nNnF { #1 * (#3#4) } = \c_zero { \c__zhnum_zero_tl } } { - \bool_if:nTF - { \l__zhnum_ancient_bool && \int_compare_p:nNn {#2} = \c_two } + \bool_lazy_and:nnTF + { \l__zhnum_ancient_bool } + { \int_compare_p:nNn {#2} = \c_two } { \zhnum_digit_map:n { #2 00 } } { \zhnum_digit_map:n {#2} \c__zhnum_hundred_tl } } \int_compare:nNnTF {#3} = \c_zero { \int_compare:nNnF { #2 * #4 } = \c_zero { \c__zhnum_zero_tl } } { - \bool_if:nF + \bool_lazy_all:nF { - \int_compare_p:nNn {#3} = \c_one && - \int_compare_p:nNn {#1#2} = \c_zero && #6 && #5 + { \int_compare_p:nNn {#3} = \c_one } + { \int_compare_p:nNn {#1#2} = \c_zero } + {#6} + {#5} } { - \bool_if:nTF - { - \l__zhnum_ancient_bool && - ( \int_compare_p:nNn {#3} = \c_two || - \int_compare_p:nNn {#3} = \c_three || - \int_compare_p:nNn {#3} = \c_four ) - } + \bool_lazy_and:nnTF + { \l__zhnum_ancient_bool } + { \int_compare_p:n { \c_one < #3 < \c_five } } { \zhnum_digit_map:n { #3 0 } \use_none:n } { \zhnum_digit_map:n {#3} } } @@ -786,19 +785,17 @@ } \cs_new_protected:Npn \zhnum_input_cfg:n #1 { - \file_if_exist_input:nTF { zhnumber - #1 .cfg } + \file_if_exist:nTF { zhnumber - #1 .cfg } { \bool_set_false:N \l__zhnum_reset_bool \__zhnum_update_cfg_prop:N \__zhnum_prop_initial:Nn \group_begin: \zhnum_set_catcode: + \file_input:n { zhnumber - #1 .cfg } + \__zhnum_update_cfg_prop:N \__zhnum_prop_gset_eq:Nn + \group_end: } - { - \msg_error:nnx { zhnumber } { file-not-found } {#1} - \use_none:nnn - } - \__zhnum_update_cfg_prop:N \__zhnum_prop_gset_eq:Nn - \group_end: + { \msg_error:nnx { zhnumber } { file-not-found } {#1} } } \cs_new_protected:Npn \__zhnum_update_cfg_prop:N #1 { @@ -823,11 +820,11 @@ The~requested~file~could~not~be~found~in~the~current~directory,~ in~the~TeX~search~path~or~in~the~LaTeX~search~path. } -\bool_if:nTF +\bool_lazy_any:nTF { - \sys_if_engine_xetex_p: || - \sys_if_engine_luatex_p: || - \sys_if_engine_uptex_p: + { \sys_if_engine_xetex_p: } + { \sys_if_engine_luatex_p: } + { \sys_if_engine_uptex_p: } } { \cs_new_eq:NN \zhnum_if_unicode_engine_p: \c_true_bool |