88

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.

114

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
  • 3
    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. – Peter LeFanu Lumsdaine Nov 4 '16 at 13:23

This site is temporarily in read only mode and not accepting new answers.

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