[NTG-pdftex] \expanded
Hans Hagen
pragma at wxs.nl
Mon Dec 10 11:23:57 CET 2007
Heiko Oberdiek wrote:
> Hello,
>
> On Sun, Dec 09, 2007 at 08:14:31PM +0100, Morten Høgholm wrote:
>
>> Usually the x expansion meant "uses \edef" and so they were all
>> non-expandable. But now that we have pdfeTeX'ed the l3 kernel, we have
>> functions doing full expansion like \numexpr and friends and \pdfstrcmp
>> (does \edef on both arguments) used in \tlist_if_eq:xxTF. This reminds me:
>> the notes from the Oldenburg meeting mentions an \expanded primitive:
>> \expanded <general text>
>> Expandable command returning the full expansion
>> of the tokens in <general text>.
>> So since this pretty much exists inside \pdfstrcmp as it is now, it could
>> go into pdfTeX 1.50 and we would be free of these problems. Except of
>> course, \expanded is already used a lot in ConTeXt with different
>> semantics.
>>
>> Any opinions from the ConTeXt/pdfTeX people here?
well, \protected also existed in context before etex had it (and
probably a few more)
if \expanded is added as primitive i would probably \let the primitive
to something else then
the main problem that i see is that the 'context' \expanded is a user
command so they would get confused if they want to use the primitive
> Biggest problem is probably a good name:
> a) \expanded would be a nice name, but it clashes with ConTeXt.
> I remember trouble with \unexpanded :-(
> b) It would belong to e-TeX, but there isn't a e-TeX prefix:
> \etexexpanded or \etexexpand
> c) pdfTeX's convention with prefix "\pdf" (see \pdfstrcmp, \pdfescape*):
> \pdfexpanded or \pdfexpand
> d) longer names
>
> My preference is c) to avoid trouble with macro name clashes.
> I can live with a), then my package etexcmds would get a
> new macro \etex at expanded.
we think (also speaking for taco) that \expanded as new primitive name
is okay; the \pdfprefixed ones already are adding ugliness and we should
avoid unnatural primitive names
in context we'll deal with it somehow, after all, there are already
clashes and since there is no such primitive, users don't expect it as
such and when needed, they can deal with \primitive\expanded
in general, adding new primitives with clashing names is only a problem
for cross macropackage usage, but this can be dealt with since there is
not that much shared (my experience is that the biggest problem is not
in primitive usage but in catcode and lccode mess)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the ntg-pdftex
mailing list