20

I am following the answer here where it shows how to adjust the arrow head. It works, but only for default > arrow head. When I change it to latex, stealth or any of the other type of arrow heads, the size does not change.

MWE

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,calc,decorations.markings,math,arrows.meta}

\begin{document}
\begin{tikzpicture} \draw[-{>[scale=1.0]}] (0,0) -- (1,0); \end{tikzpicture}

\begin{tikzpicture} %works ok, gets larger \draw[-{>[scale=3.0]}] (0,0) -- (1,0); \end{tikzpicture}

\begin{tikzpicture} %does not scale, only change shape \draw[-{latex[scale=3.0]}] (0,0) -- (1,0); \end{tikzpicture}

\begin{tikzpicture} %does not scale, only changes shape \draw[-{stealth[scale=3.0]}] (0,0) -- (1,0); \end{tikzpicture} \end{document}

Mathematica graphics

What would the syntax be to scale the other arrow heads? Using the above layout and not using tikzset or other fancy macros. Am I doing something wrong in the above?

Nasser
  • 20,220
  • Try with arrows.meta library. Described is in TikZ manual in chapter III. It gives more possibilities to select/design desired arrow. – Zarko May 28 '15 at 03:47

1 Answers1

26

Load the TikZ library arrows.meta and use the scalable arrows that come with that library:

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,calc,decorations.markings,math}

\begin{document}
\begin{tikzpicture} \draw[-{>[scale=1.0]}] (0,0) -- (1,0); \end{tikzpicture}

\begin{tikzpicture} %works ok, gets larger \draw[-{>[scale=3.0]}] (0,0) -- (1,0); \end{tikzpicture}

\begin{tikzpicture} %does not scale, only change shape \draw[-{Latex[scale=3.0]}] (0,0) -- (1,0); \end{tikzpicture}

\begin{tikzpicture} %does not scale, only changes shape \draw[-{Stealth[scale=3.0]}] (0,0) -- (1,0); \end{tikzpicture} \end{document}

enter image description here

Notice to difference between latex vs Latex, and stealth vs Stealth for naming the type of arrowhead.

codeR
  • 248
A.Ellett
  • 50,533
  • 1
    thanks. I have loaded the arrow.meta as you can see from my example. The problem was in me using lower case latex vs. Latex. But then how did it work? no error and I get the arrow shape ok, but it was not scaled. This is very strange. btw, I got the names from this site which shows then using LowerCase. (at the bottom of the page). So I just used the same. – Nasser May 28 '15 at 05:53