1

Good day to everyone. I'm not new to LaTeX but I am to TikZ/PGF. So far I'm willing to change the size of latex arrow head, and according to the \listfiles command in the preamble I'm using TikZ 3.0.1a:

(/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
Package: tikz 2015/08/07 v3.0.1a (rcs-revision 1.151)

Now, when I use the method explained in this answer I get an error, unknown key "lenght". Removing it also shows an error regarding "width".

Below an MWE:

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}
\draw[-latex] (0,0)--(2,2); %This line works, used as control

% UNCOMMENT TO CHECK ERRORS
%\draw[-{Latex[length=3mm,width=5mm]}] (0,0)--(2,0); %ERROR=Unkown arrow tip kind 'Latex'.

%\draw[-{latex[length=3mm,width=5mm]}] (0,0)--(2,0); %ERROR=I do not know the key 'lenght'

%\draw[-{latex[width=5mm]}] (0,0)--(2,0); %ERROR=I do not know the key 'width'

\draw[-{latex[scale=2]}] (0,-1)--(2,1); %This line works, however it is the same size as the original one
\end{tikzpicture}

\end{document}

I also used the scale method and it runs, but the arrow head remains the same.

Any ideas? I'm using TeXlive from Linux Mint 19 repositories, btw.

Thanks

  • I'm not sure if this is relevant, but trying to draw arrows using \draw[<->] never works for me. Only if I use text keys such as \draw[stealth-stealth] – Jesús Isea Jan 20 '23 at 15:50
  • 1
    That should work, the difference between the two is, I believe, that <-> adds the default arrow tip, while stealth-stealth adds specifically the stealth arrow tip. Anyways, as the answer below and the answer you link to state, you need the arrows.meta library. Generally, arrow tips that start with a capital letter are defined by arrows.meta and are customizable. Arrow tips starting with a lower case letter are not customizable, and are from either the default set or the deprecated arrows library. – Torbjørn T. Jan 20 '23 at 16:37
  • For example \documentclass[border=5mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [<->] (0,0) -- (1,0); \end{tikzpicture} \end{document} works fine. – Torbjørn T. Jan 20 '23 at 16:38
  • Thanks so much! – Jesús Isea Jan 20 '23 at 18:11
  • As a last comment in this, I discovered the <-> error was a package clash with babel (spanish)! – Jesús Isea Jan 25 '23 at 00:20

1 Answers1

3

You need the library arrows.meta to use Latex:

enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
    \begin{tikzpicture}  
    \draw[-latex] (0,0)--(2,2); 
    \draw[-{Latex[length=3mm,width=5mm]}] (0,0)--(2,0);
    \end{tikzpicture}
\end{document}
Sandy G
  • 42,558