Re: [NTG-pdftex] [luatex] tex.enableprimitives producing non-primitives?
On Wed, Sep 23, 2009 at 12:30:40PM +0300, Élie Roux wrote:
[discussion about the use of \pdfprimitive]
Perhaps it becomes clearer, if I quote the pdfTeX manual:
| \pdfprimitive control sequence
|
| This command executes the primitive meaning of the following control
| sequence, if it has been redefined or made undefined. If the following
| control sequence is undefined and never was a primitive, nothing happens
| and no error is raised. If the control sequence was initially expandable,
| \pdfprimitive expands either. Otherwise \pdfprimitive doesn't expand. The
| primitive has been introduced in pdfTEX 1.40.0.
BTW, as you have seen, the second sentence is wrong:
\catcode`\{=1
\catcode`\}=2
\ifx\directlua\undefined
\else
\directlua{tex.enableprimitives('',{'pdfprimitive'})}
\fi
\pdfprimitive\FooBar
\end
pdftex -ini:
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) (INITEX)
...
! Missing primitive name.
<to be read again>
\FooBar
l.7 \pdfprimitive\FooBar
luatex -ini:
This is LuaTeX, Version beta-0.40.6-2009090421 (TeX Live 2009) (INITEX)
...
! Missing primitive name.
<to be read again>
\FooBar
l.7 \pdfprimitive\FooBar
I think, the error message is a good thing, thus the manual should be fixed.
(Therefore I have added ntg-pdftex). Also the manual could meantion, that
\pdfprimitive was fixed in 1.40.4.
Yours sincerely
Heiko
Heiko Oberdiek wrote:
[discussion about the use of \pdfprimitive]
I was unaware of this interesting (and potentially useful) command, so may I make a suggestion as to the documentation ? Where it currently reads : "If the control sequence was initially expandable, \pdfprimitive expands either.", a more idiomatic version might end "..., \pdfprimitive also expands." ** Phil.
participants (2)
-
Heiko Oberdiek
-
Philip TAYLOR