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:
Bruno Le Floch <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 22 Feb 2011 15:35:08 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
I added a parameter to conversion tables. This allows expandable
function mapping through braces, and token replacement, again through
braces.

I remember seeing some people asking for key-word definitions. Since
the code is happy with #, I could code something that would convert

\keywords:n {
    \cs_new:Npn \mybox:nn #{text}...#{width} {
        \hbox  to  #{width}  {#{text}}
    }
}

into      \cs_new:Npn \mybox:nn #1...#2 {     \hbox to #2 {#1}     }.

Is that the syntax we want for key-word arguments? Do we want keyword
arguments at all?



>     \tl_nest_map_function:nN {ab{cd{e}f}g} \foo:n

Now we have this function and

\tl_replace_tokens:nn {ab{cd#{e}~} \foo: } {
    a   { AA }
    d   { \l_foo_tl }
    \foo:   {~}
    #   {hash}
}

giving     AA b {c \l_foo_tl  hash {e} ~} ~

-- 
Bruno

ATOM RSS1 RSS2