4

Here is the following simple code

\begin{tikzpicture}

\fill[black] (0,0) rectangle (8,1);
\fill[white,fading=west] (0,0) rectangle (8,1);

\end{tikzpicture}

I use it with the following library \usetikzlibrary{fadings} but it won't compile and I get the following message:

Package pgf Warning: Your graphic driver pgfsys-xetex.def does not support fadings. This warning is given only once on input line 31.

Any clues?

  • 4
    The message says it all: the TikZ XeTeX drivers do not support fadings. – Joseph Wright Jul 16 '12 at 16:53
  • It does not support alpha, either. – JLDiaz Jul 11 '16 at 17:15
5

The answer provided by @JosephWright above is accurate: fadings are not supported by the XeTeX graphic driver. That is, if you are using some sort of fading in your code (a drop shadow for example), it will probably be rendered by XeTeX, but it won't look as good as TikZ intended it to look.

I always compile through PostScript (DviPs) because I also use some PostScript features (pstricks, etc.) in my documents, so I get the same warning (pgfsys-dvips.def instead of pgfsys-xetex.def). Compiling the code below...

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{fadings}

\begin{document}

\begin{tikzpicture}[scale=4, every node/.style={scale=4}]
 \node[circle,fill=white,draw=black,thick,
       preaction={
         fill=black,opacity=.3,
         path fading=circle with fuzzy edge 20 percent,
         transform canvas={xshift=3mm,yshift=-3mm}
       }] (1) at (0,0) {1};
\end{tikzpicture}

\end{document}


... yields the following results :

TikZ drop shadow example through pdflatex and PostScript

Since there are situations in which this warning message cannot be avoided, I suggest hiding it using the silence package, as shown in the example below:

\documentclass{article}

\usepackage{silence}
  %% Filter all warning messages from package pgf starting with "Your graphic driver"
  \WarningFilter{pgf}{Your graphic driver}

\usepackage{tikz}
\usetikzlibrary{fadings}

\begin{document}

\begin{tikzpicture}[scale=4, every node/.style={scale=4}]
 \node[circle,fill=white,draw=black,thick,
       preaction={
         fill=black,opacity=.3,
         path fading=circle with fuzzy edge 20 percent,
         transform canvas={xshift=3mm,yshift=-3mm}
       }] (1) at (0,0) {1};
\end{tikzpicture}

\end{document}


This will not make the fading look better when compiled through XeTeX, but it will remove the warning.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.