diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3prg.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3prg.dtx | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx index ae119af2067..4a91ce9a8a4 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -313,6 +313,16 @@ % based on this result. % \end{function} % +% \begin{function}[EXP, added = 2021-11-01]{\bool_to_str:N, \bool_to_str:c, \bool_to_str:n} +% \begin{syntax} +% \cs{bool_to_str:N} \meta{boolean} +% \cs{bool_to_str:n} \meta{boolean expression} +% \end{syntax} +% Expands to the letters \texttt{true} or \texttt{false} depending on +% the logical truth of the \meta{boolean} or \meta{boolean +% expression}. +% \end{function} +% % \begin{function}[added = 2012-02-09, updated = 2021-04-29]{\bool_show:N, \bool_show:c} % \begin{syntax} % \cs{bool_show:N} \meta{boolean} @@ -961,20 +971,24 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[EXP]{\bool_to_str:N, \bool_to_str:c, \bool_to_str:n} +% Expands to \texttt{true} or \texttt{false} with category code letter. +% \begin{macrocode} +\cs_new:Npn \bool_to_str:N #1 { \bool_if:NTF #1 { true } { false } } +\cs_generate_variant:Nn \bool_to_str:N { c } +\cs_new:Npn \bool_to_str:n #1 { \bool_if:nTF {#1} { true } { false } } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\bool_show:n, \bool_log:n} -% \begin{macro}{\@@_to_str:n} -% Show the truth value of the boolean, as \texttt{true} or -% \texttt{false}. +% Show the truth value of the boolean. % \begin{macrocode} \cs_new_protected:Npn \bool_show:n - { \msg_show_eval:Nn \@@_to_str:n } + { \msg_show_eval:Nn \bool_to_str:n } \cs_new_protected:Npn \bool_log:n - { \msg_log_eval:Nn \@@_to_str:n } -\cs_new:Npn \@@_to_str:n #1 - { \bool_if:nTF {#1} { true } { false } } + { \msg_log_eval:Nn \bool_to_str:n } % \end{macrocode} % \end{macro} -% \end{macro} % % \begin{macro}{\bool_show:N, \bool_show:c, \bool_log:N, \bool_log:c, \@@_show:NN} % Show the truth value of the boolean, as \texttt{true} or |