[texhax] Ref. Man. Bausum [was tabbing]

Philip TAYLOR P.Taylor at Rhul.Ac.Uk
Fri Sep 15 01:16:54 CEST 2006



Uwe Lück wrote:

> I know very well about TeX primitives and the asterisk.
> Some misunderstandings seem to lurk here.
> Example: Consider a TeX version TeX- that agrees
> with TeX let alone the fact that TeX- doesn't have
> the primitive \gdef. TeX- then behaves like TeX
> if you include \def\gdef{\global\def} in your macros.

No, it does not.  Here is a short example which
first uses the primitive \gdef and then uses
a macro \gdef which expands to \global \def :

	\def \skiponetok {\let \next = }
	\long \def \foo #1{#1\par}
	\expandafter \skiponetok \gdef \foo {bar}
	\message {\meaning \foo}
	\def \gdef {\global \def}
	\long \def \foo #1{#1\par}
	\expandafter \skiponetok \gdef \foo {bar}
	\message {\meaning \foo}
	\end

Now here is the log file which it produces :
notice the difference between the behaviour of
the primitive and the behaviour of the macro :

	This is pdfeTeXk, Version 3.141592-1.30.3-2.2 (Web2c 7.5.5)
	(format=tex 2006.1.26)  15 SEP 2006 01:09
	**uwe.tex
	(./uwe.tex \long macro:#1->#1\par  macro:->bar [1] )
	Output written on uwe.dvi (1 page, 224 bytes).

Philip Taylor


More information about the texhax mailing list