Mime-Version: |
1.0 (Apple Message framework v930.3) |
Sender: |
|
Subject: |
|
From: |
|
Date: |
Fri, 13 Feb 2009 10:02:27 +1030 |
In-Reply-To: |
|
Content-Type: |
multipart/signed; boundary=Apple-Mail-2-623793501; micalg=sha1;
protocol="application/pkcs7-signature" |
Reply-To: |
|
Parts/Attachments: |
|
|
On 12/02/2009, at 5:36 PM, Joseph Wright wrote:
> A more complex example:
>
> \def\foo{\edef\bar{stuff}}
>
> is not fully expandable, but if you get the test working should give
> \c_true. So I think this might not be a good idea. (I assume that
> this
> test is supposed to see if something is a macro. I do that in
> siunitx,
> but using \meaning and looking for "macro".)
I think this function is supposed to mean "check if the token will (or
has the capability to) expand into something else". So it's not
exactly testing for being a macro or otherwise, more if it will
"change" when used in an edef or similar.
> Should~be~F:~\token_if_expandable:NTF \the {T} {F} \\
So here, while \the isn't a macro, it will expand when used correctly
in an edef (e.g., \edef\foo{\the\baselineskip} ). I've explicitly
caught undefined macros to return "F" because it just seemed more
logical that way.
Three questions, then:
1. Have I got the idea behind this function right? (Morten?)
2. Was it indeed originally broken, and does my code fix it?
3. Can we think of a less confusing name for it?
Maybe \token_if_will_expand ?
Unless it's only me that finds "\token_if_expandable" confusing.
(4. What is it good for?)
Cheers,
Will
|
|
|