LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Monospaced Font
Show HTML 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, 22 Feb 2011 15:35:08 -0500
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
MIME-Version: 1.0
Message-ID: <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1
From: Bruno Le Floch <[log in to unmask]>
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