diff options
author | Karl Berry <karl@freefriends.org> | 2018-01-04 23:38:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-01-04 23:38:42 +0000 |
commit | bb83d426056841b56f02baa144b334892a340fa6 (patch) | |
tree | 46b91758e961d900de69f942996619d192262a9d /Master/texmf-dist/tex/latex/xassoccnt | |
parent | c64fcd9b2946cbb907d84980abd0cc494f729909 (diff) |
xassoccnt (4jan18)
git-svn-id: svn://tug.org/texlive/trunk@46209 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xassoccnt')
-rw-r--r-- | Master/texmf-dist/tex/latex/xassoccnt/xassoccnt.sty | 194 |
1 files changed, 96 insertions, 98 deletions
diff --git a/Master/texmf-dist/tex/latex/xassoccnt/xassoccnt.sty b/Master/texmf-dist/tex/latex/xassoccnt/xassoccnt.sty index e11965df0c8..760aae9d43d 100644 --- a/Master/texmf-dist/tex/latex/xassoccnt/xassoccnt.sty +++ b/Master/texmf-dist/tex/latex/xassoccnt/xassoccnt.sty @@ -1,9 +1,9 @@ -%% LaTeX package xassoccnt - version 1.5 (2017/07/28 -- 12:08:57) +%% LaTeX package xassoccnt - version 1.6 (2018/01/03 -- 23:27:20) %% Source file for xassoccnt.sty %% %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2017 by Dr. Christian Hupfer <typography dot with dot latex at gmail dot com> +%% Copyright (c) 2017 -- 2018 by Dr. Christian Hupfer <typography dot with dot latex at gmail dot com> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -19,10 +19,10 @@ %% %% -\def\xassoccntpackageversion{1.5} +\def\xassoccntpackageversion{1.6} \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{xassoccnt}[2017/07/28 - v\xassoccntpackageversion] +\ProvidesPackage{xassoccnt}[2018/01/03 - v\xassoccntpackageversion] \RequirePackage{etoolbox} \RequirePackage{letltxmacro} \RequirePackage{xcolor} @@ -44,11 +44,11 @@ \cs_generate_variant:Nn \seq_remove_all:Nn { cV, NV } \cs_generate_variant:Nn \seq_gremove_all:Nn { cV, NV } -\cs_generate_variant:Nn \prop_put:Nnn {cxx,nxx,nxn,cxn,Nxx,Nxn} -\cs_generate_variant:Nn \prop_gput:Nnn {cxx,nxx,nxn,cxn,Nxx,Nxn,NVx,Nvn,cVn,cVx} +\cs_generate_variant:Nn \prop_put:Nnn {cxx,cxn,Nxx,Nxn} +\cs_generate_variant:Nn \prop_gput:Nnn {cxx,cxn,Nxx,Nxn,NVx,Nvn,cVn,cVx} \cs_generate_variant:Nn \prop_remove:Nn {cx,Nx} \cs_generate_variant:Nn \prop_gremove:Nn {Nx,cx,No,co,NV,cV} -\cs_generate_variant:Nn \prop_item:Nn {NV,cV,cx,No,co,Nx,nx} +\cs_generate_variant:Nn \prop_item:Nn {NV,cV,cx,No,co,Nx} \cs_generate_variant:Nn \int_set:Nn {NV,Nx,Nx,cx} \cs_generate_variant:Nn \cs_gset:Npn {NpV,Npv,cpV,cpv,cpo,Npo} \cs_generate_variant:Nn \tl_set:Nn {No,Nx,NV} @@ -146,11 +146,17 @@ +\cs_new:Nn \__xassoccnt_toggle_bool:N {% + \bool_if:NTF #1 {\bool_set_false:n {#1}}{\bool_set_false:n {#1}} +% \bool_if:nTF{#1}{\bool_set_false:n {#1}}{\bool_set_false:n {#1}} +} + + \cs_new:Nn \__xassoccnt_toggle_bool:n {% \bool_if:nTF{#1}{\bool_set_false:n {#1}}{\bool_set_false:n {#1}} } -\cs_generate_variant:Nn \__xassoccnt_toggle_bool:n { c } +\cs_generate_variant:Nn \__xassoccnt_toggle_bool:N { c } \cs_new:Nn \__xassoccnt_toggle_autodefine:n {% @@ -702,7 +708,7 @@ }{} \AtEndOfPackage{ - \PackageInfo{xassoccnt}{2017/07/28 - v\xassoccntpackageversion -- stepping counters simultaneously and other features} + \PackageInfo{xassoccnt}{2018/01/03 - v\xassoccntpackageversion -- stepping counters simultaneously and other features} \xassoccnt_trackloadedpackages:n{alphalph,calc,cleveref,hyperref} \@ifpackageloaded{calc}{% \msg_warning:nnn{xassoccnt}{incompatiblepackagenonfatal}{calc}% Warning @@ -795,8 +801,8 @@ } -\cs_generate_variant:Nn \__xassoccnt_container_gclear:n { c } -\cs_generate_variant:Nn \__xassoccnt_container_clear:n { c } +\cs_generate_variant:Nn \__xassoccnt_container_gclear:N { c } +\cs_generate_variant:Nn \__xassoccnt_container_clear:N { c } \cs_new:Nn \__xassoccnt_container_set_from_clist:NN {\seq_set_from_clist:NN #1 #2} \cs_generate_variant:Nn \__xassoccnt_container_set_from_clist:NN { cN, cc, Nc } @@ -1010,9 +1016,9 @@ } } -\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnTF { nxTF, cnTF,cxTF } -\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnT { nxT,cnT,cxT } -\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnF { nxF,cnF,cxF } +\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnTF { NxTF, cnTF,cxTF } +\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnT { NxT,cnT,cxT } +\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnF { NxF,cnF,cxF } \prg_new_conditional:Nnn \xassoccnt_is_associatedcounter:n {T,F,TF} { @@ -1305,7 +1311,7 @@ } -\cs_new_nopar:Nn \__xassoccnt_translate_countername:nn {% +\cs_new_nopar:Nn \__xassoccnt_translate_countername:Nn {% \tl_set:Nn #1 {#2}% \seq_if_in:NxTF \g__xassoccnt_supertotalcounter_container {#2} {% \tl_set:Nn #1 {\__xassoccnt_expand_totalcountername:n {#2} }% @@ -1314,7 +1320,7 @@ } -\cs_generate_variant:Nn \__xassoccnt_translate_countername:nn {cn} +\cs_generate_variant:Nn \__xassoccnt_translate_countername:Nn {cn} %% More generic macros (hidding the internal features of the lists) @@ -1481,8 +1487,8 @@ \cs_generate_variant:Nn \xassoccnt_container_new:N {c} -\cs_generate_variant:Nn \xassoccnt_container_clear:N {c,x} -\cs_generate_variant:Nn \xassoccnt_container_gclear:N {c,x} +\cs_generate_variant:Nn \xassoccnt_container_clear:N {c} +\cs_generate_variant:Nn \xassoccnt_container_gclear:N {c} \cs_generate_variant:Nn \xassoccnt_container_set_eq:NN {cN,Nc,cc} \cs_generate_variant:Nn \xassoccnt_container_gset_eq:NN {cN,Nc,cc} @@ -1501,14 +1507,14 @@ \cs_generate_variant:Nn \xassoccnt_container_remove_all:Nn {cn} \cs_generate_variant:Nn \xassoccnt_container_gremove_all:Nn {cn} -\cs_generate_variant:Nn \xassoccnt_container_remove_by_clist:Nn {cn,nn} +\cs_generate_variant:Nn \xassoccnt_container_remove_by_clist:Nn {cn} \cs_generate_variant:Nn \xassoccnt_container_map_inline:Nn {cn} \cs_generate_variant:Nn \xassoccnt_container_count:N {c} -\cs_generate_variant:Nn \xassoccnt_container_set_from_clist:NN {cN,cc,Nc,Nn,cn} -\cs_generate_variant:Nn \xassoccnt_container_gset_from_clist:NN {cN,cc,Nc,Nn,cn} +\cs_generate_variant:Nn \xassoccnt_container_set_from_clist:NN {cN,cc,Nc} +\cs_generate_variant:Nn \xassoccnt_container_gset_from_clist:NN {cN,cc,Nc} \cs_generate_variant:Nn \xassoccnt_container_use:Nn {cn} @@ -1517,7 +1523,7 @@ \cs_generate_variant:Nn \xassoccnt_container_if_in:NnT {NVT,NvT,NoT,NxT,cnT,cVT,cvT,coT,cxT} \cs_generate_variant:Nn \xassoccnt_container_if_in:NnF {NVF,NvF,NoF,NxF,cnF,cVF,cvF,coF,cxF} -\cs_generate_variant:Nn \xassoccnt_container_if_exist:NTF {cTF,xTF} +\cs_generate_variant:Nn \xassoccnt_container_if_exist:NTF {cTF} \cs_generate_variant:Nn \xassoccnt_container_if_exist:NT {cT} \cs_generate_variant:Nn \xassoccnt_container_if_exist:NF {cF} @@ -1579,6 +1585,22 @@ %% Multiple counters may occur in the per - feature - specific container list + +\cs_new:Nn \xassoccnt_create_container:nN { + \keys_set:nn {xassoccnt_container} {#1} + \xassoccnt_container_if_exist:NTF #2 {% + % A existing container must not be redefined + \msg_error:nnn{xassoccnt}{containeralreadyexists}{#2}% Error! + }{ + \xassoccnt_container_new:N {#2} + } +} + + + +\cs_generate_variant:Nn \xassoccnt_create_container:nN {nc} + + \cs_new:Nn \xassoccnt_add_feature:nn {% \tl_set:Nn \__xassoccnt_featurename_tl {#2}% \prop_clear_new:c {\xassoccnt_featurename_prop:}% @@ -1596,16 +1618,16 @@ } -\prg_new_conditional:Nnn \xassoccnt_feature_if_in:n {TF,T,F} +\prg_new_conditional:Nnn \xassoccnt_feature_if_in:N {TF,T,F} { \seq_if_in:NnTF { \g__xassoccnt_feature_seq } {#1} {\prg_return_true:} {\prg_return_false:} } -\cs_generate_variant:Nn \xassoccnt_feature_if_in:nTF {c} -\cs_generate_variant:Nn \xassoccnt_feature_if_in:nT {c} -\cs_generate_variant:Nn \xassoccnt_feature_if_in:nF {c} +\cs_generate_variant:Nn \xassoccnt_feature_if_in:NTF {c} +\cs_generate_variant:Nn \xassoccnt_feature_if_in:NT {c} +\cs_generate_variant:Nn \xassoccnt_feature_if_in:NF {c} \cs_new:Nn \xassoccnt_remove_feature:nn {% % keys from #1 to be set @@ -1627,19 +1649,6 @@ } -\cs_new:Nn \xassoccnt_create_container:nN { - \keys_set:nn {xassoccnt_container} {#1} - \xassoccnt_container_if_exist:NTF #2 {% - % A existing container must not be redefined - \msg_error:nnn{xassoccnt}{containeralreadyexists}{#2}% Error! - }{ - \xassoccnt_container_new:N {#2} - } -} - - - -\cs_generate_variant:Nn \xassoccnt_create_container:nN {nc,nx} \cs_new:Nn \xassoccnt_add_to_containerlist:Nn {% \clist_set:Nx \l_tmpa_clist {#2} @@ -1648,7 +1657,7 @@ \xassoccnt_container_put_right:Nn #1 {##1}% Append data } }{ - \xassoccnt_create_container:nN {feature=false} #1 + \xassoccnt_create_container:nc {feature=false} {#1} \xassoccnt_container_set_from_clist:NN #1 \l_tmpa_clist } } @@ -1683,7 +1692,7 @@ } } -\cs_generate_variant:Nn \xassoccnt_add_to_containerlist:Nn {cn,nn} +\cs_generate_variant:Nn \xassoccnt_add_to_containerlist:Nn {cn} @@ -1696,7 +1705,7 @@ } \NewDocumentCommand{\NewContainer}{m}{% - \xassoccnt_create_container:nc {feature=false} {#1} + \xassoccnt_create_container:Nc {feature=false} {#1} } @@ -1705,10 +1714,6 @@ %%%% New Backup Counter features -\cs_new:Nn \xassoccnt_backup_id_seq:n {% - l_backupcounters_#1_id_seq% -} - \cs_new:Nn \__xassoccnt_declare_countergroupname:nn {% \xassoccnt_container_if_exist:cF { \xassoccnt_feature_group_container:n{#1}{#2} } {% @@ -1718,6 +1723,16 @@ } } + + +%\input{xassoccnt_backupfeatures_example} + + +\cs_new:Nn \xassoccnt_backup_id_seq:n {% + l_backupcounters_#1_id_seq% +} + + \cs_new:Nn \xassoccnt_declare_backupcountersgroupname:n {% \xassoccnt_container_if_exist:cF { \xassoccnt_feature_group_container:n{backupcounters}{#1} } { @@ -1778,7 +1793,7 @@ \bool_new:N \l__xassoccnt_is_backupcounter_bool -\prg_new_conditional:Nnn \__xassoccnt_is_backupcounter:n {TF,T,F} {% +\prg_new_conditional:Nnn \__xassoccnt_is_backupcounter:N {TF,T,F} {% \xassoccnt_container_map_inline:cn { \xassoccnt_feature_group_container:n{backupcounters} } {% \bool_set_false:N \l__xassoccnt_is_backupcounter_bool \xassoccnt_container_if_in:cxT { \xassoccnt_feature_subcontainer:nn{backupcounters}{##1} } {#1} @@ -1794,20 +1809,20 @@ -\cs_generate_variant:Nn \__xassoccnt_is_backupcounter:nTF {c } -\cs_generate_variant:Nn \__xassoccnt_is_backupcounter:nT { c } -\cs_generate_variant:Nn \__xassoccnt_is_backupcounter:nF { c } +\cs_generate_variant:Nn \__xassoccnt_is_backupcounter:NTF {c } +\cs_generate_variant:Nn \__xassoccnt_is_backupcounter:NT { c } +\cs_generate_variant:Nn \__xassoccnt_is_backupcounter:NF { c } -\cs_new:Nn \xassoccnt_is_backupcounter:nTF { % - \__xassoccnt_is_backupcounter:nTF {#1} {#2} {#3} +\cs_new:Nn \xassoccnt_is_backupcounter:NTF { % + \__xassoccnt_is_backupcounter:NTF {#1} {#2} {#3} } -\cs_new:Nn \xassoccnt_is_backupcounter:nT { % - \__xassoccnt_is_backupcounter:nT {#1} {#2}% +\cs_new:Nn \xassoccnt_is_backupcounter:NT { % + \__xassoccnt_is_backupcounter:NT {#1} {#2}% } -\cs_new:Nn \xassoccnt_is_backupcounter:nF { % - \__xassoccnt_is_backupcounter:nF {#1} {#2}% +\cs_new:Nn \xassoccnt_is_backupcounter:NF { % + \__xassoccnt_is_backupcounter:NF {#1} {#2}% } @@ -1822,7 +1837,7 @@ }% } } -\cs_new:Nn \__xassoccnt_backup_restore_theHmacros:nn {% +\cs_new:Nn \__xassoccnt_backup_restore_theHmacros:NN {% \bool_if:NT \l__xassoccnt_hyperrefpackage_loaded_bool {% \cs_if_exist:cT {theH#1} {% \expandafter\renewcommand\csname theH#1\endcsname{xassoccnt.#1_#2.\use:c{the#1}}% @@ -1854,14 +1869,14 @@ -\cs_new:Nn \xassoccnt_backupstore_property:nnn{% - \prop_gput:cnn {\xassoccnt_feature_subproplist:nn{\xassoccnt_extract_moduledata:n{backupfeaturename}}{#1}} { #2 } {#3}% Must be expanded +\cs_new:Nn \xassoccnt_backupstore_property:Nnn{% +% \prop_gput:Nnx {\xassoccnt_feature_subproplist:NN {\xassoccnt_extract_moduledata:n{backupfeaturename}{#1}}} { #2 } {#3}% Must be expanded } -\cs_generate_variant:Nn \xassoccnt_backupstore_property:nnn {cnn,cxx,nxx} +\cs_generate_variant:Nn \xassoccnt_backupstore_property:Nnn {cnn,cxx,Nxx} \cs_generate_variant:Nn \xassoccnt_backup_subproplist:n {V} -\cs_generate_variant:Nn \xassoccnt_feature_subproplist:NN {nn,cn} -\cs_generate_variant:Nn \__xassoccnt_backup_restore_theHmacros:nn {nx,cn,cx} +\cs_generate_variant:Nn \xassoccnt_backup_subproplist:NN {Nc,cc} +\cs_generate_variant:Nn \__xassoccnt_backup_restore_theHmacros:NN {Nc,cc}%,cx} \NewDocumentCommand{\BackupCounterValues}{O{}m}{% @@ -1930,7 +1945,7 @@ \seq_remove_duplicates:c {\xassoccnt_backup_id_seq:n{#2}} } \seq_map_inline:cn {\xassoccnt_feature_subcontainer:nn{\xassoccnt_extract_moduledata:n{backupfeaturename}}{#2}} {% - \xassoccnt_backupstore_property:nxx {#2}{\__xassoccnt_prepare_backupid:nn{##1}{\__xassoccnt_backup_id_tl}} {\number\value{##1}}% Must be expanded! + \xassoccnt_backupstore_property:Nnn {#2}{\__xassoccnt_prepare_backupid:nn{##1}{\__xassoccnt_backup_id_tl}} {\number\value{##1}}% Must be expanded! \__xassoccnt_backup_renew_theHmacros:nn {##1}{\__xassoccnt_prepare_backupid:nn{##1}{\__xassoccnt_backup_id_tl}}% \bool_if:NT \l__xassoccnt_resetbackupcounters_bool {% \setcounter{##1}{\c_zero}% @@ -1942,6 +1957,7 @@ \NewDocumentCommand{\RestoreBackupCounterGroup}{O{}m}{% + \keys_set:nn {xassoccnt_container} {keep-after-restore=false,backup-id={},restore-id={},multiple=false,#1} % % Test whether counter group #2 exists: @@ -1955,7 +1971,7 @@ % Test first if the backup id is valid! \seq_if_in:cVT {\xassoccnt_backup_id_seq:n{#2}} { \__xassoccnt_backup_id_tl } {% \seq_map_inline:cn {\xassoccnt_feature_subcontainer:nn{\xassoccnt_extract_moduledata:n{backupfeaturename}}{#2 }} {% - \__xassoccnt_backup_restore_theHmacros:nx {##1}{\__xassoccnt_prepare_backupid:nn{##1}{\__xassoccnt_restore_id_tl}}%\__xassoccnt_restore_id_tl}}% +% \__xassoccnt_backup_restore_theHmacros:Nx {##1}{\__xassoccnt_prepare_backupid:nn{##1}{\__xassoccnt_restore_id_tl}}%\__xassoccnt_restore_id_tl}}% \tl_set:Nx \l_tmpa_tl {\__xassoccnt_prepare_backupid:nn{##1}{\__xassoccnt_backup_id_tl}} \int_set:Nx \l_tmpa_int {\prop_item:cV {\xassoccnt_backup_subproplist:n{#2} } {\l_tmpa_tl}}% \setcounter{##1}{\int_use:N \l_tmpa_int}% @@ -2146,13 +2162,14 @@ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% Coupled Counter features \bool_new:N \l__xassoccnt_is_coupledcounter_bool -\prg_new_conditional:Nnn \__xassoccnt_is_coupledcounter:n {TF,T,F} +\prg_new_conditional:Nnn \__xassoccnt_is_coupledcounter:N {TF,T,F} { \xassoccnt_container_map_inline:cn { \xassoccnt_feature_group_container:n{coupledcounters} } {% \bool_set_false:N \l__xassoccnt_is_coupledcounter_bool @@ -2167,20 +2184,20 @@ {\prg_return_false:} } -\cs_generate_variant:Nn \__xassoccnt_is_coupledcounter:nTF {c } -\cs_generate_variant:Nn \__xassoccnt_is_coupledcounter:nT { c } -\cs_generate_variant:Nn \__xassoccnt_is_coupledcounter:nF { c } +\cs_generate_variant:Nn \__xassoccnt_is_coupledcounter:NTF {cTF } +\cs_generate_variant:Nn \__xassoccnt_is_coupledcounter:NT { cT } +\cs_generate_variant:Nn \__xassoccnt_is_coupledcounter:NF { cF } -\cs_new:Nn \xassoccnt_is_coupledcounter:nTF { % - \__xassoccnt_is_coupledcounter:nTF {#1} {#2} {#3} +\cs_new:Nn \xassoccnt_is_coupledcounter:NTF { % + \__xassoccnt_is_coupledcounter:NTF {#1} {#2} {#3} } -\cs_new:Nn \xassoccnt_is_coupledcounter:nT { % - \__xassoccnt_is_coupledcounter:nT {#1} {#2}% +\cs_new:Nn \xassoccnt_is_coupledcounter:NT { % + \__xassoccnt_is_coupledcounter:NT {#1} {#2}% } -\cs_new:Nn \xassoccnt_is_coupledcounter:nF { % - \__xassoccnt_is_coupledcounter:nF {#1} {#2}% +\cs_new:Nn \xassoccnt_is_coupledcounter:NF { % + \__xassoccnt_is_coupledcounter:NnF {#1} {#2}% } @@ -2256,15 +2273,15 @@ } \NewDocumentCommand{\IsCoupledCounterTF}{mmm}{% - \xassoccnt_is_coupledcounter:nTF {#1} {#2} {#3} + \xassoccnt_is_coupledcounter:NTF {#1} {#2} {#3} } \NewDocumentCommand{\IsCoupledCounterT}{mm}{% - \xassoccnt_is_coupledcounter:nT {#1} {#2} + \xassoccnt_is_coupledcounter:NT {#1} {#2} } \NewDocumentCommand{\IsCoupledCounterF}{mm}{% - \xassoccnt_is_coupledcounter:nF {#1} {#2} + \xassoccnt_is_coupledcounter:NF {#1} {#2} } %%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2374,7 +2391,7 @@ \__xassoccnt_translate_countername:cn {l_tmpa_tl} {#1}% \xassoccnt_is_suspendedcounter:nF{#1}{% \xassoccnt_stepcounter_periodiccounter:n {#1}% - \xassoccnt_is_coupledcounter:nTF {#1} + \xassoccnt_is_coupledcounter:NTF {#1} { \xassoccnt_stepcounter_coupledcounters:n{#1} } {% No, not a coupled counter! % \cs_gset_nopar:Nn \__xassoccnt_laststeppedcounter: {\l_tmpa_tl}% @@ -3771,20 +3788,14 @@ }{ \prop_gput:NnV #1 {#2} {\__xassoccnt_uppercase_first:n {#4}} } -% \tl_set:Nn \l_tmpa_tl {#3} -% %\__xassoccnt_uppercase_first:n { -% \typeout{Content is \tl_use:N \l_tmpa_tl} -% \prop_gput:NnV #1 {#2} {\l_tmpa_tl } } \cs_new:Nn \__xassoccnt_uppercase_first:n {% \tl_upper_case:n {\tl_head:n{#1}}\tl_tail:n{#1} -% \typeout{ \tl_upper_case:n {\tl_head:n{#1}}\tl_tail:n{#1}}% -% \typeout{ \tl_upper_case:n {\tl_head:n{#1}}\tl_tail:n{#1}} } -\cs_generate_variant:Nn \__xassoccnt_uppercase_first:n {x,o,c,V} +\cs_generate_variant:Nn \__xassoccnt_uppercase_first:n {x,o,V} \cs_generate_variant:Nn \prop_put_uppercase_first:Nnn {Nxx,Nnx,Nno,Nxn, cxn, cno,cxx,cnn} \cs_generate_variant:Nn \prop_gput_uppercase_first:Nnn {Nxx,Nnx,Nno,Nxn, cxn, cno,cxx,cnn} @@ -3803,31 +3814,18 @@ % Append the first element to be the reference entry \seq_put_right:Nx \l_tmpb_seq { \seq_item:Nn \l_tmpb_seq {1} } } -% \seq_map_inline:Nn \l_tmpb_seq {\typeout{##1~}} - \typeout{Checking arg 2} \prop_gput:cxx { g_xassoccnt_language_map_#1_prop } {\seq_item:Nn \l_tmpb_seq {1}-singular} {\__xassoccnt_use_if_empty:xn{\seq_item:Nn \l_tmpb_seq {2}}{\seq_item:Nn \l_tmpb_seq {2}}} - \typeout{Checking arg 3} \prop_gput:cxx { g_xassoccnt_language_map_#1_prop } {\seq_item:Nn \l_tmpb_seq {1}-plural} {\__xassoccnt_use_if_empty:xn{\seq_item:Nn \l_tmpb_seq {2}}{\seq_item:Nn \l_tmpb_seq {3}}} - \typeout{Checking arg 4} -% \prop_gput_uppercase_first:cxx { g_xassoccnt_language_map_#1_prop } {\seq_item:Nn \l_tmpb_seq {1}-uppercase-singular} {\__xassoccnt_use_if_empty:xn{\seq_item:Nn \l_tmpb_seq {2}}{\seq_item:Nn \l_tmpb_seq {4}}} \prop_gput_uppercase_first:cxxx { g_xassoccnt_language_map_#1_prop } {\seq_item:Nn \l_tmpb_seq {1}-uppercase-singular} {\seq_item:Nn \l_tmpb_seq {2}}{\seq_item:Nn \l_tmpb_seq {4}} \prop_gput_uppercase_first:cxxx { g_xassoccnt_language_map_#1_prop } {\seq_item:Nn \l_tmpb_seq {1}-uppercase-plural} {\seq_item:Nn \l_tmpb_seq {2}}{\seq_item:Nn \l_tmpb_seq {5}} - -% \prop_gput:cxx { g_xassoccnt_language_map_#1_prop } {\seq_item:Nn \l_tmpb_seq {1}-uppercase-singular} {\__xassoccnt_uppercase_first:x{\__xassoccnt_use_if_empty:nn{\seq_item:Nn \l_tmpb_seq {2}}{\seq_item:Nn \l_tmpb_seq {4}}}} -% \prop_gput:cxx { g_xassoccnt_language_map_#1_prop } {\seq_item:Nn \l_tmpb_seq {1}-uppercase-plural} {\__xassoccnt_uppercase_first:x{\__xassoccnt_use_if_empty:nn{\seq_item:Nn \l_tmpb_seq {2}s}{\seq_item:Nn \l_tmpb_seq {5}}}} -% \prop_show:c { g_xassoccnt_language_map_#1_prop } \group_end: } -% \seq_show:N \l_tmpb_seq -% \prop_gput:cxx { g_xassoccnt_language_map_#1_prop } {\seq_item:Nn \l_tmpb_seq {1}} {\__xassoccnt_use_if_empty:xn{\seq_item:Nn \l_tmpb_seq {2}}{\seq_item:Nn \l_tmpb_seq {1}}} - - \cs_generate_variant:Nn \__xassoccnt_declare_language_map:nn {nx,xx} \cs_generate_variant:Nn \__xassoccnt_declare_language_map:n {x} |