From 53fbec492a3c2c5abfb4a1cb183e2df23f8a928a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 7 Aug 2017 21:09:08 +0000 Subject: zhnumber (7aug17) git-svn-id: svn://tug.org/texlive/trunk@44977 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/zhnumber/README.md | 2 +- Master/texmf-dist/doc/latex/zhnumber/zhnumber.pdf | Bin 290451 -> 275344 bytes .../texmf-dist/source/latex/zhnumber/zhnumber.dtx | 55 ++++++++++----------- .../texmf-dist/source/latex/zhnumber/zhnumber.ins | 4 +- .../tex/latex/zhnumber/zhnumber-big5.cfg | 6 +-- .../texmf-dist/tex/latex/zhnumber/zhnumber-gbk.cfg | 6 +-- .../tex/latex/zhnumber/zhnumber-utf8.cfg | 6 +-- Master/texmf-dist/tex/latex/zhnumber/zhnumber.sty | 51 +++++++++---------- 8 files changed, 62 insertions(+), 68 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/zhnumber/README.md b/Master/texmf-dist/doc/latex/zhnumber/README.md index 5304e7eef81..412cc2beb54 100644 --- a/Master/texmf-dist/doc/latex/zhnumber/README.md +++ b/Master/texmf-dist/doc/latex/zhnumber/README.md @@ -38,7 +38,7 @@ Issues and pull requests are welcome. Copyright and Licence --------------------- - Copyright (C) 2012, 2014-2016 by Qing Lee + Copyright (C) 2012, 2014-2017 by Qing Lee ---------------------------------------------------------------------- This work may be distributed and/or modified under the diff --git a/Master/texmf-dist/doc/latex/zhnumber/zhnumber.pdf b/Master/texmf-dist/doc/latex/zhnumber/zhnumber.pdf index c65011bcacc..f123ff17510 100644 Binary files a/Master/texmf-dist/doc/latex/zhnumber/zhnumber.pdf and b/Master/texmf-dist/doc/latex/zhnumber/zhnumber.pdf differ diff --git a/Master/texmf-dist/source/latex/zhnumber/zhnumber.dtx b/Master/texmf-dist/source/latex/zhnumber/zhnumber.dtx index 8a9fa8d53bf..19774b691d6 100644 --- a/Master/texmf-dist/source/latex/zhnumber/zhnumber.dtx +++ b/Master/texmf-dist/source/latex/zhnumber/zhnumber.dtx @@ -44,7 +44,7 @@ Issues and pull requests are welcome. Copyright and Licence --------------------- - Copyright (C) 2012, 2014-2016 by Qing Lee + Copyright (C) 2012, 2014-2017 by Qing Lee ---------------------------------------------------------------------- This work may be distributed and/or modified under the @@ -83,7 +83,7 @@ Copyright and Licence \preamble - Copyright (C) 2012, 2014-2016 by Qing Lee + Copyright (C) 2012, 2014-2017 by Qing Lee -------------------------------------------------------------------------- This work may be distributed and/or modified under the @@ -141,7 +141,7 @@ Copyright and Licence % %\NeedsTeXFormat{LaTeX2e} %\RequirePackage{expl3} -%<+package|config>\GetIdInfo$Id$ +%<+package|config>\GetIdInfo$Id: zhnumber.dtx 858feab 2017-08-07 17:05:19 +0800 Qing Lee $ % {Typesetting numbers with Chinese glyphs} % {Chinese numerals with UTF8 encoding} % {Chinese numerals with Big5 encoding} @@ -150,7 +150,7 @@ Copyright and Licence %\ProvidesExplFile{\ExplFileName-utf8.cfg} %\ProvidesExplFile{\ExplFileName-big5.cfg} %\ProvidesExplFile{\ExplFileName-gbk.cfg} -% {\ExplFileDate}{2.4}{\ExplFileDescription} +% {\ExplFileDate}{2.5}{\ExplFileDescription} %<*driver> \documentclass{ctxdoc} \begin{document} @@ -161,7 +161,7 @@ Copyright and Licence % % \fi % -% \CheckSum{1219} +% \CheckSum{1216} % \GetFileId{zhnumber.sty} % % \title{\bfseries\pkg{zhnumber} 宏包} @@ -499,7 +499,7 @@ Copyright and Licence '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 } } % \end{macrocode} % @@ -848,27 +848,26 @@ Copyright and Licence \int_compare:nNnTF {#2} = \c_zero { \int_compare:nNnF { #1 * (#3#4) } = \c_zero { \c_@@_zero_tl } } { - \bool_if:nTF - { \l_@@_ancient_bool && \int_compare_p:nNn {#2} = \c_two } + \bool_lazy_and:nnTF + { \l_@@_ancient_bool } + { \int_compare_p:nNn {#2} = \c_two } { \zhnum_digit_map:n { #2 00 } } { \zhnum_digit_map:n {#2} \c_@@_hundred_tl } } \int_compare:nNnTF {#3} = \c_zero { \int_compare:nNnF { #2 * #4 } = \c_zero { \c_@@_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_@@_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_@@_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} } } @@ -1599,19 +1598,17 @@ Copyright and Licence } \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_@@_reset_bool \@@_update_cfg_prop:N \@@_prop_initial:Nn \group_begin: \zhnum_set_catcode: + \file_input:n { zhnumber - #1 .cfg } + \@@_update_cfg_prop:N \@@_prop_gset_eq:Nn + \group_end: } - { - \msg_error:nnx { zhnumber } { file-not-found } {#1} - \use_none:nnn - } - \@@_update_cfg_prop:N \@@_prop_gset_eq:Nn - \group_end: + { \msg_error:nnx { zhnumber } { file-not-found } {#1} } } \cs_new_protected:Npn \@@_update_cfg_prop:N #1 { @@ -1643,11 +1640,11 @@ Copyright and Licence % 使用 \upTeX{} 的时候,也不必将汉字的首字符设置为活动字符。判断 |^^^^0021| 是否为 % 单个记号的办法对 \upTeX{} 不适用。 % \begin{macrocode} -\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 diff --git a/Master/texmf-dist/source/latex/zhnumber/zhnumber.ins b/Master/texmf-dist/source/latex/zhnumber/zhnumber.ins index 42ac251c79f..7332dac6397 100644 --- a/Master/texmf-dist/source/latex/zhnumber/zhnumber.ins +++ b/Master/texmf-dist/source/latex/zhnumber/zhnumber.ins @@ -6,7 +6,7 @@ %% %% zhnumber.dtx (with options: `install') %% -%% Copyright (C) 2012, 2014-2016 by Qing Lee +%% Copyright (C) 2012, 2014-2017 by Qing Lee %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -30,7 +30,7 @@ \preamble - Copyright (C) 2012, 2014-2016 by Qing Lee + Copyright (C) 2012, 2014-2017 by Qing Lee -------------------------------------------------------------------------- This work may be distributed and/or modified under the 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 +%% Copyright (C) 2012, 2014-2017 by Qing Lee %% -------------------------------------------------------------------------- %% %% 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 $ +\GetIdInfo$Id: zhnumber.dtx 858feab 2017-08-07 17:05:19 +0800 Qing Lee $ {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 +%% Copyright (C) 2012, 2014-2017 by Qing Lee %% -------------------------------------------------------------------------- %% %% 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 $ +\GetIdInfo$Id: zhnumber.dtx 858feab 2017-08-07 17:05:19 +0800 Qing Lee $ {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 +%% Copyright (C) 2012, 2014-2017 by Qing Lee %% -------------------------------------------------------------------------- %% %% 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 $ +\GetIdInfo$Id: zhnumber.dtx 858feab 2017-08-07 17:05:19 +0800 Qing Lee $ {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 +%% Copyright (C) 2012, 2014-2017 by Qing Lee %% -------------------------------------------------------------------------- %% %% 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 $ +\GetIdInfo$Id: zhnumber.dtx 858feab 2017-08-07 17:05:19 +0800 Qing Lee $ {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 -- cgit v1.2.3