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:
Sun, 29 Jan 2012 13:22:58 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
Hello Will,

On 29/01/2012 12:56, Will Robertson wrote:
> Consider:
> 
>   \csname\ifnum 3 > 2 foo\fi\endcsname
> 
> This (probably obviously to all of you) complains with the standard "Missing \endcsname inserted." presumably because there's an unexpandable implicit \relax inserted somewhere in there.

No, it works fine :-) I assume you were thinking of something else.

> In expl3 we've discussed the concept of "restricted expandability", which refers to an expandable function that doesn't fully expand inside an "f" function (which is expandable \romannumeral-style expansion).
> 
> Does it make sense to also indicate how/where expandable functions won't behave correctly inside "c" arguments? I must admit I haven't considered the ramifications of what these mean entirely. It does seem there's not necessarily much overlap between the f-unexpandable functions and the c-unexpandable ones.

Expansion in an "f"-type argument is more 'restricted' than in a
"x"-type one as "f" expansion stops when the first non-expandable token
is left in the input stream. In that sense, "c"-type expansion should be
compared to "x"-type expansion, since TeX will keep going until it finds
an \endcsname. Now, of course there is a difference as for example a
protected macro is fine in an "x"-type expansion but no in a "c"-type.
-- 
Joseph Wright

ATOM RSS1 RSS2