Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Here is the following siple 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 fadi
ngs. This warning is given only once on input line 31.

Any clues?

share|improve this question
3  
The message says it all: the TikZ XeTeX drivers do not support fadings. –  Joseph Wright Jul 16 '12 at 16:53

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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