2

I am having trouble in changing arrowhead parameters in Tikz. The length and width parameters from arrows.meta work as expected until I also specify a line width, then all my arrowhead specifications are ignored and the default size is used.

\documentclass[tikz]{standalone}

\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\begin{document}
\begin{tikzpicture}
  \draw[-{Latex[width=2mm,length=3mm]}] (0,0)--(2,0) node[right]{with no line width};
  \draw[line width=1.5mm,-{latex[width=2mm,length=3mm]}] (0,-1)--(2,-1) node[right]{with specified line width};
\end{tikzpicture}
\end{document}

The above code renders as follows. Note how the same size parameters are given for both arrows, but they are ignored when the line width is changed.

enter image description here

How can I change the arrow size and line width at the same time?

  • The problem is a typo : you use in the second line latex (with small l) and not Latex. – Kpym Mar 20 at 8:55
  • @Kpym no, both Latex and latex are valid arrow types. I suppose I should change that here just for consistency's sake but I've tried both and it doesn't make a difference. – PGmath Mar 20 at 14:38
  • @kpym Wait a sec, I tried it again and it worked with Latex. I know I've tried both before, but I guess that must have been with an older iteration of my efforts where something else was wrong too. Anyhow, if you put that in an answer I'll accept it. – PGmath Mar 20 at 16:34
1

You use in your second \draw command latex (with small l) which is an old arrow tip (before TikZ 3) that can't be styled as Latex which is part of arrows.meta library.

So you have just to change it to title case.

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.