Caracteres especiales en la etiqueta tikz.

Caracteres especiales en la etiqueta tikz.

Tengo este código:

\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}

Tengo un problema para imprimir el texto que contiene el carácter especial (é). ¿Es posible tener etiquetas con caracteres especiales? Si es así, ¿cómo?

Respuesta1

Utilice {} para caracteres especiales.

\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}

ingrese la descripción de la imagen aquí

información relacionada