LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Proportional 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: Wed, 16 Feb 2011 11:01:21 +0000
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID: <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
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 (31 lines)
On 16/02/2011 10:51, Heiko Oberdiek wrote:
> On Wed, Feb 16, 2011 at 07:04:42AM +0000, Joseph Wright wrote:
>> Again, post the code :-) I wonder what exactly you mean here. With the
>> \expanded primitive (pdfTeX 1.50 or LuaTeX) you can do
>>   \edef\a{\expanded{\def\a{b}}}
>> and have \a => 'b'.
> I doubt it. \edef is already expanding, \def is expanded
> but it is not executed as primitive. Depending on the previous
> definition of \a you get:
> * \a previously undefined: error message
> * \a defined, unexpandable: \a is macro => \def\a{b}
> * \a defined, expandable: \a is expanded until only non-expandable
>   tokens are left or there is an error. In case of success,
>   \a is a macro that starts with "\def", followed by the result
>   of fully expansion of "\a{b}..."
> In most cases \edef\a{\def\a{b}} and
> \edef\a{\expanded{\def\a{b}}} are the same, but there might
> be differences, if \a is expandable and \noexpand or
> \the<token register> are used.

I must have misunderstood how \expanded works. I thought it could pull
off assignments within \edef, in the same way you can do with \directlua
and the appropriate Lua.
Joseph Wright