[XeTeX] colour \specials not working with xdvipdfmx driver?
Paul Howson
paul-lists at tdgq.com.au
Tue Sep 11 22:42:00 CEST 2007
On 10/09/2007, at 9:04 PM, Jonathan Kew wrote:
> I said a few days ago that these were supported in xdvipdfmx, but I
> was mis-remembering. Apologies for the confusion!
>
> The dvips-style "color" special should work (e.g., \special{color rgb
> R G B} where R G B are decimal values in the range 0.0 - 1.0).
Yes, I eventually discovered that through trial and error.
Some other discoveries:
DISCOVERY 1
These dvipdfm specials (examples straight from the dvipdfm manual) do
not work:
\special{ pdf: bc [ 1 0 0 ] }
\special{ pdf: ec }
They are meant to be BeginColor and EndColor -- changing colours and
pushing and popping a colour stack. They don't work in xdvipdfmx,
producing this error report:
** WARNING ** Invalid color specification?
** WARNING ** Interpreting special command bc (pdf:) failed.
** WARNING ** >> at page="1" position="(72, 769.82)" (in PDF)
** WARNING ** >> xxx " pdf: bc [ 1 0 0 ] "
** WARNING ** End color with no corresponding begin color.
DISCOVERY 2
As you say, \special{color rgb R G B} DOES work. HOWEVER, these
specials don't work:
\special{color push}
\special{color pop}
They have no effect -- i.e. if you do a push, change the colour to
red for example, typeset something and then do a pop, the colour does
NOT revert to black, it stays as red.
DISCOVERY 3
There is a very strange bug with \special{color rgb R G B}. On a long
document, using this command inside macros to switch colours, we kept
getting this error from xdvipdfmx:
** ERROR ** Only RGB/CMYK/Gray currently supported
Paring the document back step by step eventually stopped the error.
It appears that this error is generated after a certain number of
colour change operations (i.e. \special{color rgb ...} commands).
The only way to prevent it is to insert a color push before each
colour change, like this:
\special{color push}\special{color rgb R G B}
Then it works for the long document. Crazy.
The saga of getting xetex/xdvipdfmx working on Linux to process a
file that works perfectly with xetex/xdv2pdf on the Mac continues ...
I will post a separate note about font issues.
Paul Howson
----------------------------------------------------------------
Paul Howson
The Design Group Qld, Warwick Qld Australia (www.tdgq.com.au)
email: paul at tdgq.com.au blog: www.tdgq.com.au/blog
GRAPHIC DESIGN WEB SITE DESIGN
More information about the XeTeX
mailing list