From eff1c7554f6af49ce3d63fff7f6fa810490214a9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 1 May 2020 21:28:49 +0000 Subject: zhnumber (1may20) git-svn-id: svn://tug.org/texlive/trunk@54960 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/zhnumber/README.md | 4 +- Master/texmf-dist/doc/latex/zhnumber/zhnumber.pdf | Bin 270690 -> 271657 bytes .../texmf-dist/source/latex/zhnumber/zhnumber.dtx | 68 +++++++++++---------- .../texmf-dist/source/latex/zhnumber/zhnumber.ins | 18 +++--- .../tex/latex/zhnumber/zhnumber-big5.cfg | 8 +-- .../texmf-dist/tex/latex/zhnumber/zhnumber-gbk.cfg | 11 ++-- .../tex/latex/zhnumber/zhnumber-utf8.cfg | 11 ++-- Master/texmf-dist/tex/latex/zhnumber/zhnumber.sty | 42 ++++++------- 8 files changed, 83 insertions(+), 79 deletions(-) diff --git a/Master/texmf-dist/doc/latex/zhnumber/README.md b/Master/texmf-dist/doc/latex/zhnumber/README.md index a8ac1b7a7c9..48cd3d5733f 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-2019 by Qing Lee + Copyright (C) 2012, 2014-2020 by Qing Lee ---------------------------------------------------------------------- This work may be distributed and/or modified under the @@ -51,7 +51,7 @@ Copyright and Licence 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 Maintainer of this work is Qing Lee. diff --git a/Master/texmf-dist/doc/latex/zhnumber/zhnumber.pdf b/Master/texmf-dist/doc/latex/zhnumber/zhnumber.pdf index 7a3936c5ff7..3010ea379da 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 05472f8fd14..d5ed4bdd22b 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-2019 by Qing Lee + Copyright (C) 2012, 2014-2020 by Qing Lee ---------------------------------------------------------------------- This work may be distributed and/or modified under the @@ -57,7 +57,7 @@ Copyright and Licence 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 Maintainer of this work is Qing Lee. @@ -83,7 +83,7 @@ Copyright and Licence \preamble - Copyright (C) 2012, 2014-2019 by Qing Lee + Copyright (C) 2012, 2014-2020 by Qing Lee -------------------------------------------------------------------------- This work may be distributed and/or modified under the @@ -96,7 +96,7 @@ Copyright and Licence 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 Maintainer of this work is Qing Lee. @@ -120,18 +120,18 @@ Copyright and Licence % %<*internal> \usedir{source/latex/zhnumber} - \file{zhnumber.ins} {\from{\jobname.dtx}{install}} + \file{zhnumber.ins} {\from{\jobname.dtx}{install}} % %<*install> \usedir{tex/latex/zhnumber} - \file{zhnumber.sty} {\from{\jobname.dtx}{package}} + \file{zhnumber.sty} {\from{\jobname.dtx}{package}} \usedir{tex/latex/zhnumber/config} - \file{zhnumber-utf8.cfg} {\from{\jobname.dtx}{config,utf8}} - \file{zhnumber-big5.cfg} {\from{\jobname.dtx}{config,big5}} - \file{zhnumber-gbk.cfg} {\from{\jobname.dtx}{config,gbk}} + \file{zhnumber-utf8.cfg} {\from{\jobname.dtx}{config,utf8}} + \ctxfile{Big5}{zhnumber-big5.cfg} {\from{\jobname.dtx}{config,big5}} + \ctxfile{GBK}{zhnumber-gbk.cfg} {\from{\jobname.dtx}{config,gbk}} \nopreamble\nopostamble \usedir{doc/latex/zhnumber} - \file{README.md} {\from{\jobname.dtx}{readme}} + \file{README.md} {\from{\jobname.dtx}{readme}} } \endbatchfile @@ -141,7 +141,7 @@ Copyright and Licence % %\NeedsTeXFormat{LaTeX2e} %\RequirePackage{expl3} -%<+package|config>\GetIdInfo$Id: zhnumber.dtx 311c61d 2019-04-07 23:29:51 +0800 Qing Lee $ +%<+package|config>\GetIdInfo$Id: zhnumber.dtx c4664c6 2020-05-01 21:10:24 +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.7}{\ExplFileDescription} +% {\ExplFileDate}{2.8}{\ExplFileDescription} %<*driver> \documentclass{ctxdoc} \begin{document} @@ -161,7 +161,7 @@ Copyright and Licence % % \fi % -% \CheckSum{1186} +% \CheckSum{1189} % \GetFileId{zhnumber.sty} % % \title{\bfseries\pkg{zhnumber} 宏包} @@ -400,7 +400,7 @@ Copyright and Licence % \begin{syntax} % null = <\TFF> % \end{syntax} -% 缺省状态下,除了 \tn{zhdigits} 外,其它的格式转换命令,将 0 映射成零,如果需要将 0 映射 +% 缺省状态下,除了 \tn{zhdigits} 外,其他的格式转换命令,将 0 映射成零,如果需要将 0 映射 % 成〇,可以使用这个选项。 % \end{function} % @@ -437,7 +437,7 @@ Copyright and Licence % 其中 |-| 设置负,|-0| 设置〇,|dot| 设置小数的点,|and| 和 |parts| 分别设置分数 % 的“又”和“分之”,|E|$n$ 设置 $10^n$,|F|$n$ 设置数字 $n$ 的大写,|T|$n$ 设置 % 数字 $n$ 的天干,|D|$n$ 设置数字 $n$ 的地支,而 |GZ|$n$ 设置数字 $n$ 的干支。 -% 其它的选项同字面意思,不再赘述。例如 +% 其他的选项同字面意思,不再赘述。例如 % \begin{verbatim}[frame=single] % \zhnumsetup{2={两}} % \end{verbatim} @@ -664,7 +664,7 @@ Copyright and Licence % \begin{macro}[int]{\@zhnum} % 用于支持 |\pagenumbering{zhnum}|。 % \begin{macrocode} -\cs_new_nopar:Npn \@zhnum { \zhnum_int:n } +\cs_new:Npn \@zhnum { \zhnum_int:n } % \end{macrocode} % \end{macro} % @@ -906,7 +906,7 @@ Copyright and Licence % \begin{macro}[int]{\@zhdig} % 用于支持 |\pagenumbering{zhdig}|。 % \begin{macrocode} -\cs_new_nopar:Npn \@zhdig #1 { \zhnum_digits_null:f { \int_eval:n {#1} } } +\cs_new:Npn \@zhdig #1 { \zhnum_digits_null:f { \int_eval:n {#1} } } % \end{macrocode} % \end{macro} % @@ -933,9 +933,9 @@ Copyright and Licence % \begin{macro}[int]{\zhnum_digits_zero:n,\zhnum_digits_null:n} % 快捷方式。 % \begin{macrocode} -\cs_new_nopar:Npn \zhnum_digits_zero:n +\cs_new:Npn \zhnum_digits_zero:n { \zhnum_digits:Nn \BooleanTrue } -\cs_new_nopar:Npn \zhnum_digits_null:n +\cs_new:Npn \zhnum_digits_null:n { \zhnum_digits:Nn \BooleanFalse } \cs_generate_variant:Nn \zhnum_digits_null:n { V , v , f } % \end{macrocode} @@ -1012,14 +1012,14 @@ Copyright and Licence % \begin{macro}{\zhtoday} % 输出当天日期。 % \begin{macrocode} -\cs_new_nopar:Npn \zhtoday +\cs_new:Npn \zhtoday { \@@_date_aux:Vnn \tex_year:D \tex_month:D \tex_day:D } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_date_aux:nnn} % \begin{macrocode} -\cs_new_nopar:Npn \@@_date_aux:nnn +\cs_new:Npn \@@_date_aux:nnn { \bool_if:NTF \l_@@_time_bool { \@@_date_aux:NNnnnn \zhnum_digits_null:n \zhnum_int:n { } } @@ -1152,7 +1152,7 @@ Copyright and Licence % \begin{macro}{\zhcurrtime} % 输出当前时间。 % \begin{macrocode} -\cs_new_nopar:Npn \zhcurrtime +\cs_new:Npn \zhcurrtime { \@@_time_aux:nn { \int_div_truncate:nn \tex_time:D { 60 } } @@ -1163,7 +1163,7 @@ Copyright and Licence % % \begin{macro}{\@@_time_aux:nn,\@@_time_aux:Nnnn} % \begin{macrocode} -\cs_new_nopar:Npn \@@_time_aux:nn +\cs_new:Npn \@@_time_aux:nn { \bool_if:NTF \l_@@_time_bool { \@@_time_aux:Nnnn \zhnum_int:n { } } @@ -1453,7 +1453,7 @@ Copyright and Licence % } % 将 \texttt{prop} 表转化到单独的 \texttt{tl} 变量。 % \begin{macrocode} -\cs_new_protected_nopar:Npn \zhnum_parse_config: +\cs_new_protected:Npn \zhnum_parse_config: { \prop_map_function:NN \l_@@_cfg_map_prop \zhnum_check_simp:nn \prop_map_function:NN \l_@@_cfg_map_ganzhi_prop \zhnum_assgin_ganzhi:nn @@ -1485,7 +1485,7 @@ Copyright and Licence } { \tl_set:cn { l_@@_ #2 _tl } {#1} } } -\cs_new_protected_nopar:Npn \zhnum_assgin_const: +\cs_new_protected:Npn \zhnum_assgin_const: { \prop_map_function:NN \l_@@_cfg_map_prop \zhnum_check_financial:nn \zhnum_set_alias: @@ -1506,7 +1506,7 @@ Copyright and Licence { c_@@_ #1 _tl } { \exp_not:c { l_@@_ #1 _tl } } } } -\cs_new_protected_nopar:Npn \zhnum_set_zero: +\cs_new_protected:Npn \zhnum_set_zero: { \tl_set:cx { l_@@_0_tl } { @@ -1514,7 +1514,7 @@ Copyright and Licence { \exp_not:o \l_@@_null_tl } { \exp_not:v { l_@@_0_tl } } } } -\cs_new_protected_nopar:Npn \zhnum_set_week_day: +\cs_new_protected:Npn \zhnum_set_week_day: { \tl_set:Nx \l_@@_mon_tl { \exp_not:N \c_@@_weekday_tl \exp_not:v { l_@@_1_tl } } @@ -1565,7 +1565,7 @@ Copyright and Licence % 一些易于使用的别名。 % \begin{macrocode} \cs_new_eq:NN \zhnum_set_alias:NN \cs_new_eq:NN -\cs_new_protected_nopar:Npx \zhnum_set_alias: +\cs_new_protected:Npx \zhnum_set_alias: { \zhnum_set_alias:NN \exp_not:N \c_@@_zero_tl \exp_not:c { c_@@_ 0 _tl } @@ -1677,9 +1677,9 @@ Copyright and Licence } \cs_new_eq:NN \zhnum_reset_config: \zhnum_parse_config: \else: - \cs_new_protected_nopar:Npn \zhnum_set_catcode: + \cs_new_protected:Npn \zhnum_set_catcode: { \bool_if:NT \l_@@_active_char_bool { \zhnum_set_active: } } - \cs_new_protected_nopar:Npn \zhnum_set_active: + \cs_new_protected:Npn \zhnum_set_active: { \str_case:onTF { \l_@@_encoding_str } { @@ -1706,7 +1706,7 @@ Copyright and Licence \bool_if:NT \l_@@_active_char_bool { _active } } } - \cs_new_protected_nopar:Npn \zhnum_reset_config: + \cs_new_protected:Npn \zhnum_reset_config: { \zhnum_load_cfg:o { \l_@@_encoding_str } } \bool_new:N \l_@@_active_char_bool \bool_set_true:N \l_@@_active_char_bool @@ -1723,7 +1723,7 @@ Copyright and Licence { UTF8 , GBK , Big5 } { \str_set:Nx \l_@@_encoding_str - { \str_fold_case:V \l_keys_choice_tl } + { \exp_args:No \str_lowercase:n { \l_keys_choice_tl } } \zhnum_load_cfg:o { \l_@@_encoding_str } } , encoding .default:n = { GBK } , @@ -1897,12 +1897,14 @@ Copyright and Licence \zhnum_set_financial_map:nn { null } { 零 } \zhnum_set_financial_map:nn { 0 } { 零 } \zhnum_set_financial_map:nn { 1 } { 壹 } -\zhnum_set_financial_map:nn { 2 } { 貳 } %<*!big5> +\zhnum_set_financial_map:nnn { 2 } { simp } { 贰 } +\zhnum_set_financial_map:nnn { 2 } { trad } { 貳 } \zhnum_set_financial_map:nnn { 3 } { simp } { 叁 } \zhnum_set_financial_map:nnn { 3 } { trad } { 叄 } % %<*big5> +\zhnum_set_financial_map:nn { 2 } { 貳 } \zhnum_set_financial_map:nn { 3 } { 參 } % \zhnum_set_financial_map:nn { 4 } { 肆 } diff --git a/Master/texmf-dist/source/latex/zhnumber/zhnumber.ins b/Master/texmf-dist/source/latex/zhnumber/zhnumber.ins index d403166319e..401e3a8c338 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-2019 by Qing Lee +%% Copyright (C) 2012, 2014-2020 by Qing Lee %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -19,7 +19,7 @@ %% 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 Maintainer of this work is Qing Lee. %% @@ -30,7 +30,7 @@ \preamble - Copyright (C) 2012, 2014-2019 by Qing Lee + Copyright (C) 2012, 2014-2020 by Qing Lee -------------------------------------------------------------------------- This work may be distributed and/or modified under the @@ -43,7 +43,7 @@ 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 Maintainer of this work is Qing Lee. @@ -65,14 +65,14 @@ \generate { \usedir{tex/latex/zhnumber} - \file{zhnumber.sty} {\from{\jobname.dtx}{package}} + \file{zhnumber.sty} {\from{\jobname.dtx}{package}} \usedir{tex/latex/zhnumber/config} - \file{zhnumber-utf8.cfg} {\from{\jobname.dtx}{config,utf8}} - \file{zhnumber-big5.cfg} {\from{\jobname.dtx}{config,big5}} - \file{zhnumber-gbk.cfg} {\from{\jobname.dtx}{config,gbk}} + \file{zhnumber-utf8.cfg} {\from{\jobname.dtx}{config,utf8}} + \ctxfile{Big5}{zhnumber-big5.cfg} {\from{\jobname.dtx}{config,big5}} + \ctxfile{GBK}{zhnumber-gbk.cfg} {\from{\jobname.dtx}{config,gbk}} \nopreamble\nopostamble \usedir{doc/latex/zhnumber} - \file{README.md} {\from{\jobname.dtx}{readme}} + \file{README.md} {\from{\jobname.dtx}{readme}} } \endbatchfile diff --git a/Master/texmf-dist/tex/latex/zhnumber/zhnumber-big5.cfg b/Master/texmf-dist/tex/latex/zhnumber/zhnumber-big5.cfg index be0806e1b77..48fb05a250c 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-2019 by Qing Lee +%% Copyright (C) 2012, 2014-2020 by Qing Lee %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -19,16 +19,16 @@ %% 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 Maintainer of this work is Qing Lee. %% %% -------------------------------------------------------------------------- %% -\GetIdInfo$Id: zhnumber.dtx 311c61d 2019-04-07 23:29:51 +0800 Qing Lee $ +\GetIdInfo$Id: zhnumber.dtx c4664c6 2020-05-01 21:10:24 +0800 Qing Lee $ {Chinese numerals with Big5 encoding} \ProvidesExplFile{\ExplFileName-big5.cfg} - {\ExplFileDate}{2.7}{\ExplFileDescription} + {\ExplFileDate}{2.8}{\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 d54b53c8165..83e25a66ad8 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-2019 by Qing Lee +%% Copyright (C) 2012, 2014-2020 by Qing Lee %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -19,16 +19,16 @@ %% 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 Maintainer of this work is Qing Lee. %% %% -------------------------------------------------------------------------- %% -\GetIdInfo$Id: zhnumber.dtx 311c61d 2019-04-07 23:29:51 +0800 Qing Lee $ +\GetIdInfo$Id: zhnumber.dtx c4664c6 2020-05-01 21:10:24 +0800 Qing Lee $ {Chinese numerals with GBK encoding} \ProvidesExplFile{\ExplFileName-gbk.cfg} - {\ExplFileDate}{2.7}{\ExplFileDescription} + {\ExplFileDate}{2.8}{\ExplFileDescription} \zhnum_set_digits_map:nnn { minus } { simp } { } \zhnum_set_digits_map:nnn { minus } { trad } { ؓ } \zhnum_set_digits_map:nn { 0 } { } @@ -79,7 +79,8 @@ \zhnum_set_financial_map:nn { null } { } \zhnum_set_financial_map:nn { 0 } { } \zhnum_set_financial_map:nn { 1 } { Ҽ } -\zhnum_set_financial_map:nn { 2 } { E } +\zhnum_set_financial_map:nnn { 2 } { simp } { } +\zhnum_set_financial_map:nnn { 2 } { trad } { E } \zhnum_set_financial_map:nnn { 3 } { simp } { } \zhnum_set_financial_map:nnn { 3 } { trad } { } \zhnum_set_financial_map:nn { 4 } { } diff --git a/Master/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg b/Master/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg index 0791c6df18f..8488177a156 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-2019 by Qing Lee +%% Copyright (C) 2012, 2014-2020 by Qing Lee %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -19,16 +19,16 @@ %% 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 Maintainer of this work is Qing Lee. %% %% -------------------------------------------------------------------------- %% -\GetIdInfo$Id: zhnumber.dtx 311c61d 2019-04-07 23:29:51 +0800 Qing Lee $ +\GetIdInfo$Id: zhnumber.dtx c4664c6 2020-05-01 21:10:24 +0800 Qing Lee $ {Chinese numerals with UTF8 encoding} \ProvidesExplFile{\ExplFileName-utf8.cfg} - {\ExplFileDate}{2.7}{\ExplFileDescription} + {\ExplFileDate}{2.8}{\ExplFileDescription} \zhnum_set_digits_map:nnn { minus } { simp } { 负 } \zhnum_set_digits_map:nnn { minus } { trad } { 負 } \zhnum_set_digits_map:nn { 0 } { 零 } @@ -79,7 +79,8 @@ \zhnum_set_financial_map:nn { null } { 零 } \zhnum_set_financial_map:nn { 0 } { 零 } \zhnum_set_financial_map:nn { 1 } { 壹 } -\zhnum_set_financial_map:nn { 2 } { 貳 } +\zhnum_set_financial_map:nnn { 2 } { simp } { 贰 } +\zhnum_set_financial_map:nnn { 2 } { trad } { 貳 } \zhnum_set_financial_map:nnn { 3 } { simp } { 叁 } \zhnum_set_financial_map:nnn { 3 } { trad } { 叄 } \zhnum_set_financial_map:nn { 4 } { 肆 } diff --git a/Master/texmf-dist/tex/latex/zhnumber/zhnumber.sty b/Master/texmf-dist/tex/latex/zhnumber/zhnumber.sty index 474d5320eba..73175a72c2c 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-2019 by Qing Lee +%% Copyright (C) 2012, 2014-2020 by Qing Lee %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -19,7 +19,7 @@ %% 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 Maintainer of this work is Qing Lee. %% @@ -27,10 +27,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: zhnumber.dtx 311c61d 2019-04-07 23:29:51 +0800 Qing Lee $ +\GetIdInfo$Id: zhnumber.dtx c4664c6 2020-05-01 21:10:24 +0800 Qing Lee $ {Typesetting numbers with Chinese glyphs} \ProvidesExplPackage{\ExplFileName} - {\ExplFileDate}{2.7}{\ExplFileDescription} + {\ExplFileDate}{2.8}{\ExplFileDescription} \msg_new:nnn { zhnumber } { l3-too-old } { Support~package~'expl3'~too~old. \\\\ @@ -139,7 +139,7 @@ { \c__zhnum_zero_tl } } } -\cs_new_nopar:Npn \@zhnum { \zhnum_int:n } +\cs_new:Npn \@zhnum { \zhnum_int:n } \cs_new:Npn \zhnum_integer:n #1 { \exp_after:wN \__zhnum_read_integer:www @@ -306,7 +306,7 @@ { \zhnum_digits_null:v { c@#1 } } { \__zhnum_counter_error:n {#1} } } -\cs_new_nopar:Npn \@zhdig #1 { \zhnum_digits_null:f { \int_eval:n {#1} } } +\cs_new:Npn \@zhdig #1 { \zhnum_digits_null:f { \int_eval:n {#1} } } \DeclareExpandableDocumentCommand \zhdigits { +s +o +m } { \IfNoValueTF {#2} @@ -321,9 +321,9 @@ \zhnum_digits:Nn #1 {#3} \group_end: } -\cs_new_nopar:Npn \zhnum_digits_zero:n +\cs_new:Npn \zhnum_digits_zero:n { \zhnum_digits:Nn \BooleanTrue } -\cs_new_nopar:Npn \zhnum_digits_null:n +\cs_new:Npn \zhnum_digits_null:n { \zhnum_digits:Nn \BooleanFalse } \cs_generate_variant:Nn \zhnum_digits_null:n { V , v , f } \cs_new:Npn \zhnum_digits:Nn #1#2 @@ -382,9 +382,9 @@ } \cs_new:Npn \__zhnum_date:www #1/#2/#3 \q_stop { \__zhnum_date_aux:nnn {#1} {#2} {#3} } -\cs_new_nopar:Npn \zhtoday +\cs_new:Npn \zhtoday { \__zhnum_date_aux:Vnn \tex_year:D \tex_month:D \tex_day:D } -\cs_new_nopar:Npn \__zhnum_date_aux:nnn +\cs_new:Npn \__zhnum_date_aux:nnn { \bool_if:NTF \l__zhnum_time_bool { \__zhnum_date_aux:NNnnnn \zhnum_digits_null:n \zhnum_int:n { } } @@ -464,13 +464,13 @@ \cs_new:Npn \exp_not:N \__zhnum_time:ww ##1 \c_colon_str ##2 \exp_not:N \q_stop } { \__zhnum_time_aux:nn {#1} {#2} } -\cs_new_nopar:Npn \zhcurrtime +\cs_new:Npn \zhcurrtime { \__zhnum_time_aux:nn { \int_div_truncate:nn \tex_time:D { 60 } } { \int_mod:nn \tex_time:D { 60 } } } -\cs_new_nopar:Npn \__zhnum_time_aux:nn +\cs_new:Npn \__zhnum_time_aux:nn { \bool_if:NTF \l__zhnum_time_bool { \__zhnum_time_aux:Nnnn \zhnum_int:n { } } @@ -648,7 +648,7 @@ \prop_new:N \l__zhnum_cfg_map_var_prop \prop_new:N \l__zhnum_cfg_map_finan_prop \prop_new:N \l__zhnum_cfg_map_ganzhi_prop -\cs_new_protected_nopar:Npn \zhnum_parse_config: +\cs_new_protected:Npn \zhnum_parse_config: { \prop_map_function:NN \l__zhnum_cfg_map_prop \zhnum_check_simp:nn \prop_map_function:NN \l__zhnum_cfg_map_ganzhi_prop \zhnum_assgin_ganzhi:nn @@ -680,7 +680,7 @@ } { \tl_set:cn { l__zhnum_ #2 _tl } {#1} } } -\cs_new_protected_nopar:Npn \zhnum_assgin_const: +\cs_new_protected:Npn \zhnum_assgin_const: { \prop_map_function:NN \l__zhnum_cfg_map_prop \zhnum_check_financial:nn \zhnum_set_alias: @@ -701,7 +701,7 @@ { c__zhnum_ #1 _tl } { \exp_not:c { l__zhnum_ #1 _tl } } } } -\cs_new_protected_nopar:Npn \zhnum_set_zero: +\cs_new_protected:Npn \zhnum_set_zero: { \tl_set:cx { l__zhnum_0_tl } { @@ -709,7 +709,7 @@ { \exp_not:o \l__zhnum_null_tl } { \exp_not:v { l__zhnum_0_tl } } } } -\cs_new_protected_nopar:Npn \zhnum_set_week_day: +\cs_new_protected:Npn \zhnum_set_week_day: { \tl_set:Nx \l__zhnum_mon_tl { \exp_not:N \c__zhnum_weekday_tl \exp_not:v { l__zhnum_1_tl } } @@ -754,7 +754,7 @@ \cs_set_eq:NN \zhnum_assgin_const_tl:cx \tl_set:cx } \cs_new_eq:NN \zhnum_set_alias:NN \cs_new_eq:NN -\cs_new_protected_nopar:Npx \zhnum_set_alias: +\cs_new_protected:Npx \zhnum_set_alias: { \zhnum_set_alias:NN \exp_not:N \c__zhnum_zero_tl \exp_not:c { c__zhnum_ 0 _tl } @@ -842,9 +842,9 @@ } \cs_new_eq:NN \zhnum_reset_config: \zhnum_parse_config: \else: - \cs_new_protected_nopar:Npn \zhnum_set_catcode: + \cs_new_protected:Npn \zhnum_set_catcode: { \bool_if:NT \l__zhnum_active_char_bool { \zhnum_set_active: } } - \cs_new_protected_nopar:Npn \zhnum_set_active: + \cs_new_protected:Npn \zhnum_set_active: { \str_case:onTF { \l__zhnum_encoding_str } { @@ -871,7 +871,7 @@ \bool_if:NT \l__zhnum_active_char_bool { _active } } } - \cs_new_protected_nopar:Npn \zhnum_reset_config: + \cs_new_protected:Npn \zhnum_reset_config: { \zhnum_load_cfg:o { \l__zhnum_encoding_str } } \bool_new:N \l__zhnum_active_char_bool \bool_set_true:N \l__zhnum_active_char_bool @@ -882,7 +882,7 @@ { UTF8 , GBK , Big5 } { \str_set:Nx \l__zhnum_encoding_str - { \str_fold_case:V \l_keys_choice_tl } + { \exp_args:No \str_lowercase:n { \l_keys_choice_tl } } \zhnum_load_cfg:o { \l__zhnum_encoding_str } } , encoding .default:n = { GBK } , -- cgit v1.2.3