9

I know that I can change the used arrow tip style globally with

\tikzset{>=stealth}

Now I am wondering how to switch back to the default (which is exactly the end of TeX's standard arrow, according to the documentation page 39) locally. Where the problem is: How is the default style called?

In the documentation it is referred to as Classical TikZ Rightarrow (on page 1020). On page 184 three styles are listed: "For standard arrow tip kinds, like Stealth or Latex or Bar...". While >=stealth and >=latex are working fine, >=bar and >=classical tikz rightarrow cause a ! Package pgf Error: Unknown arrow tip kind. This error is also caused by the syntax shown on page 185: -{Classical TikZ Rightarrow[length=5mm]}.

I would prefer not to use an additional tikz library and I think that it should be possible, because it is the default.

5
  • try opposite :). define new arrow head type where you need.
    – Zarko
    Jan 20, 2017 at 17:19
  • 1
    Additionally, why don't you want to use a tikz library? I don't think 'i want to reduce stuff i load' is a good reason in this case (if this were the reason).
    – pschulz
    Jan 20, 2017 at 17:23
  • Another thing you could do is to use the scope environment. Basically, this allows you to apply graphic options to a local group of commands. This environment takes graphic options as an optional argument and these options apply to everything inside the scope, but not to anything outside (page 40 of the documentation you just provided). Jan 20, 2017 at 17:49
  • @pschulz well, I suppose that pretty much is the reason. Usually I am defining a command to \uparrow but if tikz is loaded I am defining the command to draw the arrow with tikz which gives the user the possibility to change the length of the arrow which is not always required.
    – jakun
    Jan 20, 2017 at 17:49
  • I am aware of this alternative implementation which would not require tikz but I do not like it as much because (as stated in the comments) the arrow will not be as long as specified: tex.stackexchange.com/a/213819/120953
    – jakun
    Jan 20, 2017 at 17:52

1 Answer 1

13

The default arrow is called to. I don't know if this is stated somewhere in the documentation, I've found it thanks to a lucky guess.

\documentclass[11pt]{article}
\usepackage{tikz}

\begin{document}
\tikzset{>=stealth}
\begin{tikzpicture}
  \draw[red, ->] (0,0) -- +(1,0);
  \draw[green, -stealth] (0,.5) -- +(1,0);
  \draw[blue, -to] (0,1) -- +(1,0);
\end{tikzpicture}
\end{document}

Result:

Result

You must log in to answer this question.

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