LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Morten Høgholm <[log in to unmask]>
Tue, 8 May 2007 13:14:02 +0200
text/plain (52 lines)
On 5/5/07, Andreas Matthias <[log in to unmask]> wrote:
> 1) I suppose there's a bug in \prop_map_function_aux:NNn.

Yes, thanks. Will fix in source as soon as I get access from my laptop
(tonight I hope).

> 2) I have no idea how to use \prop_map_inline:NN. Can someone
>    show me? There seems to be a missing \prop_map_function:N.

Hmm, the code does look odd. I wonder why it wasn't written in a more
straightforward manner. Here's a combined test+fix document.



% also missing:
\def:Npn \prop_map_function:Nc {\exp_args:NNc \prop_map_function:NN}
% fix
\def:Npn \prop_map_function_aux:NNn #1#2#3{
  \if_meaning:NN \q_nil #2
    \exp_after:NN \prop_map_break:w
  \prop_map_function_aux:NNn #1
% fix
\def_long:Npn \prop_map_inline:Nn #1#2 {
  \num_incr:N \l_prop_inline_level_num
  \def_long:cpn {prop_map_inline_ \num_use:N \l_prop_inline_level_num :n}
  \prop_map_function:Nc #1
    {prop_map_inline_ \num_use:N \l_prop_inline_level_num :n}
  \num_decr:N \l_prop_inline_level_num

\prop_new:N \l_testa_plist
\prop_put:NNn \l_testa_plist \keya {info1}
\prop_put:NNn \l_testa_plist \keyb {info2}
\prop_put:NNn \l_testa_plist \keyc {info3}

\prop_map_inline:Nn \l_testa_plist{
    \io_put_term:x{\token_to_string:N #1\space =\space #2}