summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-04-23 23:35:34 +0000
committerKarl Berry <karl@freefriends.org>2012-04-23 23:35:34 +0000
commit06f92e7988867477e0e8ba1b2dea3752d90f7fbe (patch)
tree6cc2f8ec5dbfc078c9c5f37bfb15814c704b1793 /Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
parent84c410717bd484db4ccea240224d83fbb42b464a (diff)
l3kernel 3570 (23apr12)
git-svn-id: svn://tug.org/texlive/trunk@26111 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.dtx44
1 files changed, 38 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index 177d467a0b7..b90ff41e63a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3prop.dtx 3460 2012-02-26 12:16:41Z will $
+\GetIdInfo$Id: l3prop.dtx 3490 2012-03-04 01:00:53Z bruno $
{L3 Experimental property lists}
%</driver|package>
%<*driver>
@@ -235,6 +235,16 @@
%
% \section{Property list conditionals}
%
+% \begin{function}[EXP, pTF, added=2012-03-03]
+% {\prop_if_exist:N, \prop_if_exist:c}
+% \begin{syntax}
+% \cs{prop_if_exist_p:N} \meta{property list}
+% \cs{prop_if_exist:NTF} \meta{property list} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Tests whether the \meta{property list} is currently defined. This does not
+% check that the \meta{property list} really is a property list variable.
+% \end{function}
+%
% \begin{function}[EXP,pTF]{\prop_if_empty:N, \prop_if_empty:c}
% \begin{syntax}
% \cs{prop_if_empty_p:N} \meta{property list}
@@ -402,9 +412,17 @@
% \begin{syntax}
% \cs{prop_map_tokens:Nn} \meta{property list} \Arg{code}
% \end{syntax}
-% Analogue of \cs{prop_map_function:NN} which maps several tokens instead
-% of a single function. Useful in particular when mapping through a
-% property list while keeping track of a given key.
+% Analogue of \cs{prop_map_function:NN} which maps several tokens
+% instead of a single function. The \meta{code} receives each
+% key--value pair in the \meta{property list} as two trailing brace
+% groups. For instance,
+% \begin{verbatim}
+% \prop_map_tokens:Nn \l_my_prop { \str_if_eq:nnT { mykey } }
+% \end{verbatim}
+% will expand to the value corresponding to \texttt{mykey}: for each
+% pair in \cs{l_my_prop} the function \cs{str_if_eq:nnT} receives
+% \texttt{mykey}, the \meta{key} and the \meta{value} as its three
+% arguments. For that specific task, \cs{prop_get:Nn} is faster.
% \end{function}
%
% \begin{function}[updated = 2012-01-08,EXP]{\prop_get:Nn, \prop_get:cn}
@@ -546,10 +564,10 @@
% Once again a simple copy from the token list functions.
% \begin{macrocode}
\cs_new_protected:Npn \prop_clear_new:N #1
- { \cs_if_exist:NTF #1 { \prop_clear:N #1 } { \prop_new:N #1 } }
+ { \prop_if_exist:NTF #1 { \prop_clear:N #1 } { \prop_new:N #1 } }
\cs_generate_variant:Nn \prop_clear_new:N { c }
\cs_new_protected:Npn \prop_gclear_new:N #1
- { \cs_if_exist:NTF #1 { \prop_gclear:N #1 } { \prop_new:N #1 } }
+ { \prop_if_exist:NTF #1 { \prop_gclear:N #1 } { \prop_new:N #1 } }
\cs_generate_variant:Nn \prop_gclear_new:N { c }
% \end{macrocode}
% \end{macro}
@@ -799,6 +817,20 @@
%
% \subsection{Property list conditionals}
%
+% \begin{macro}[pTF]{\prop_if_exist:N, \prop_if_exist:c}
+% Copies of the \texttt{cs} functions defined in \pkg{l3basics}.
+% \begin{macrocode}
+\cs_new_eq:NN \prop_if_exist:NTF \cs_if_exist:NTF
+\cs_new_eq:NN \prop_if_exist:NT \cs_if_exist:NT
+\cs_new_eq:NN \prop_if_exist:NF \cs_if_exist:NF
+\cs_new_eq:NN \prop_if_exist_p:N \cs_if_exist_p:N
+\cs_new_eq:NN \prop_if_exist:cTF \cs_if_exist:cTF
+\cs_new_eq:NN \prop_if_exist:cT \cs_if_exist:cT
+\cs_new_eq:NN \prop_if_exist:cF \cs_if_exist:cF
+\cs_new_eq:NN \prop_if_exist_p:c \cs_if_exist_p:c
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}[pTF]{\prop_if_empty:N, \prop_if_empty:c}
% The test here uses \cs{c_empty_prop} as it is not really empty!
% \begin{macrocode}