callout and beamer

I am trying the callout code that Andrew has provided at How to open a temporary comics-like balloon in a beamer slide?, but I am getting an error:

Undefined control sequence. \pgf@sh@bg@ellipse callout ...pgf@sh@np@\pgf@test \noexpand \endcsname }\ede... l.20 \end{frame}


I am using TexLive-2011 on Mac OS X Lion (10.7.2).

-
I have the same problem. Also TeXlive 2011, but with WinXP. –  knut Oct 18 '11 at 13:03
Hmm, same issue here. Problem seems to be with the callout absolute pointer. Not really sure what is going on there. On TeTeX on Linux, yeah, I know, old... It's Tikz 2.10 though. –  Roelof Spijker Oct 18 '11 at 13:09
yes, I get the same problem, but we ignore the error, we can get the slides. –  Pig Cry Oct 18 '11 at 13:15
yes, but the positioning is off, isnt it? Since the absoule pointer doesn't work. –  Roelof Spijker Oct 18 '11 at 13:48
no, if you run it two times, you can get the right position. –  Pig Cry Oct 18 '11 at 14:03

Save the following patch as pgflibraryshapes.callouts.code.tex.diff and apply it to the file pgflibraryshapes.callouts.code.tex (you might want to create a backup first), e.g. by

patch -i pgflibraryshapes.callouts.code.tex.diff ${TEXMF}/tex/generic/pgf/libraries/shapes/pgflibraryshapes.callouts.code.tex (where ${TEXMF} is the path to your local TEXMF directory)

@@ -247,9 +247,9 @@
\pgf@lib@callouts@shortenpointer%
\pgf@lib@ellipsecallout@getpoints%
\calloutpointeranchor%
-           \ifx\pgf@test\pgfutil@empty%
+           \ifx\pgf@node@name\pgfutil@empty%
\else%
\edef\pgf@sh@@@temp{%
\noexpand\def\noexpand\calloutpointeranchor{%
\noexpand\pgf@x\the\pgf@x%
@@ -568,15 +568,15 @@
\pgfmathsetlengthmacro\pointerwidth{\pgfkeysvalueof{/pgf/callout pointer width}}%
\pgf@lib@rectanglecallout@pointer%
%
-           % \pgf@test = the shape name (from \pgfmultipartnode)
+           % \pgf@node@name = the shape name (from \pgfmultipartnode)
%
-           \ifx\pgf@test\pgfutil@empty%
+           \ifx\pgf@node@name\pgfutil@empty%
\else%
%
% Now hack an extra saved anchor \calloutpointeranchor,
% with the new anchor for the callout pointer.
%
\edef\pgf@sh@@@temp{%
\noexpand\def\noexpand\calloutpointeranchor{%
\noexpand\pgf@x\the\pgf@x%
@@ -862,9 +862,9 @@
\pgfextract@process\calloutpointer{%
\pgfpointanchor{pgf@lib@callout@pointer}{center}%
}%
-           \ifx\pgf@test\pgfutil@empty%
+           \ifx\pgf@node@name\pgfutil@empty%
\else%
\edef\pgf@sh@@@temp{%
\noexpand\def\noexpand\calloutpointeranchor{%
\noexpand\pgf@x\the\pgf@x%

-
The suggested patch fails with the following error: (Patch is indented 4 spaces.) patching file pgflibraryshapes.callouts.code.tex Hunk #1 FAILED at 247. Hunk #2 FAILED at 568. Hunk #3 FAILED at 862. 3 out of 3 hunks FAILED -- saving rejects to file pgflibraryshapes.callouts.code.tex.rej Any idea why? –  01es Apr 11 '12 at 17:06
+1 Applying the patch by manually modifying the file worked. Thanx for the patch. –  01es Apr 11 '12 at 17:28
@01es: The indentation of the patch was indeed the culprit: The the @@ lines must start with column 1. All others: I have edited the patch so that a simple Copy&Paste should now work. –  Daniel Apr 11 '12 at 18:10

http://old.nabble.com/callout-absolute-pointer---desired-effect-but-compile-error-td30937456.html gives a much less intrusive solution:
Make sure you have the following in the preamble:

\usetikzlibrary{shapes.callouts}
\usetikzlibrary{decorations.text}


The second library is the non-intuitive part; it defines the missing \pgf@test.

Indeed worked for me with pgf 2.10-1 (ubuntu 12.04).

-
in addition to user7725's post, in my case the decoration.text solution worked, while the patching produced wrong output (callout pointing to (0,0) in place of the specified point) –  davide Dec 10 '12 at 18:42
This works for me. –  hengxin Nov 23 '13 at 14:06

There is a similar question TikZ “callout” positioning problem. I find other solution from internet, we can replace all \pgf@test by \pgf@node@name in pgflibraryshapes.callouts.code.tex.

-
Well spotted! I've linked the questions together, particularly as Daniel's answer above is the fuller answer. –  Loop Space Oct 18 '11 at 16:50