[NTG-pdftex] [Dev-luatex] \primitive\pdfoutput cannot be queried

Taco Hoekwater taco at elvenkind.com
Sat Apr 11 16:18:41 CEST 2009


Hi Heiko,

Taco Hoekwater wrote:
> Heiko Oberdiek wrote:
>> Hello,
>>
>> AFAIK, an expression with \primitive will become expandable
>> if and only if the primitive is expandable.
>> (pdfTeX: \pdfprimitive)
> 
> I am thinking about this bug.

Please look at the attached patch against pdftex trunk. I have a similar
patch in luatex now, and it works ok for your example file as well as
some other stuff I tried.

The patch makes scan_something_internal (for \number and the other 
convert commands) and scan_int (other places where numbers are needed)
skip over the unexpandable version of \primitive so that it looks at
the next token, and if that token is a primitive, it uses this instead.

If the next token is not a primitive at all, then a frozen \relax is
inserted, as that is probably the best thing to do. I have considered
reporting an error, but that is too unpredictable for my taste (and a
"Missing number" error will likely follow anyway).

Please check against any other tests you may have.

Best wishes,
Taco

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: scan_primitive.patch
URL: <http://www.ntg.nl/pipermail/ntg-pdftex/attachments/20090411/31c0c011/attachment.asc>


More information about the ntg-pdftex mailing list