I'm trying to have some text repeated along a path. I tried what was prescribed in the PGF manual under /pgf/decoration/text effects/repeat text
, but, as you can see, it doesn't have the effect I want:
I'd like something like below, but repeated around the path:
MWE
\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}
[block/.style={draw, rectangle, minimum size=5cm, align=center}]
\node [block,
postaction={decoration={text effects along path, text={BOX BOUNDARY\ },
text effects/.cd,
repeat text,
character count=\m, character total=\n,
characters={text along path, scale=0.5+\m/\n/2}},
decorate}]
(box){};
\end{tikzpicture}
\end{document}
Best Answer
Apparently, it does not work with a node. Can you use a
rectangle
? (you can always add your node without text on top of the rectangle)