diff options
author | Karl Berry <karl@freefriends.org> | 2019-03-05 22:35:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-03-05 22:35:14 +0000 |
commit | 68872ff6a2a91fa0e84763fc9316493d82075c95 (patch) | |
tree | 0546ec4c414553802e31a423aec44f74d252f645 /Master/texmf-dist/source/latex/l3kernel/l3prop.dtx | |
parent | 541c4ddf7c5b402b9cfe8af5ef4e49ffa15d3e83 (diff) |
l3 (5mar19)
git-svn-id: svn://tug.org/texlive/trunk@50246 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3prop.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3prop.dtx | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx index b3f70773c4c..d83ea0f4ce2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2019-02-15} +% \date{Released 2019-03-05} % % \maketitle % @@ -216,6 +216,14 @@ % \end{texnote} % \end{function} % +% \begin{function}[EXP]{\prop_count:N, \prop_count:c} +% \begin{syntax} +% \cs{prop_count:N} \meta{property list} +% \end{syntax} +% Leaves the number of key--value pairs in the \meta{property list} in +% the input stream as an \meta{integer denotation}. +% \end{function} +% % \section{Modifying property lists} % % \begin{function}[added = 2012-05-12] @@ -872,6 +880,27 @@ % \end{macro} % \end{macro} % +% \begin{macro}[EXP]{\prop_count:N, \prop_count:c} +% \begin{macro}[EXP]{\@@_count:nn} +% Counting the key--value pairs in a property list is done using the +% same approach as for other count functions: turn each entry into a +% \texttt{+1} then use integer evaluation to actually do the +% mathematics. +% \begin{macrocode} +\cs_new:Npn \prop_count:N #1 + { + \int_eval:n + { + 0 + \prop_map_function:NN #1 \@@_count:nn + } + } +\cs_new:Npn \@@_count:nn #1#2 { + 1 } +\cs_generate_variant:Nn \prop_count:N { c } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macro}[TF, tested = m3prop004] % {\prop_pop:NnN, \prop_pop:cnN, \prop_gpop:NnN, \prop_gpop:cnN} % Popping an item from a property list, keeping track of whether |