LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Morten Høgholm <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 8 May 2007 13:14:02 +0200
Content-Type:
text/plain
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.


\documentclass{article}

\usepackage{l3prop,l3quark}
\CodeStart

% 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
  \fi:
  #1#2{#3}
  \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}
    ##1##2{#2}
  \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}
}

\stop

-- 
Morten

ATOM RSS1 RSS2