[XeTeX] XeTeX, colour, \special, \shipout

Jonathan Kew jfkthame at gmail.com
Sat Jun 20 13:56:22 CEST 2020


On 19/06/2020 15:08, Philip Taylor wrote:
> XeTeX does what is expected if one uses \special {background cmyk 0.83 
> 0.82 0.21 0.60} and ships out pages in the normal way; however, if 
> \shipout is invoked directly, the shipped out boxes have a transparent 
> ground.  How should the background colour of boxes which will be 
> shipped out directly be specified ?
>
> /Philip Taylor/

Hi Philip,

The following example seems to work as expected for me:

% - - - - -
\special {background cmyk 0.83 0.82 0.21 0.20}
Normal page with background colour.
\vfil\eject

\shipout\vbox{Direct shipout with same background.}

\shipout\vbox{\special {background cmyk 0.21 0.82 0.83 0.10} Direct 
shipout with new background.}

\end
% - - - - -

To work, the background \special must have already been seen by the 
driver at the time the page is shipped out, or it must be part of the 
content of the page.

What won't work is something like this:

% - - - - -
\special {background cmyk 0.83 0.82 0.21 0.20}

\shipout\vbox{Direct shipout; this will NOT have the background.}

\end
% - - - - -

because the \special won't yet have been sent to the output driver at 
the time the \shipout happens.

HTH,

JK



More information about the XeTeX mailing list.