9

I have a short LaTeX Tikzpicture. I draw three arrows on three paths.

  • The first arrow is on a circle-node surrounding text.
  • The second arrow is on a circle-node centered at (b).
  • The third arrow is on an edge between the two circle nodes.

I want all the three arrow-heads to be the same sizes. Yet, to my frustration, the arrow head on the first circle is smaller than the other arrow heads. How can I resolve this?

Here's the code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,positioning}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}
\coordinate (b) at (4,0) ;
\node[circle,draw,postaction={decorate,decoration={markings,
    mark=at position 0.5 with {\arrow[scale=5]{>}}}}] at (0,0) (u)
    {an arrowed circle};

\node[inner sep=0] at (b) (w) {\tikz \draw
[postaction={decorate,decoration={markings, mark=at position 0.5 with
{\arrow[scale=5]{>}}}}] (b) circle (1.5);};

\draw [postaction={decorate,decoration={markings,
    mark=at position 0.7 with {\arrow[scale=5]{>}}}}] (w) -- (u);

\end{tikzpicture}
\end{document}

PDF output

NivMan
  • 161

2 Answers2

10

Nodes are difficult beasts, and they offen reset scaling commands, but you can add a low-level scaling with \pgftransformscale{5}:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,shapes,positioning}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}[]
\coordinate (b) at (-2,-2) ;
\node[circle,draw,postaction={decorate,decoration={markings,
    mark=at position 0.5 with {\pgftransformscale{5}\arrow[]{>}}}}] at (0,0) (u)
    {an arrowed circle};

\draw [postaction={decorate,decoration={markings,
    mark=at position 0.5 with {\arrow[scale=5]{>}}}}] (b) -- (u);

\draw [postaction={decorate,decoration={markings,
    mark=at position 0.5 with {\arrow[scale=5]{>}}}}] (b) circle (3);
\end{tikzpicture}
\end{document}

enter image description here

Ulrike Fischer
  • 327,261
5

For all its limitations, things are a bit simpler in plain Metapost. There's no concept of a node, just points, paths and labels.

prologues := 3;
outputtemplate := "%j%c.eps";

beginfig(1);
% define the paths
path bar, c[];
c0 = fullcircle scaled 90 rotated 180;
c1 = c0 shifted 60 left;
c2 = c0 shifted 60 right;
bar = point 0 of c2 -- point 4 of c1;

% draw the arrows
ahlength := 8;
drawarrow c1;
drawarrow c2;
numeric t; t = 0.66;
drawarrow subpath(0,t) of bar; draw subpath(t,1) of bar;

% add the label
defaultfont := "texnansi-lmr10";
label("an arrowed circle", center c1);

endfig;
end.

enter image description here

If you wanted curved Computer Modern arrow heads, you could get them with the cmarrows package.

Thruston
  • 42,268