[pdftex] [NTG-pdftex] q..Q rules again

Paweł Jackowski P.Jackowski at gust.org.pl
Tue May 8 13:39:45 CEST 2007


>   1 0 0 1 115.925 622.631 cm
>   Q 1 0 0 1 12 0 cm
>   Q
>   1 0 0 1 -115.925 -622.631 cm
> The switched last two lines probably cause your trouble.

Of course it does, that is exactly what I'm talking about.

> I wouldn't use "page" for stuff that affects the transform
> matrix. See also the latest pdftex.def.

This is not the question of my preferences, I'm showing a heavy 
inconsistence in pdfTeX behaviour. Look:

	1\pdfliteral direct{q}2%
	    \pdfliteral{q}3%
	    \pdfliteral{Q}4%
	  \pdfliteral direct{Q}%
	5\end

This gives exactly what I expect. But now just replace '4' with a space:

	1\pdfliteral direct{q}2%
	    \pdfliteral{q}3%
	    \pdfliteral{Q} %
	  \pdfliteral direct{Q}%
	5\end

and you get something completely different and hopelessly spoiled

The reason is that the transformation matrix is not serialized until 
pdfTeX thinks its necessary. If there is no BT..ET before the second Q, 
the matrix is restored _after_ that operator, which leads to disaster.
But I can't see the reason for that postponed matrix restore...

-- 
Pawe/l Jackowski
P.Jackowski at gust.org.pl


More information about the pdftex mailing list