I am accustomed to using the degree symbol in LaTeX and know most of the ways to create it. However I am unable to use the degree symbol within a text decoration. In the following example I simply include the degree symbol as such to illustrate my question:
\path [decorate,decoration={text along path,raise=-2.4ex,text align={left indent=1.1cm},
text={|\sffamily\normalsize\color{MediumBlue}|D U S K~~~at latitude 31.5°N}}]
plot[smooth,tension=0.5] coordinates{ <list of coordinates> };
(Apologies that this is not a proper MWE but just one tikz command with coordinates omitted.)
The error message is as follows. The source file and TeX file is in UTF-8 coding (according to Notepad++). I also include the \usepackage[utf8]{inputenc}
statement.
UPDATE:
Here is the requested MWE...
\documentclass[a4paper,portrait]{minimal}
\usepackage{tikz}
\usetikzlibrary{spath3}
\usetikzlibrary{decorations.text} % to print text on a curve
\begin{document}
\begin{tikzpicture}
\path[spath/save=test] plot[smooth,tension=0.5] coordinates{(0,1.1) (2,0.8) (4,1.0) (6,0.5) (8,0.7)};
\draw [spath/use=test];
\path [decorate,decoration={text along path,raise=-2.4ex,text align={left indent=1.1cm},
text={|\sffamily\normalsize\color{blue}|D U S K~~~at latitude 51.5°N}}]
plot[smooth,tension=0.5] coordinates{(0,1.1) (2,0.8) (4,1.0) (6,0.5) (8,0.7)};
\end{tikzpicture}
\end{document}
and thanks to Qrrbrbirlbel
for providing the correct answer, which I will post below.
{°}
or{\textdegree}
.