95

I am creating multiple TikZ pictures within one document and would like to set the default style of arrow heads for all the pictures to the latex style, i.e. like -latex does, so that I don't have to do this every time I draw an arrow.

I'm new to TikZ, but have searched and must not be choosing the correct terms.

1 Answer 1

124

You can use >=latex to specify the latex arrow tip, and \tikzset to set it globally. This will be overridden by any local definitions of the arrow tip.

\documentclass[tikz,border=2mm]{standalone}
\tikzset{>=latex}
\begin{document}
\begin{tikzpicture}[<->]
\draw [>=stealth,red] (0,.6) -- +(1,0);
\draw [blue] (0,.3) -- +(1,0);
\draw (0,0) -- +(1,0);
\end{tikzpicture}
\end{document}   

enter image description here

1
  • 4
    An addendum to this excellent answer: if you’re using tikz-cd, then you also need to add \tikzcdset{arrow style=tikz} for these defaults to be applied in its diagrams. Nov 4, 2016 at 13:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .