Graphics, Figures & TablesText in tikz

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
jhapk
Posts: 81
Joined: Tue Apr 20, 2010 9:33 pm

Text in tikz

Post by jhapk »

Hi,

how can I make a text hug an ellipse i.e. the text is written along the boundary of the ellipse, in Tikz?
Last edited by jhapk on Wed Jul 07, 2010 3:53 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Text in tikz

Post by gmedina »

Hi,

you can use something like this:

Code: Select all

\documentclass{book}
\usepackage{tikz}
\usetikzlibrary{decorations.text}

\begin{document}

\begin{tikzpicture}[decoration={text along path,
    text={Some long text along an ellipse used for this simple example}}]
  \draw [decorate] (0,0) ellipse (2cm and 1cm);
\end{tikzpicture}

\end{document}
Refer to the Section 27.5 Text Decorations of the pgfmanual for further information.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply