Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This should be very a very simple question.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}
   \draw[-stealth,postaction={decorate,decoration={text along path,text align=center,text={this way}}}](0,0)to[bend right=45] (2,0){};
\end{tikzpicture}

\end{document}

output

I want the text to be below the line, not above, is it possible?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The placement of a decoration relative to the path can be controlled with the raise key. A positive value shifts the decoration to the left of the path direction, and a negative value shifts it to the right. Thus, for your example, a negative value is needed. In the example below I've added the key raise=-8pt to the decoration.

More information can be found in the TikZ/PGF manual on CTAN. Chapter 24 (pp. 351--357) covers decorations and the raise key is described on p. 356.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}
   \draw[-stealth,postaction={decorate,decoration={text along path,text align=center,text={this way},raise=-8pt}}](0,0)to[bend right=45] (2,0){};
\end{tikzpicture}

\end{document}

enter image description here

share|improve this answer
1  
You could also guide the OP to the page 355-356 of the pgfmanual v3.00 and make reference to the info given there. –  azetina Aug 27 at 15:18
    
@azetina: Good suggestion. I have updated the answer. –  eiterorm Aug 27 at 15:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.