diff options
author | Karl Berry <karl@freefriends.org> | 2015-06-19 22:32:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-06-19 22:32:13 +0000 |
commit | 28cb2b214ad9bcb5ac65fdf512b438f388a68b1e (patch) | |
tree | 227bd9a8b0f9f68f9ecfd2ccb5806418e8f71a40 /Master/texmf-dist/tex/latex/zhnumber | |
parent | 4c01004cc15017d68eb0b9697c07010ea62ea23f (diff) |
zhnumber (19jun15)
git-svn-id: svn://tug.org/texlive/trunk@37614 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/zhnumber')
-rw-r--r-- | Master/texmf-dist/tex/latex/zhnumber/zhnumber-big5.cfg (renamed from Master/texmf-dist/tex/latex/zhnumber/config/zhnumber-big5.cfg) | 28 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/zhnumber/zhnumber-gbk.cfg (renamed from Master/texmf-dist/tex/latex/zhnumber/config/zhnumber-gbk.cfg) | 28 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg (renamed from Master/texmf-dist/tex/latex/zhnumber/config/zhnumber-utf8.cfg) | 28 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/zhnumber/zhnumber.sty | 147 |
4 files changed, 199 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/zhnumber/config/zhnumber-big5.cfg b/Master/texmf-dist/tex/latex/zhnumber/zhnumber-big5.cfg index bd32e30c2af..f74aee2d3d5 100644 --- a/Master/texmf-dist/tex/latex/zhnumber/config/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 by Qing Lee <sobenlee@gmail.com> +%% Copyright (C) 2012, 2014, 2015 by Qing Lee <sobenlee@gmail.com> %% -------------------------------------------------------------------------- %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -19,11 +19,11 @@ %% This work has the LPPL maintenance status "maintained". %% The Current Maintainer of this work is Qing Lee. %% -\GetIdInfo$Id: zhnumber.dtx 718 2014-09-13 09:13:29Z sobenlee $ +\GetIdInfo$Id: zhnumber.dtx 42dbb38 2015-05-21 23:20:32 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese numerals with Big5 encoding} \ProvidesExplFile {\ExplFileName-big5.cfg} - {\ExplFileDate}{2.1}{\ExplFileDescription} + {\ExplFileDate}{2.2}{\ExplFileDescription} \zhnum_set_digits_map:nn { minus } { t } \zhnum_set_digits_map:nn { 0 } { s } \zhnum_set_digits_map:nn { null } { } @@ -77,6 +77,28 @@ \zhnum_set_financial_map:nn { 10 } { B } \zhnum_set_financial_map:nn { 100 } { } \zhnum_set_financial_map:nn { 1000 } { a } +\zhnum_set_tiangan_map:nn { 1 } { } +\zhnum_set_tiangan_map:nn { 2 } { A } +\zhnum_set_tiangan_map:nn { 3 } { } +\zhnum_set_tiangan_map:nn { 4 } { B } +\zhnum_set_tiangan_map:nn { 5 } { } +\zhnum_set_tiangan_map:nn { 6 } { v } +\zhnum_set_tiangan_map:nn { 7 } { } +\zhnum_set_tiangan_map:nn { 8 } { } +\zhnum_set_tiangan_map:nn { 9 } { } +\zhnum_set_tiangan_map:nn { 10 } { } +\zhnum_set_dizhi_map:nn { 1 } { l } +\zhnum_set_dizhi_map:nn { 2 } { } +\zhnum_set_dizhi_map:nn { 3 } { G } +\zhnum_set_dizhi_map:nn { 4 } { f } +\zhnum_set_dizhi_map:nn { 5 } { } +\zhnum_set_dizhi_map:nn { 6 } { x } +\zhnum_set_dizhi_map:nn { 7 } { } +\zhnum_set_dizhi_map:nn { 8 } { } +\zhnum_set_dizhi_map:nn { 9 } { } +\zhnum_set_dizhi_map:nn { 10 } { } +\zhnum_set_dizhi_map:nn { 11 } { } +\zhnum_set_dizhi_map:nn { 12 } { } %% %% This package consists of the file zhnumber.dtx, %% and the derived files zhnumber.pdf, diff --git a/Master/texmf-dist/tex/latex/zhnumber/config/zhnumber-gbk.cfg b/Master/texmf-dist/tex/latex/zhnumber/zhnumber-gbk.cfg index ccba9ed19c0..2f6dd172f76 100644 --- a/Master/texmf-dist/tex/latex/zhnumber/config/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 by Qing Lee <sobenlee@gmail.com> +%% Copyright (C) 2012, 2014, 2015 by Qing Lee <sobenlee@gmail.com> %% -------------------------------------------------------------------------- %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -19,11 +19,11 @@ %% This work has the LPPL maintenance status "maintained". %% The Current Maintainer of this work is Qing Lee. %% -\GetIdInfo$Id: zhnumber.dtx 718 2014-09-13 09:13:29Z sobenlee $ +\GetIdInfo$Id: zhnumber.dtx 42dbb38 2015-05-21 23:20:32 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese numerals with GBK encoding} \ProvidesExplFile {\ExplFileName-gbk.cfg} - {\ExplFileDate}{2.1}{\ExplFileDescription} + {\ExplFileDate}{2.2}{\ExplFileDescription} \zhnum_set_digits_map:nnn { minus } { simp } { } \zhnum_set_digits_map:nnn { minus } { trad } { ؓ } \zhnum_set_digits_map:nn { 0 } { } @@ -87,6 +87,28 @@ \zhnum_set_financial_map:nn { 10 } { ʰ } \zhnum_set_financial_map:nn { 100 } { } \zhnum_set_financial_map:nn { 1000 } { Ǫ } +\zhnum_set_tiangan_map:nn { 1 } { } +\zhnum_set_tiangan_map:nn { 2 } { } +\zhnum_set_tiangan_map:nn { 3 } { } +\zhnum_set_tiangan_map:nn { 4 } { } +\zhnum_set_tiangan_map:nn { 5 } { } +\zhnum_set_tiangan_map:nn { 6 } { } +\zhnum_set_tiangan_map:nn { 7 } { } +\zhnum_set_tiangan_map:nn { 8 } { } +\zhnum_set_tiangan_map:nn { 9 } { } +\zhnum_set_tiangan_map:nn { 10 } { } +\zhnum_set_dizhi_map:nn { 1 } { } +\zhnum_set_dizhi_map:nn { 2 } { } +\zhnum_set_dizhi_map:nn { 3 } { } +\zhnum_set_dizhi_map:nn { 4 } { î } +\zhnum_set_dizhi_map:nn { 5 } { } +\zhnum_set_dizhi_map:nn { 6 } { } +\zhnum_set_dizhi_map:nn { 7 } { } +\zhnum_set_dizhi_map:nn { 8 } { δ } +\zhnum_set_dizhi_map:nn { 9 } { } +\zhnum_set_dizhi_map:nn { 10 } { } +\zhnum_set_dizhi_map:nn { 11 } { } +\zhnum_set_dizhi_map:nn { 12 } { } %% %% This package consists of the file zhnumber.dtx, %% and the derived files zhnumber.pdf, diff --git a/Master/texmf-dist/tex/latex/zhnumber/config/zhnumber-utf8.cfg b/Master/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg index 9bdbebb6a2c..b006f7b0b2b 100644 --- a/Master/texmf-dist/tex/latex/zhnumber/config/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 by Qing Lee <sobenlee@gmail.com> +%% Copyright (C) 2012, 2014, 2015 by Qing Lee <sobenlee@gmail.com> %% -------------------------------------------------------------------------- %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -19,11 +19,11 @@ %% This work has the LPPL maintenance status "maintained". %% The Current Maintainer of this work is Qing Lee. %% -\GetIdInfo$Id: zhnumber.dtx 718 2014-09-13 09:13:29Z sobenlee $ +\GetIdInfo$Id: zhnumber.dtx 42dbb38 2015-05-21 23:20:32 +0800 Qing Lee <sobenlee@gmail.com> $ {Chinese numerals with UTF8 encoding} \ProvidesExplFile {\ExplFileName-utf8.cfg} - {\ExplFileDate}{2.1}{\ExplFileDescription} + {\ExplFileDate}{2.2}{\ExplFileDescription} \zhnum_set_digits_map:nnn { minus } { simp } { 负 } \zhnum_set_digits_map:nnn { minus } { trad } { 負 } \zhnum_set_digits_map:nn { 0 } { 零 } @@ -87,6 +87,28 @@ \zhnum_set_financial_map:nn { 10 } { 拾 } \zhnum_set_financial_map:nn { 100 } { 佰 } \zhnum_set_financial_map:nn { 1000 } { 仟 } +\zhnum_set_tiangan_map:nn { 1 } { 甲 } +\zhnum_set_tiangan_map:nn { 2 } { 乙 } +\zhnum_set_tiangan_map:nn { 3 } { 丙 } +\zhnum_set_tiangan_map:nn { 4 } { 丁 } +\zhnum_set_tiangan_map:nn { 5 } { 戊 } +\zhnum_set_tiangan_map:nn { 6 } { 己 } +\zhnum_set_tiangan_map:nn { 7 } { 庚 } +\zhnum_set_tiangan_map:nn { 8 } { 辛 } +\zhnum_set_tiangan_map:nn { 9 } { 壬 } +\zhnum_set_tiangan_map:nn { 10 } { 癸 } +\zhnum_set_dizhi_map:nn { 1 } { 子 } +\zhnum_set_dizhi_map:nn { 2 } { 丑 } +\zhnum_set_dizhi_map:nn { 3 } { 寅 } +\zhnum_set_dizhi_map:nn { 4 } { 卯 } +\zhnum_set_dizhi_map:nn { 5 } { 辰 } +\zhnum_set_dizhi_map:nn { 6 } { 巳 } +\zhnum_set_dizhi_map:nn { 7 } { 午 } +\zhnum_set_dizhi_map:nn { 8 } { 未 } +\zhnum_set_dizhi_map:nn { 9 } { 申 } +\zhnum_set_dizhi_map:nn { 10 } { 酉 } +\zhnum_set_dizhi_map:nn { 11 } { 戌 } +\zhnum_set_dizhi_map:nn { 12 } { 亥 } %% %% This package consists of the file zhnumber.dtx, %% and the derived files zhnumber.pdf, diff --git a/Master/texmf-dist/tex/latex/zhnumber/zhnumber.sty b/Master/texmf-dist/tex/latex/zhnumber/zhnumber.sty index 6d81896fdb3..4223c0743d7 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 by Qing Lee <sobenlee@gmail.com> +%% Copyright (C) 2012, 2014, 2015 by Qing Lee <sobenlee@gmail.com> %% -------------------------------------------------------------------------- %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,11 +21,11 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: zhnumber.dtx 718 2014-09-13 09:13:29Z sobenlee $ +\GetIdInfo$Id: zhnumber.dtx 42dbb38 2015-05-21 23:20:32 +0800 Qing Lee <sobenlee@gmail.com> $ {Typesetting numbers with Chinese glyphs} \ProvidesExplPackage {\ExplFileName} - {\ExplFileDate}{2.1}{\ExplFileDescription} + {\ExplFileDate}{2.2}{\ExplFileDescription} \msg_new:nnn { zhnumber } { l3-too-old } { Support~package~'expl3'~too~old. \\\\ @@ -228,7 +228,7 @@ #2 \q_recursion_tail \q_nil \q_nil \q_nil \q_recursion_stop } \cs_generate_variant:Nn \zhnum_split_number:nn { f } -\cs_new:Npn \zhnum_split_number:NNnNNNNw #1#2#3#4#5#6#7#8 \q_recursion_stop +\cs_new:Npn \zhnum_split_number:NNnNNNNw #1#2#3#4#5#6#7 { \quark_if_recursion_tail_stop:N #4 \int_compare:nNnTF { #4#5#6#7 } = \c_zero @@ -241,7 +241,7 @@ } { \zhnum_split_number:NNfNNNNw \c_false_bool \c_true_bool } { \zhnum_split_number:NNfNNNNw \c_true_bool \c_false_bool } - { \int_eval:n { #3 - \c_one } } #8 \q_recursion_stop + { \int_eval:n { #3 - \c_one } } } \cs_generate_variant:Nn \zhnum_split_number:NNnNNNNw { NNf } \cs_new:Npn \zhnum_process_number:NNNNNN #1#2#3#4#5#6 @@ -475,7 +475,60 @@ { \int_incr:N \l__zhnum_scale_int } \tl_set:cn { \l_tmpa_tl } {#1} } - +\cs_new:Npn \zhnum_ganzhi_normal:nnn #1#2#3 + { + \int_compare:nNnF {#1} < \c_one + { \cs_if_exist_use:c { c__zhnum_ #2 _ #1 _tl } } + } +\cs_new:Npn \zhnum_ganzhi_cyclic:nnn #1#2#3 + { + \int_compare:nNnF {#1} = \c_zero + { + \cs_if_exist_use:cF { c__zhnum_ #2 _ #1 _tl } + { + \__zhnum_ganzhi_cyclic_mod:fnnn + { \int_mod:nn {#1} {#3} } {#1} {#2} {#3} + } + } + } +\cs_new:Npn \__zhnum_ganzhi_cyclic_mod:nnnn #1#2#3#4 + { + \int_compare:nNnTF {#2} > \c_zero + { \use:c { c__zhnum_ #3 _ #1 _tl } } + { + \int_compare:nNnTF {#1} = \c_zero + { \use:c { c__zhnum_ #3 _ 1 _tl } } + { \use:c { c__zhnum_ #3 _ \int_eval:n { #1 + #4 + 1 } _tl } } + } + } +\cs_generate_variant:Nn \__zhnum_ganzhi_cyclic_mod:nnnn { f } +\cs_new_eq:NN \zhnum_ganzhi:nnn \zhnum_ganzhi_normal:nnn +\cs_generate_variant:Nn \zhnum_ganzhi:nnn { f } +\cs_new:Npn \zhtiangan #1 + { \zhnum_ganzhi:fnn { \int_eval:n {#1} } { tiangan } { 10 } } +\cs_new:Npn \zhdizhi #1 + { \zhnum_ganzhi:fnn { \int_eval:n {#1} } { dizhi } { 12 } } +\cs_new:Npn \zhganzhi #1 + { \zhnum_ganzhi:fnn { \int_eval:n {#1} } { ganzhi } { 60 } } +\cs_new:Npn \zhganzhinian #1 + { \zhnum_ganzhi_nian:f { \int_eval:n {#1} } } +\cs_new:Npn \zhnum_ganzhi_nian:n #1 + { + \int_compare:nNnTF {#1} > \c_zero + { \use:c { c__zhnum_ganzhi_ \int_mod:nn { #1 + 57 } { 60 } _tl } } + { + \int_compare:nNnF {#1} = \c_zero + { + \use:c + { + c__zhnum_ganzhi_ + \int_eval:n { \int_mod:nn { #1 - 2 } { 60 } + 60 } + _tl + } + } + } + } +\cs_generate_variant:Nn \zhnum_ganzhi_nian:n { f } \group_begin: \tl_set:Nn \l_tmpa_tl { @@ -488,27 +541,40 @@ E3 .tl_set:N = \exp_not:c { l__zhnum_ 1000 _tl } , FE2 .tl_set:N = \exp_not:c { l__zhnum_financial_ 100 _tl } , FE3 .tl_set:N = \exp_not:c { l__zhnum_financial_ 1000 _tl } , + D11 .tl_set:N = \exp_not:c { l__zhnum_dizhi_ 11 _tl } , + D12 .tl_set:N = \exp_not:c { l__zhnum_dizhi_ 12 _tl } , + E44 .tl_set:N = \exp_not:c { l__zhnum_ s11 _tl } , } - \clist_map_inline:nn - { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 100 , 1000 } + \int_step_inline:nnnn { 1 } { 1 } { 10 } { \tl_put_right:Nx \l_tmpa_tl { - #1 .tl_set:N = \exp_not:c { l__zhnum_ #1 _tl } , - F#1 .tl_set:N = \exp_not:c { l__zhnum_financial_ #1 _tl } , + #1 .tl_set:N = \exp_not:c { l__zhnum_ #1 _tl } , + F#1 .tl_set:N = \exp_not:c { l__zhnum_financial_ #1 _tl } , + T#1 .tl_set:N = \exp_not:c { l__zhnum_tiangan_ #1 _tl } , + D#1 .tl_set:N = \exp_not:c { l__zhnum_dizhi_ #1 _tl } , + GZ#1 .tl_set:N = \exp_not:c { l__zhnum_ganzhi_ #1 _tl } , + E \int_eval:n { #1 * 4 } + .tl_set:N = \exp_not:c { l__zhnum_ s#1 _tl } , } } - \clist_map_inline:nn - { 20 , 30 , 40 , 200 } + \int_step_inline:nnnn { 11 } { 1 } { 60 } { \tl_put_right:Nx \l_tmpa_tl - { #1 .tl_set:N = \exp_not:c { l__zhnum_ #1 _tl } , } + { GZ#1 .tl_set:N = \exp_not:c { l__zhnum_ganzhi_ #1 _tl } , } } - \clist_map_inline:nn - { 4 , 8 , 12 , 16 , 20 , 24 , 28 , 32 , 36 , 40 , 44 } + \clist_map_inline:nn { 0 , 100 , 1000 } + { + \tl_put_right:Nx \l_tmpa_tl + { + #1 .tl_set:N = \exp_not:c { l__zhnum_ #1 _tl } , + F#1 .tl_set:N = \exp_not:c { l__zhnum_financial_ #1 _tl } , + } + } + \clist_map_inline:nn { 20 , 30 , 40 , 200 } { \tl_put_right:Nx \l_tmpa_tl - { E#1 .tl_set:N = \exp_not:c { l__zhnum_ s \int_eval:n { #1 / 4 } _tl } , } + { #1 .tl_set:N = \exp_not:c { l__zhnum_ #1 _tl } , } } \clist_map_inline:nn { @@ -538,12 +604,18 @@ \prop_put_if_new:Nnn \l__zhnum_cfg_map_finan_prop {#1} {#3} \prop_put:Nnn \l__zhnum_cfg_map_var_prop { financial_#1_#2 } {#3} } +\cs_new_protected:Npn \zhnum_set_tiangan_map:nn #1#2 + { \prop_put:Nnn \l__zhnum_cfg_map_ganzhi_prop { tiangan_#1 } {#2} } +\cs_new_protected:Npn \zhnum_set_dizhi_map:nn #1#2 + { \prop_put:Nnn \l__zhnum_cfg_map_ganzhi_prop { dizhi_#1 } {#2} } \prop_new:N \l__zhnum_cfg_map_prop \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: { \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 \zhnum_set_zero: \zhnum_set_week_day: \bool_if:NF \l__zhnum_reset_bool @@ -620,9 +692,31 @@ } \clist_map_inline:nn { mon , tue , wed , thu , fri , sat , sun } { \tl_const:cx { c__zhnum_ #1 _tl } { \exp_not:c { l__zhnum_ #1 _tl } } } +\cs_new_protected:Npn \zhnum_assgin_ganzhi:nn #1#2 + { \tl_set:cn { l__zhnum_ #1 _tl } {#2} } +\cs_new:Npn \zhnum_zero_mod:nn #1#2 + { \exp_args:Nf \__zhnum_zero_mod_aux:nn { \int_mod:nn {#1} {#2} } {#2} } +\cs_new:Npn \__zhnum_zero_mod_aux:nn #1#2 + { \int_compare:nNnTF {#1} = \c_zero {#2} {#1} } +\int_step_inline:nnnn { 1 } { 1 } { 60 } + { + \tl_const:cx { c__zhnum_ganzhi_ #1 _tl } { \exp_not:c { l__zhnum_ganzhi_ #1 _tl } } + \tl_set:cx { l__zhnum_ganzhi_ #1 _tl } + { + \exp_not:c { l__zhnum_tiangan_ \zhnum_zero_mod:nn {#1} { 10 } _tl } + \exp_not:c { l__zhnum_dizhi_ \zhnum_zero_mod:nn {#1} { 12 } _tl } + } + } +\cs_new_eq:cc { c__zhnum_ganzhi_ 0 _tl } { c__zhnum_ganzhi_ 60 _tl } \cs_new_eq:NN \zhnum_assgin_const_tl:cx \tl_const:cx \AtEndOfPackage - { \cs_set_eq:NN \zhnum_assgin_const_tl:cx \tl_set:cx } + { + \prop_map_inline:Nn \l__zhnum_cfg_map_ganzhi_prop + { \tl_const:cx { c__zhnum_ #1 _tl } { \exp_not:c { l__zhnum_ #1 _tl } } } + \cs_new_eq:cc { c__zhnum_tiangan_ 0 _tl } { c__zhnum_tiangan_ 10 _tl } + \cs_new_eq:cc { c__zhnum_dizhi_ 0 _tl } { c__zhnum_dizhi_ 12 _tl } + \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: { @@ -649,7 +743,7 @@ { \prop_if_exist:cTF { g__zhnum_cfg_ \l__zhnum_cfg_tl _prop } { \tl_set_eq:NN \l__zhnum_last_cfg_tl \l__zhnum_cfg_tl } - { \zhnum_input_cfg:n {#1} } + { \zhnum_input_cfg:n {#1} } \__zhnum_update_cfg_prop:N \prop_set_eq:Nc } \cs_new_protected:Npn \zhnum_input_cfg:n #1 @@ -670,9 +764,10 @@ } \cs_new_protected:Npn \__zhnum_update_cfg_prop:N #1 { - #1 \l__zhnum_cfg_map_prop { g__zhnum_cfg_ \l__zhnum_cfg_tl _prop } - #1 \l__zhnum_cfg_map_var_prop { g__zhnum_cfg_var_ \l__zhnum_cfg_tl _prop } - #1 \l__zhnum_cfg_map_finan_prop { g__zhnum_cfg_finan_ \l__zhnum_cfg_tl _prop } + #1 \l__zhnum_cfg_map_prop { g__zhnum_cfg_ \l__zhnum_cfg_tl _prop } + #1 \l__zhnum_cfg_map_var_prop { g__zhnum_cfg_var_ \l__zhnum_cfg_tl _prop } + #1 \l__zhnum_cfg_map_finan_prop { g__zhnum_cfg_finan_ \l__zhnum_cfg_tl _prop } + #1 \l__zhnum_cfg_map_ganzhi_prop { g__zhnum_cfg_ganzhi_ \l__zhnum_cfg_tl _prop } } \cs_new_protected:Npn \__zhnum_prop_initial:Nn #1#2 { @@ -754,8 +849,8 @@ encoding .choices:nn = { UTF8 , GBK , Big5 } { - \tl_set:Nx \l__zhnum_encoding_tl - { \exp_args:No \tl_expandable_lowercase:n { \l_keys_choice_tl } } + \exp_args:Nx \tex_lowercase:D + { \tl_set:Nn \exp_not:N \l__zhnum_encoding_tl { \l_keys_choice_tl } } \zhnum_load_cfg:o { \l__zhnum_encoding_tl } } , encoding .default:n = { GBK } , @@ -788,6 +883,12 @@ time .default:n = { Arabic } , reset .code:n = { \zhnum_reset_config: } , activechar .bool_set:N = \l__zhnum_active_char_bool , + ganzhi-cyclic .choice: , + ganzhi-cyclic / true .code:n = + { \cs_set_eq:NN \zhnum_ganzhi:nnn \zhnum_ganzhi_cyclic:nnn } , + ganzhi-cyclic / false.code:n = + { \cs_set_eq:NN \zhnum_ganzhi:nnn \zhnum_ganzhi_normal:nnn } , + ganzhi-cyclic .default:n = { true } , } \tl_new:N \l__zhnum_encoding_tl \msg_new:nnnn { zhnumber } { encoding-invalid } |