LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced 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:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Mon, 10 Aug 2009 22:24:23 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
Joseph Wright wrote:
> There is a bigger issue than simply \peek_<whatever> here. With
> \newcommand, it is only the first argument that is ever checked, so it
> is possible to do things in an expandable fashion. I assume that it is
> feasible to do the same for the first n arguments. However, with xparse
> there is the possibility to do:
> 
> \DeclareDocumentCommand \foo { o m o m } % Or whatever syntax!
> 
> which I don't see being easy (possible?) to do in an expandable way.
> You've then got to factor in the parallel question about
> post-processing: this would pretty certainly fail. (That is before you
> factor in other argument types.)
> 
> I guess that using LuaTeX this type of thing becomes a lot easier.  I
> wonder if this is a case where as Jonathan Fine suggests we are trying
> to do things TeX macros simply cannot do because of the nature of TeX
> (even with the various extensions).

I should add that I think xparse should check if all of the arguments
are of type "m", and if so not do any grabbing but just \protected\def
the function directly. (The same is true for no arguments at all.) This
is on my "to do" list once the discussion reaches some conclusions or at
least directions.
-- 
Joseph Wright

ATOM RSS1 RSS2