2

This is a MWE of my code:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}


\tikzset{
    myarrow/.style={
        draw,
        fill=black,
        single arrow,
        minimum height=2.5ex,
        line width=1pt,
        single arrow head extend=0.1ex
    }
}

\newcommand{\arrowup}{%
\tikz [baseline=-0.5ex]{\node [myarrow,rotate=90] {};}
}
\newcommand{\arrowdown}{%
\tikz [baseline=-1ex]{\node [myarrow,rotate=-90] {};}
}


\begin{document}

\begin{center}
This is some text.\\
\arrowdown\\
And some more.\\
\arrowup\\
And even more.
\end{center}

\end{document}

which gives me this:

arrows

the line width will only reduce the width of the arrows up to a certain point but no more. I want the arrows to look a little thinner. I'm using PDFLaTeX to compile on Ubuntu 12.10. Cheers.

  • 1
    You have to set inner sep=1pt (or an even smaller value). See tex.stackexchange.com/questions/13587/… – Jake Feb 20 '13 at 21:13
  • 1
    Thank you, adding that line and fiddling with the rest helped me get the width right. The answer given is pretty much your comment so I'll accept it. Thanks. – Gabriel Feb 20 '13 at 21:28
4

For tweaking an arrow node the TiKz manual lists the following options: single arrow head extend, inner sep= and single arrow head indent. I'd like to add the yscale or xscale options. Playing with these values you may get the desired appearance.

\documentclass[a4paper,10pt]{article}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\tikzset{
    myarrow/.style={
        draw,
        fill=black,
        single arrow,
        minimum height=2.5ex,
        line width=1pt,
        single arrow head extend=0.1ex
    }
}

\newcommand{\arrowup}{%
\tikz [baseline=-0.5ex]{\node [myarrow,rotate=90, single arrow head extend=2mm,inner sep=.1mm] {};}% or: single arrow head indent=⟨length⟩
}
\newcommand{\arrowdown}{%
\tikz [baseline=-1ex]{\node [myarrow,rotate=-90,  yscale=.5, single arrow head extend=1mm] {};}
}

\begin{document}

\begin{center}
This is some text.\\
\arrowdown\\
And some more.\\
\arrowup\\
And even more.
\end{center}

\end{document}

In this example i especially like the second (down) arrow.

  • Thank you, the inner sep= line did the trick. Regards. – Gabriel Feb 20 '13 at 21:28

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.