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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to add a shadow with a faded edge to nodes. With the following document I only get a grey circle, with a hard edge, slightly below right of the node. This is a snippet form my code. What am I doing wrong?




    \begin{tikzpicture}[scale=4, transform shape]
         \node[circle,fill=white,draw=black,thick,preaction={fill=black,opacity=.3,transform canvas={xshift=1mm,yshift=-1mm,path fading=circle with fuzzy edge 20 percent}}] (1) at (0,0) {1};
share|improve this question
Please always provide full minimal documents not just snippets. Especially with TikZ/PGF which has many extra libraries. This way all what we have to do is Copy&Paste to run the example. Also you should state what exactly doesn't work. – Martin Scharrer Feb 5 '11 at 15:57
@MartinScharrer thanks for the advice, I updated the question. – Zoran Zaric Feb 5 '11 at 16:22
Thanks, but keep in mind that it is supposed to be a minimal example. Avoid all non-essential code, like title and author as well as unrated packages. – Martin Scharrer Feb 5 '11 at 16:44
up vote 4 down vote accepted

The path fading=circle with fuzzy edge 20 percent must be in the argument preaction but outside of the there included transform canvas:

         path fading=circle with fuzzy edge 20 percent,
         transform canvas={xshift=1mm,yshift=-1mm}
       }] (1) at (0,0) {1};


(The fading isn't fully preserved by PDF->PNG and downscaling)


share|improve this answer
@MartinScharrer If I compile your code I only get the node without a shadow. – Zoran Zaric Feb 5 '11 at 16:12
@Zoran: That's funny, it works on my PC. I just tested it again. However it only works with pdflatex, with DVI/PS output I get no shading but the shadow is black. Could you post your flavor and version of latex and tikz please. – Martin Scharrer Feb 5 '11 at 16:43
@Zoran: Thats the latex version I was talking about (the executable, not the format which is LaTeX2e). The TikZ version can be printed by adding \listfiles just above \begin{document}. – Martin Scharrer Feb 5 '11 at 16:53
@Zoran: Which pdf viewer are you using? – Caramdir Feb 5 '11 at 17:05
@MartinScharrer: I'm using Evince. – Zoran Zaric Feb 5 '11 at 17:05

Your Answer


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.