LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Tue, 8 May 2007 13:14:02 +0200
Content-Disposition: inline
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Subject: Re: l3prop
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
From: Morten Høgholm <[log in to unmask]>
Parts/Attachments: 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}