9

Using [baseline] on a tikzpicture with a background layer seems to interfere with the placement of a blur shadow:

enter image description here

MWE (for use with pdflatex):

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows.blur}
\usepackage[T1]{fontenc}
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\begin{document}

\begin{tikzpicture}[baseline]
\node[text width=0.4\textwidth,inner xsep=4mm,inner ysep=2mm] (A){TEXT};
   \begin{pgfonlayer}{background}
   \path[draw=black!30, blur shadow, fill=gray!10]
      (A.south east) -- (A.south west) -- (A.north west)  -- (A.north east) -- cycle ;%
   \end{pgfonlayer}
\end{tikzpicture}

\end{document}

Deleting the [baseline] makes everything work fine, as does substituting drop shadow for blur shadow.

8

This is a bug in pgf-blur. Part of the construction of the drop shadow involves making a new picture and it is incorrectly inheriting the baseline options from the main picture. I've pushed a revision to TeX-SX Launchpad which purports to fix this, but it will need testing (please do!) and it is for the package author to decide on how best to fix this before uploading to CTAN.

  • Running latex on pgf-blur.dtx (revision 169) gives >Package doc Error: Checksum not passed (456<>475). (Presumably this is a cosmetic error.) – Mohan Dec 9 '12 at 20:43
  • @Mohan Yes, at this stage the checksum is cosmetic. – Loop Space Dec 9 '12 at 22:15
  • @LoopSpace tested here, too, it fixes some more bugs, too. Did you try to contact the upstream author and see whether one can get a released fixed version? – norbert Jul 22 '16 at 2:06

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.