LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced 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, 16 Feb 2011 11:51:25 +0100
Content-Disposition: inline
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=us-ascii
From: Heiko Oberdiek <[log in to unmask]>
Parts/Attachments: text/plain (27 lines)
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.

Yours sincerely
  Heiko <[log in to unmask]>