[XeTeX] Colour specials for XeTeX

Philip Taylor P.Taylor at Hellenic-Institute.Uk
Sat Jun 6 18:49:59 CEST 2020

Philip Taylor wrote :

> Well, perhaps I spoke too soon.  Having commented out the x:rulecolor specials and left in thecolor equivalents, I now see in the transcript :
>> [snip]
>> xdvipdfmx:warning: Interpreting special command push (color) failed.
>> xdvipdfmx:warning: >> at page="1" position="(280.364, -23.9104)" (in PDF)
>> xdvipdfmx:warning: >> xxx "color push"
>> xdvipdfmx:warning: Color stack underflow. Just ignore.

To answer my own question — as \special {x: <whatever>} is not supported by the "xdvipdfmx" driver , I used the alternative syntax suggested by Jonathan in the 2005 paper previously cited, where he writes :

> The xdv2pdf driver also supports a set of color \specials based on those
> used in drivers such as dvips and dvipdfm. These begin with the keyword color,
> followed by any of a number of color commands:
> \special {color push}
> \special {color pop}
> \special {color rgb R G B}
> \special {color cmyk CMY K}
> \special {color hls H L S}

However, it would seem that while the "xdv2pdf" driver was happy with \special {color push}, the "xdvipdfmx" driver is not.  It appears to require \special {color push <color>} (e.g., \special {color push cmyk 0.17 0.18 0.79 0.0}), and with that change there are no longer any diagnostics referring to colour.  Clearly Jonathan's paper was written some 15 years ago — what is the recommended source of information today on the set of colour specials accepted by the "xdvipdfmx" driver ?  "TeXdoc xdvipdfmx" returns what I had thought would be the definitive reference, but whilst this makes /mention/ of support for colour \specials, it nowhere defines them, nor (as far as I can see) does it define where they /are/ defined.

/Philip Taylor/

More information about the XeTeX mailing list.