7

I want to make a half circle border, as an arrow head in a tikz diagram.

Does anyone have an idea how to make this style?

2
8

Using the arrows library and a dash of PGF code, you can do the following (adapted from an example in the manual, see section 74.2).

\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{arrows}

\begin{document}

% Code for the new arrow tip, called halfcirc.
\pgfarrowsdeclare{halfcirc}{halfcirc}
{
\arrowsize=0.2pt
\advance\arrowsize by .5\pgflinewidth
\pgfarrowsleftextend{-4\arrowsize-.5\pgflinewidth}
\pgfarrowsrightextend{.5\pgflinewidth}
}
{
\arrowsize=0.2pt
\advance\arrowsize by .5\pgflinewidth
\pgfsetdash{}{0pt} % do not dash
\pgfsetroundjoin % fix join
\pgfsetroundcap % fix cap
\pgfpathmoveto{\pgfpoint{-4\arrowsize}{4\arrowsize}}
\pgfpatharc{90}{-90}{4\arrowsize}
\pgfusepathqstroke
}

% Declare a reversed version called revhalfcirc.
\pgfarrowsdeclarereversed{revhalfcirc}{revhalfcirc}{halfcirc}{halfcirc}

% Demonstration of the arrow tip.
\begin{tikzpicture}
\draw[help lines] (-3,-2) grid (3,2);
\draw[line width=10pt, revhalfcirc-halfcirc] (-2,0) -- (0,0);
\end{tikzpicture}

\end{document}

enter image description here

4
  • If you want a semicircles instead (filled or unfilled) this is also pretty straight forward. I can easily adjust the answer to suit you if you want something slightly different from the above.
    – qubyte
    Mar 3 '12 at 11:53
  • I could really use filled and unfilled semicircles if you find the time. However, I am using the new arrows.meta library. Not sure if that affects things.
    – Neil G
    Feb 7 '14 at 7:52
  • Also, in the new arrows.meta library, the above arrowheads are called Arc Barb and Arc Barb[reversed].
    – Neil G
    Feb 7 '14 at 7:54
  • This is an old answer to an old question. You should open a new question that references this answer.
    – qubyte
    Feb 7 '14 at 12:25

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.