Graphics, Figures & TablesText around a Circle

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
giulius777
Posts: 1
Joined: Thu May 30, 2013 6:46 am

Text around a Circle

Post by giulius777 »

Hi everybody, I need a little help from you on the following piece of code.

Code: Select all

\documentclass[a4paper]{article}
\usepackage[margin=1cm]{geometry}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{pstricks}
\usepackage{pst-all}

\begin{document}
  \begin{pspicture}(-3,-1)(3,5)
    \psset{linecolor=Blue}
    \pscircle{2}
    \psset{linestyle=none,xunit=1cm,yunit=1.07cm}
    \pstextpath[c]{\pscircle{2}}{\color{Red} 25\% OFP 12345678}
  \end{pspicture}
\end{document}
Basically what I want is a circle with the text around it, on top center and outside the circumference. I tried in different ways, but I am finally stuck! :cry:

Thanks,
G.
;)
Last edited by localghost on Thu May 30, 2013 9:55 am, edited 2 times in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
tom
Posts: 73
Joined: Thu Apr 18, 2013 4:02 am

Text around a Circle

Post by tom »

Hi!

Here is some pgf code to draw a circle with text centred at the top.

HTH, Tom

Code: Select all

\documentclass[tikz, border=20pt]{standalone}
\usetikzlibrary{decorations, decorations.text,}

\begin{document}
\begin{tikzpicture}
\draw[color=blue, rotate=-90, postaction={decorate, decoration={text along path, raise=4pt, text align={align=center}, text={This is some random text}, reverse path}}] (0,0) circle (2cm);
\end{tikzpicture}

\end{document}
Post Reply