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.

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).

share|improve this question
    
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

3 Answers 3

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).

share|improve this answer
    
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

This is a known bug with PGF/TikZ 2.1 (see http://groups.google.com/group/comp.text.tex/browse_thread/thread/b41b47158ac5d221/b7428bd8ca1084ae?pli=1)

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\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@test\noexpand\endcsname}%
+               \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@node@name\noexpand\endcsname}%
                \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\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@test\noexpand\endcsname}%
+               \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@node@name\noexpand\endcsname}%
                \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\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@test\noexpand\endcsname}%
+               \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@node@name\noexpand\endcsname}%
                \edef\pgf@sh@@@temp{%
                    \noexpand\def\noexpand\calloutpointeranchor{%
                        \noexpand\pgf@x\the\pgf@x%
share|improve this answer
    
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

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.

share|improve this answer
    
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

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.