[pdftex] color package in pdfTeX under plain TeX
geolsoft at mail.ru
geolsoft at mail.ru
Tue Aug 2 20:23:55 CEST 2005
Dear list members,
I am trying to use color package of graphics bundle with
pdftex and plain TeX. According to
http://pdftex-def.berlios.de/
`questions regarding the usage of pdftex.def ... should be
directed to the pdfTeX list', so here it goes.
Version of pdftex.cfg I use is 0.03m, the latest I could
find. pdfTeX is
This is pdfTeX, Version 3.14159-1.10b (Web2C 7.4.5)
Question 1.
First off, I don't know what is the proper way to select
pdftex driver, or any other driver different from the
default `dvips'. The code I used at the top of the attached
test file `grfcolor.tex' was adapted from
$TEXMF/tex/latex/graphics/color.tex. Is this the way to do
it?
Question 2.
Next, I have the following problem when using \pagecolor
command. For every page of output, I get this kind of
error:
! Output routine didn't use all of \box255.
and no headline/footline, only main body of a page. See the
same test file `grfcolor.tex', compile command is at the
bottom (compile-command line).
The patch I send fixes the problem for plain TeX, but I
don't know whether this solution is compatible with LaTeX,
most probably not.
The problem as I see it is as follows:
\shipout is (re)defined by pdftex.def as
\gdef\shipout{%
\afterassignment\GPT at shipout
\global\setbox\@cclv=%
}%
and plain TeX defines its output routine as
\output{\plainoutput}
where \plainoutput is
\def\plainoutput{\shipout\vbox{\makeheadline\pagebody\makefootline}%
\advancepageno
\ifnum\outputpenalty>-\@MM \else\dosupereject\fi}
\afterassignment\GPT at shipout in the (re)definition of
\shipout above causes \GPT at shipout to be expanded after the
`{' of `\shipout\vbox' in the \plainoutput (and not after
the `}'). Therefore, the `real' primitive \shipout happens
at the beginning of that \vbox, shipping out \box255,
without headline, footline or any insertions. After that
\box255 becomes void, and the headline, footline and any
insertions go into \box255, causing the `Output routine...'
error message.
Can someone please tell me if I am doing something wrong, or
if I should file a bug report on pdftex-def-dev mailing
list.
Thanks in advance for insight on any of the two problems.
--
Best regards,
Oleg Katsitadze
-------------- next part --------------
--- pdftex.def.orig 2005-08-02 19:32:15.000000000 +0300
+++ pdftex.def 2005-08-02 19:35:44.000000000 +0300
@@ -216,15 +216,18 @@
\aftergroup\GPT@@shipout
\GPT at pageliteral
\else
- \GPTorg at shipout\vbox{%
- \GPT at pageliteral
- \box\@cclv
- }%
+ \aftergroup\GPT@@@shipout
\fi
}%
\gdef\GPT@@shipout{%
\GPTorg at shipout\box\@cclv\relax
}%
+ \gdef\GPT@@@shipout{%
+ \GPTorg at shipout\vbox{%
+ \GPT at pageliteral
+ \box\@cclv
+ }%
+ }%
\gdef\GPT at pageliteral{%
\pdfliteral direct{%
q % gsave
More information about the pdftex
mailing list