LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

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: Wed, 2 Sep 2009 20:23:09 +0100
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Subject: Re: xparse
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1
From: Joseph Wright <[log in to unmask]>
Parts/Attachments: text/plain (25 lines)
Lars Hellström wrote:
> Finally, there is the issue that a processor has to put the argument in
> a toks register. I understand this is for generality (only sane way to
> pass along # tokens), but my experience with this type of API is that
> one should make it easy to use commands that happen to already exist. In
> this case, it would mean to also support a processor that would store
> its result in a macro rather than a toks register, since I'm quite sure
> this is what people tend to do unless they definitely need a toks register.

Maybe I'm missing something here, but if we need the processed value
returned in a named variable it should not matter whether it is a toks
or a tl (or indeed anything else). All that needs to happen is

\toks_set:NV \l_xparse_arg_toks <variable-used-in-processor>

which is the same action if <variable-used-in-processor> is a tl or a
toks. As there are add left/right functions for toks, there should also
be no problem "building up" \l_xparse_arg_toks piecewise:

\toks_out_right:Nn \l_xparse_arg_toks { <whatever> }

and so on.
-- 
Joseph Wright

ATOM RSS1 RSS2