This problem occurs when I am trying to improve my answer in this question.
You can compile this code very well
\documentclass[tikz]{standalone}
\usetikzlibrary{bending,decorations.text}
\begin{document}
\begin{tikzpicture}
\sffamily
\node (a) at (-2,0) {probability};
\node[align=center] (b) at (2,0) {percent\\change};
\draw[-latex,postaction={decorate,decoration={raise=1ex,text along path,text align=center,text={multiply by 100}}}] (a) to[out=60,in=120] (b);
\end{tikzpicture}
\end{document}
but don't compile this code!
\documentclass[tikz]{standalone}
\usetikzlibrary{bending,decorations.text}
\begin{document}
\begin{tikzpicture}
\sffamily
\node (a) at (-2,0) {probability};
\node[align=center] (b) at (2,0) {percent\\change};
\draw[-latex,postaction={decorate,decoration={raise=1ex,text along path,text align=center,text={multiply by 100\%}}}] (a) to[out=60,in=120] (b);
\end{tikzpicture}
\end{document}
I have been waiting for more than 200 seconds
Why? I just want to add a percent symbol (\%)!
I think TikZ understood my \% as %, but removing the \ throws many errors.
I even used siunitx, but got the same result.
\documentclass[tikz]{standalone}
\usetikzlibrary{bending,decorations.text}
\usepackage{siunitx}
\begin{document}
\begin{tikzpicture}
\sffamily
\node (a) at (-2,0) {probability};
\node[align=center] (b) at (2,0) {percent\\change};
\draw[-latex,postaction={decorate,decoration={raise=1ex,text along path,text align=center,text={multiply by \SI{100}{\percent}}}}] (a) to[out=60,in=120] (b);
\end{tikzpicture}
\end{document}
So, what's going on?



\relax(except implicit character tokens that raise errors). Bracing the token is the right way to go. – egreg Mar 28 '19 at 17:03