10

I copied this code from this answer.

\documentclass[tikz]{standalone}
\begin{document}
\tikz [blend group=screen] {
  \fill[red!90!black]   ( 90:.6) circle (1);
  \fill[green!80!black] (210:.6) circle (1);
  \fill[blue!90!black] (330:.6) circle (1);
}
\end{document}

I compiled it with XeLaTeX, the result is the following:

XeLaTeX output

(FYI it's just a white square)

And this is the output from pdfLaTeX and LuaLaTeX:

pdfLaTeX output

Which is what I was hoping for.

Is this some kind of bug in XeLaTeX? Did I miss something?

Edit: Mark Wibrow in the comments linked this answer, that was compiled with xelatex. Now, my experience with tikz and related graphic packages is very limited: I don't really understand what I'm doing wrong here, but even if it's somehow fixable I'm pretty sure that xelatex and lualatex shouldn't produce such different outcomes.

izabera
  • 665
  • 6
    It's not a bug but a known shortcoming. These features are even new for many PDF viewers let alone TeX engines. And XeLaTeX uses a fundamentally different way of creating PDF. – percusse Jul 03 '14 at 09:21
  • Oh, ok... I guess this means that there's no way to do it with xelatex ): – izabera Jul 03 '14 at 09:51
  • @izabera this answer using blend modes in both PGF and PSTricks was compiled with xelatex from TeX-live 2013. – Mark Wibrow Jul 03 '14 at 17:42
  • @MarkWibrow Thank you. Now I'm a bit puzzled, what's going wrong with my example? – izabera Jul 03 '14 at 17:48
  • @izabera I don't know. Your MWE compiles fine for me with xelatex and produces the intended result. Possibly a version problem. The command xelatex --version gives me XeTeX 3.1415926-2.5-0.9999.3-2013060708 (TeX Live 2013). – Mark Wibrow Jul 03 '14 at 18:16
  • @MarkWibrow How weird, mine is newer! XeTeX 3.14159265-2.6-0.99991 (TeX Live 2014/W32TeX), last version of TeXLive on Windows 8 – izabera Jul 03 '14 at 18:31
  • 1
    @MarkWibrow I can reproduce the error with XeTeX 3.14159265-2.6-0.99991 (TeX Live 2014). I can also reproduce with XeTeX 3.1415926-2.5-0.9999.3-2013060708 (TeX Live 2013). With XeTeX 3.1415926-2.4-0.9998 (TeX Live 2012), I get a complaint about blend mode but I do get the circles in the PDF - just not blended as expected with an older version of tikz. This is GNU/Linux x86_64. Not sure why you don't see the problem with the same version of XeTeX as my 2013 one. – cfr Jul 04 '14 at 22:17
  • @cfr Hmm, I'm on GNU/Linux x86_64 as well. What is your ghostscript version? Mine is 9.14. – Mark Wibrow Jul 05 '14 at 06:44
  • 1
    @cfr actually it's nothing to to do with ghostscript or xelatex, it is beacuase I am using the latest CVS version of PGF. See my answer below. – Mark Wibrow Jul 05 '14 at 08:56

1 Answers1

11

The PGF releases on CTAN and sourceforge contain a bug where the interaction of shadings/transparency and the standalone package and xelatex (and xdvipdfmx) causes problems.

The code will work if, for example, the document class is set to article (and, obviously \usepackage{tikz} is added to the preamble).

This was fixed in the CVS version back in January.

Mark Wibrow
  • 70,437