
У меня есть этот код:
\documentclass[tikz]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usetikzlibrary{decorations.text,}
\begin{document}
\sffamily
\begin{tikzpicture}[
circle label/.style = {
postaction={
decoration={
text along path,
text = {#1},
text align=center,
reverse path,
},
decorate,
}
}
]
\filldraw[white] (-5,-5) rectangle (5,5);
\path[circle label={Text with spécial character}] (0,-1.2) arc (-90:360-90:1.2);
\draw[dotted] (0,0) circle (1);
\end{tikzpicture}
\end{document}
У меня проблема с печатью текста, содержащего специальный символ (é). Возможно ли иметь метки со специальными символами? Если да, то как?
решение1
Используйте {} для специальных символов.
\documentclass[tikz]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usetikzlibrary{decorations.text,}
\begin{document}
\sffamily
\begin{tikzpicture}[
circle label/.style = {
postaction={
decoration={
text along path,
text = {#1},
text align=center,
reverse path,
},
decorate,
}
}
]
\filldraw[white] (-5,-5) rectangle (5,5);
\path[circle label={Text with sp{é}cial character}] (0,-1.2) arc (-90:360-90:1.2);
\draw[dotted] (0,0) circle (1);
\end{tikzpicture}
\end{document}