Code:
\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tikz}
\usetikzlibrary{positioning,calc,shapes}
\usetikzlibrary{backgrounds}
\begin{document}
\begin{tikzpicture}
[
node distance=0.05cm,
note/.style={draw,fill=white,rectangle callout,minimum height=4ex},
content/.style={draw,fill=white, ellipse, }
]
%internal margin of the bordering box
\newlength\height
\setlength\height{10pt}
% nodes
\node[content] (1) {V};
\node[content, right = of 1] (2) {$\alpha$};
% callout - here I don't like hard-coded values 6pt and 0.55
\node[note, below = \height+6pt of 2.south,
callout relative pointer={(0,0.55)}] (2-1) {important coefficient};
% background
\begin{scope}[on background layer]
\draw[fill=gray!0] ($(1.south west)+(-2\height,-\height)$)
rectangle ($(2.north east)+(2\height,\height)$);
\end{scope}
\end{tikzpicture}
\end{document}
Gives this:
- Is it possible to attach the "Important coefficient" callout arrow
to the south of
\alpha
? Currently it is done in an ugly hard-coded way, using(0, 0.55)
. If I change the height of\alpha
circle, it will break. - How can I put the callout "important coefficient"
\height
distance below the bottom line of the bordering box? Currently I use the hard coded value:below = \height+6pt of 2.south
.