0

I have this macro to create down arrows

\newcommand{\arrowdown}[1]{
\tikz[baseline=-1ex]{\node [draw, fill=orange, single arrow, minimum height=3.5ex, single arrow head extend=1ex, rotate=-90] {#1};}
}

Which gives me the following arrow

enter image description here

However what I want is for the label to be by the side of the arrow, written horizontally. Since the arrow is rotated by -90, I want the label text to be rotated by 0 degrees, and start to the right of the arrow itself.

EDIT: Sketch of what I want to get, except I would prefer to have that arrow styled like the one above:

enter image description here

1

rotate rotates the whole thing, shape border rotate the contour. This example is more or less identical to what's done in the first example on p. 785 of the pgfmanual.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows}
\newcommand{\arrowdown}[1]{
\tikz[baseline=-1ex]{\node [draw, fill=orange, single arrow, 
minimum height=3.5ex, single arrow head extend=1ex,
shape border uses incircle,shape border rotate=-90] {#1};}
}
\begin{document}
\arrowdown{Pft}
\end{document}

enter image description here

Or for the updated question:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows}
\newcommand{\arrowdown}[1]{
\tikz[baseline=-1ex]{\node [draw, fill=orange, single arrow, 
minimum height=3.5ex, single arrow head extend=1ex,
rotate=-90](arr) {}; \node[anchor=west] at ([xshift=0.5em]arr.90) {#1};}
}
\begin{document}
\arrowdown{Pft}
\end{document}

enter image description here

  • Thank you! I've added an edit for what I precisely want- I want the label outside the arrow since my labels might be quite long. – Venkat Apr 8 at 15:57
  • @Venkat I added something along those lines, too. (You could, of course, just add the arrow, use an appropriate baseline and write the text right of the tikzpicture.) – user121799 Apr 8 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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