diff options
author | Karl Berry <karl@freefriends.org> | 2015-09-06 23:19:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-09-06 23:19:17 +0000 |
commit | 3cb4e75696df6c7abebf17fbc606ca86dcdfb520 (patch) | |
tree | 729978e0726cdb9d9f34a3d2e249c71a82e07f97 /Master/texmf-dist/source/latex/l3kernel/l3clist.dtx | |
parent | 32f50b97c2ae44e93225d1024afab9727fc02e00 (diff) |
l3 (6sep15)
git-svn-id: svn://tug.org/texlive/trunk@38305 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3clist.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3clist.dtx | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx index edd55416b41..51ff7dc3082 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx @@ -2,7 +2,7 @@ % %% File: l3clist.dtx Copyright (C) 2004-2011 Frank Mittelbach, %% The LaTeX3 project -%% (C) 2012-2014 The LaTeX3 Project +%% (C) 2012-2015 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of the %% LaTeX Project Public License (LPPL), either version 1.3c of this @@ -39,7 +39,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3clist.dtx 5354 2014-08-23 01:35:39Z bruno $ +\GetIdInfo$Id: l3clist.dtx 5901 2015-09-02 05:59:23Z joseph $ {L3 Comma separated lists} %</driver|package> %<*driver> @@ -80,7 +80,7 @@ % \clist_put_left:Nn \l_my_clist { ~ a ~ , ~ {b} ~ } % \clist_put_right:Nn \l_my_clist { ~ { c ~ } , d } % \end{verbatim} -% results in \cs{l_my_clist} containing |a,{b},{c~},d|. +% results in |\l_my_clist| containing |a,{b},{c~},d|. % Comma lists cannot contain empty items, thus % \begin{verbatim} % \clist_clear_new:N \l_my_clist @@ -425,7 +425,7 @@ % \begin{syntax} % \cs{clist_map_break:} % \end{syntax} -% Used to terminate a \cs{clist_map_\ldots} function before all +% Used to terminate a |\clist_map_...| function before all % entries in the \meta{comma list} have been processed. This will % normally take place within a conditional statement, for example % \begin{verbatim} @@ -438,7 +438,7 @@ % } % } % \end{verbatim} -% Use outside of a \cs{clist_map_\ldots} scenario will lead to low +% Use outside of a |\clist_map_...| scenario will lead to low % level \TeX{} errors. % \begin{texnote} % When the mapping is broken, additional tokens may be inserted by the @@ -452,7 +452,7 @@ % \begin{syntax} % \cs{clist_map_break:n} \Arg{tokens} % \end{syntax} -% Used to terminate a \cs{clist_map_\ldots} function before all +% Used to terminate a |\clist_map_...| function before all % entries in the \meta{comma list} have been processed, inserting % the \meta{tokens} after the mapping has ended. This will % normally take place within a conditional statement, for example @@ -466,7 +466,7 @@ % } % } % \end{verbatim} -% Use outside of a \cs{clist_map_\ldots} scenario will lead to low +% Use outside of a |\clist_map_...| scenario will lead to low % level \TeX{} errors. % \begin{texnote} % When the mapping is broken, additional tokens may be inserted by the @@ -601,7 +601,7 @@ % % \begin{function}[TF, added = 2012-05-14]{\clist_pop:NN, \clist_pop:cN} % \begin{syntax} -% \cs{clist_pop:NNTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code} +% \cs{clist_pop:NNTF} \meta{comma list} \meta{token list variable} \Arg{true code} \Arg{false code} % \end{syntax} % If the \meta{comma list} is empty, leaves the \meta{false code} in the % input stream. The value of the \meta{token list variable} is @@ -664,14 +664,14 @@ % % \section{Viewing comma lists} % -% \begin{function}[updated = 2012-09-09]{\clist_show:N, \clist_show:c} +% \begin{function}[updated = 2015-08-03]{\clist_show:N, \clist_show:c} % \begin{syntax} % \cs{clist_show:N} \meta{comma list} % \end{syntax} % Displays the entries in the \meta{comma list} in the terminal. % \end{function} % -% \begin{function}[updated = 2012-09-09]{\clist_show:n} +% \begin{function}[updated = 2013-08-03]{\clist_show:n} % \begin{syntax} % \cs{clist_show:n} \Arg{tokens} % \end{syntax} @@ -738,7 +738,7 @@ % % \subsection{Allocation and initialisation} % -% \begin{macro}{\clist_new:N,\clist_new:c} +% \begin{macro}{\clist_new:N, \clist_new:c} % \UnitTested % Internally, comma lists are just token lists. % \begin{macrocode} @@ -1813,20 +1813,24 @@ % % \begin{macro}{\clist_show:N, \clist_show:c} % \begin{macro}{\clist_show:n} -% Apply the general \cs{__msg_show_variable:Nnn}. In the case -% of an \texttt{n}-type comma-list, first store it -% in a scratch variable, then show that variable: -% The message takes care of omitting its name. +% Apply the general \cs{__msg_show_variable:NNNnn}. In the case +% of an \texttt{n}-type comma-list, we must do things by hand, +% using the same message \texttt{show-clist} as for an +% \texttt{N}-type comma-list but with an empty name (first +% argument). % \begin{macrocode} \cs_new_protected:Npn \clist_show:N #1 { - \__msg_show_variable:Nnn #1 { clist } + \__msg_show_variable:NNNnn #1 + \clist_if_exist:NTF \clist_if_empty:NTF { clist } { \clist_map_function:NN #1 \__msg_show_item:n } } \cs_new_protected:Npn \clist_show:n #1 { - \clist_set:Nn \l_@@_internal_clist {#1} - \clist_show:N \l_@@_internal_clist + \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-clist } + { } { \clist_if_empty:nF {#1} { ? } } { } { } + \__msg_show_wrap:n + { \clist_map_function:nN {#1} \__msg_show_item:n } } \cs_generate_variant:Nn \clist_show:N { c } % \end{macrocode} |