Using the text along path
decoration option of tikz
, I would like to be able to do line breaks in the text.
Obviously, standard commands such as \\
do not work.
Right now, I am using two different decorations one on top of the other (see MWE), which is not really satisfying.
MWE
\documentclass{article}
\usepackage[linguistics]{forest}
\usetikzlibrary{decorations.pathreplacing,decorations.text}
\begin{document}
\begin{forest}
[ASP,name=pol[\textit{subject}][Asp
[asp][POL
[AdvP[\textit{non},roof]][Pol
[pol, name=nab][aP
[~][a'
[a][root]]]]]]]
\draw[decorate,semithick,decoration={brace,raise=36pt,amplitude=8pt}](pol)--(nab);
\draw[decorate,semithick,decoration={text along path,text align=center,raise=50pt,text=essai}](pol)--(nab);
\draw[decorate,semithick,decoration={text along path,text align=center,raise=50pt+\baselineskip,text=new line on top}](pol)--(nab);
\end{forest}
\end{document}