[NTG-pdftex] \ifprimitive and \ifinternal/\iffeature (design proposal)

Taco Hoekwater taco at elvenkind.com
Mon Jul 4 16:06:42 CEST 2005

Hi Heiko,

Heiko Oberdiek wrote:
> What is the result of \ifprimitive, it is \iftrue/\iffalse or
> an expansion text "true"/"some error message"?

as in \iftrue/\iffalse: it is a 'real' \if test .

>>  \executeprimitive <csname>
> What about \executeprimitive itself?
>   \def\executeprimitive{Hello World}
>   \executeprimitive\executeprimitive\relax
> Is the result two "Hello World" or "\relax"?

This result is

   Hello WorldHello World\relax

Without the \def line, you would get only:


(the first \executeprimitive executes the second which executes
the internal version of \relax)

>>  \ifinternal <csname>
>>  \executeinternal <csname>
>>  \exposeinternal <csname>
>>  \obscureinternal <csname>
> It needs some thinking.
> First thoughts:
> * It looks like a first step to a real namespace implementation,
>   a (perhaps read-only) internal namespace, namespaces for extensions,
>   and user/package macros. Why not going further then?

TeX's current internal structure does not allow a clean solution,
so if we want true namespaces in TeX, we probably have to start
thinking about a successor to pdftex. Otherwise, we would need
to redesign the whole symbol table / token handling while trying
to remain 100% compatible. That sounds like a nightmare to me.

These last 4 primitives I proposed are an attempt to come up with
something that works next month (as opposed to next year), but
you are right that it probably needs more thinking, anyway.


More information about the ntg-pdftex mailing list