In the above TikZ picture, how can I
- extend the bounding box to include the text decoration without manual tinkering (the only solution I was able to find is fiddle with the
border
ormargin
class options, see here)? - avoid the error
Package inputenc Error: Unicode char
from the sharp s "ß" on line 24?
Code
\documentclass[tikz,svgnames]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usetikzlibrary{positioning,decorations.text}
\renewcommand{\familydefault}{\sfdefault}
\tikzset{
entity/.style={fill=#1!70,text=white},
action/.style={->,postaction={decorate,decoration={raise=2pt,text along path,text align=center,text={|\scriptsize|#1}}}}
}
\begin{document}
\begin{tikzpicture}
% Entities
\node[entity=DarkGreen] (A) {A};
\node[entity=DarkBlue,right=2 of A] (B) {B};
% Actions
\draw[action=schließen] (A) to [bend left] (B);
\end{tikzpicture}
\end{document}
:^)
I will delete my comment so as not to confuse.action=schlie{ß}en
works.text effects along path
decoration:decoration={raise=2pt, text effects along path, text align=center, text={#1}, text effects/.cd, text along path}
/pgf/decoration/text effects/every character
style. There are various shorthands for this described in the manual p.596 - 603 (for version 3.0.1a)text effects={characters={font=\scriptsize}}