2

I elaborated upon Decorate tikz path with cyrillic text

to develop an example:

\documentclass[margin=1cm]{standalone}
\usepackage{tikz}

\usetikzlibrary{decorations.text}

\begin{document}

\begin{tikzpicture}

\draw (0,0) ellipse (2cm and 1 cm);
\path[
   postaction={
     decorate,
     decoration={
       text along path,
       reverse path=true,
       raise=-0.3cm,
       %text align={left indent = {0.75\dimexpr\pgfdecoratedpathlength\relax}},
       text={very long text}
     }
  }
] (0,0) ellipse (2cm and 1cm);

\end{tikzpicture}

\end{document}

The output is:

enter image description here

I would like to place the text on top of the ellipse. For this I uncomment this line:

text align={left indent = {0.75\dimexpr\pgfdecoratedpathlength\relax}},

The output is

enter image description here

What is left is to replace left with center. Unfortunately then the document does not compile. How to solve?

Viesturs
  • 7,895

0 Answers0