I would like to have callouts with multiple pointers. These callouts should have an opacity that is different from 1 and drop a shadow. Further, ideally they should come as overlays. There are two brilliant answers allowing one to created callouts with multiple pointers, callouts with multiple pointers and callout with multiple pointers, how to design it. Using the first of these posts, I can almost achieve what I want, but not quite.
Here is my MWE:
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{shapes.callouts,shadows.blur,positioning,arrows}
\makeatletter
\tikzset{ % from https://tex.stackexchange.com/a/109506/121799
expand me/.style={#1},
multiple absolute pointers/.style args={#1[#2]#3#4}{
insert path={
\foreach \qrr@tikz@calloutabsolutepointer in {#3} {
\pgfextra
\expandafter\pgfutil@ifnextchar\expandafter[%
\expandafter\qrr@tikz@parse@calloutabsolutepointer\expandafter{%
\expandafter\qrr@tikz@parse@calloutabsolutepointer\expandafter[\expandafter]\expandafter}\qrr@tikz@calloutabsolutepointer\@qrr@tikz@parse@calloutabsolutepointer
\endpgfextra
node[#2, shape/.expanded=\tikz@shape\space callout, expand me/.expanded=\qrr@tikz@calloutabsolutepointer@options, callout absolute pointer={(\qrr@tikz@calloutabsolutepointer@)}] {#4}
}
\pgfextra
\def\pgf@tempa{#1}
\pgfutil@in@*{#1}
\ifpgfutil@in@\else
\pgfkeysalso{insert path={node[#2] {#4}}}
\fi
\endpgfextra}}}
\def\qrr@tikz@parse@calloutabsolutepointer[#1]#2\@qrr@tikz@parse@calloutabsolutepointer{%
\gdef\qrr@tikz@calloutabsolutepointer@options{#1}%
\gdef\qrr@tikz@calloutabsolutepointer@{#2}%
}
% from https://tex.stackexchange.com/a/361532/121799
% The goal is to translate
% \overlaynode<red,blue>{hallo};
% into
% \node[red]{hallo};
% \node[blue]{hallo};
\def\overlaynode<#1>#2;{
\gdef\stacknodecommonpart{#2}
\pgfkeys{/typeset node/.list={#1}}
% we are lazy
% pgfkeys will translate
% \pgfkeys{/typeset node/.list={red,blue}}
% into
% \pgfkeys{/typeset node=red}
% \pgfkeys{/typeset node=blue}
}
\pgfkeys{
/typeset node/.code={
\edef\pgf@marshal{\noexpand\node[#1]\stacknodecommonpart;}
\pgf@marshal
}
}
\def\overlaynodedrawfill{\pgfutil@ifnextchar[{\overlaynodedrawfill@opt}{\overlaynodedrawfill@opt[]}}
\def\overlaynodedrawfill@opt[#1]<#2>#3;{
\begin{scope}[transparency group,draw=black,fill=white,line cap=round,line join=round,#1]
\pgfmathsetmacro\pgflinewidthdouble{2\pgflinewidth}
\overlaynode<#2>[draw=pgfstrokecolor,line width=\pgflinewidthdouble]#3;
\overlaynode<#2>[fill=pgffillcolor]#3;
\end{scope}
}
\makeatother
\newcommand{\tikznode}[2]{\relax
\ifmmode%
\tikz[remember picture,baseline=(#1.base),inner sep=0pt] \node (#1) {$%\tikznodestyle
#2$};
\else
\tikz[remember picture,baseline=(#1.base),inner sep=0pt] \node (#1) {#2};%
\fi}
%
\begin{document}
\begin{frame}
\frametitle{Pythagoras}
\begin{overlayarea}{\textwidth}{\textheight}
Pythagoras theorem says that\\[3cm]
\[ \tikznode{a}{a}^2+\tikznode{b}{b}^2~=~\tikznode{c}{c}^2\]
\tikz[remember picture,overlay,opacity=0.8]{
\path[multiple absolute pointers={
[text opacity=1,fill=blue!20,align=center, above=2cm of a,xshift=-2.3cm,
anchor=north west,rounded corners,draw=none,blur shadow]
{[fill=blue!20]a.north,[fill=blue!20]b.north}
{shorter edges}
}];
}
\tikz[remember picture, overlay,opacity=0.8]{
\node[blur shadow,text opacity=1,
align=center, fill=blue!20,
rounded corners,draw=none,rectangle callout,
anchor=pointer,callout absolute pointer={(c)},above right=2cm of c] {longer edge};}
\tikz[remember picture, overlay,opacity=0.8]{
\overlaynodedrawfill[draw=none,fill=blue!20,opacity=.8]<
{callout absolute pointer=(a)},
{callout absolute pointer=(b)}
>
[rectangle callout,blur shadow,rounded corners]at (a)
{where am I}
;
}
\tikz[remember picture,opacity=0.8]{
\overlaynodedrawfill[fill=blue!20]<
{callout absolute pointer=(a)},
{callout absolute pointer=(b)},
>
[draw=none,rectangle callout,blur shadow,rounded corners]
at(a){I got lost}
;
}
\end{overlayarea}
\end{frame}
\end{document}
What I am after is the appearance of the "longer edges" callout, but with multiple pointers. The "shorter edges" almost achieves this, but the shadow is drawn after the pointers, so it does not look so good (IMO).
With the second strategy, I couldn't get that far, but this might be the cleaner strategy.
When I use overlay, the callout gets lost, and I don't quite understand why or how one can fix that.
I am unable to cast a shadow.
The placement of the callouts does not terminate , i.e. there is a warning
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
QUESTION: Is it possible to have the same appearance as the "longer edge" callout but multiple pointers? (Ideally, this would be implemented as a single macro that takes a list of nodes the pointers should stretch to as an argument.)


raw? or this only work without shape border line? Symbol's answer https://tex.stackexchange.com/questions/187165/callout-with-multiple-pointers-how-to-design-it/361532#361532 solve this. – Zarko Sep 07 '18 at 11:19preaction={thick,draw}incustom style. – Kpym Sep 09 '18 at 18:22