The code is from here. In the line \begin{tikzpicture}[auto, node distance=2cm,>=latex']
I don't understand this command >=latex'
. I found nothing about it in the TikZ & PGF
manual.
Thank you for your help in advance!
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityThe code is from here. In the line \begin{tikzpicture}[auto, node distance=2cm,>=latex']
I don't understand this command >=latex'
. I found nothing about it in the TikZ & PGF
manual.
Thank you for your help in advance!
From TikZ Manual for Version 3.0.1a, Section 16.4, pg 201:
So, >=
is a shorthand to inform the arrow tip you want. Pay attention for different arrow style related to >=Latex
and >=Stealth
.
\usetikzlibrary{arrows}
or something similar.
After testing I get following.
With the old library and >=
:
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{arrows}% old library
\begin{document}
\begin{tikzpicture}
\draw [-> = latex'] (0, 3) -- (1, 3);% old arrow tip
\draw [-> = latex] (0, 2) -- (1, 2);% old arrow tip
\draw [-> = Latex] (0, 1) -- (1, 1);
\draw [->] (0, 0) -- (1, 0);
\end{tikzpicture}
\end{document}
The line \draw [-> = Latex] (0, 1) -- (1, 1);
produces an error (as expected):
! Package pgf Error: Unknown arrow tip kind 'Latex'.
The result:
So >=
doesn't work in this syntax.
With the old library and -arrow tip type
:
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{arrows}% old library
\begin{document}
\begin{tikzpicture}
\draw [-latex'] (0, 3) -- (1, 3);% old arrow tip
\draw [-latex] (0, 2) -- (1, 2);% old arrow tip
\draw [-Latex] (0, 1) -- (1, 1);
\draw [->] (0, 0) -- (1, 0);
\end{tikzpicture}
\end{document}
The line \draw [-Latex] (0, 1) -- (1, 1);
produces an error, as above.
The result:
It work like it should.
With the new library and >=
.
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\draw [> = latex'] (0, 3) -- (1, 3);% old arrow tip
\draw [> = latex] (0, 2) -- (1, 2);% old arrow tip
\draw [> = Latex] (0, 1) -- (1, 1);
\draw [->] (0, 0) -- (1, 0);
\end{tikzpicture}
\end{document}
The line \draw [> = latex'] (0, 3) -- (1, 3);
produces an error (as expected):
! Package pgf Error: Unknown arrow tip kind 'latex''.
The result:
Again >=
doesn't work in this syntax.
And the new library with -arrow tip type
:
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\draw [-latex'] (0, 3) -- (1, 3);% old arrow tip
\draw [-latex] (0, 2) -- (1, 2);% old arrow tip
\draw [-Latex] (0, 1) -- (1, 1);
\draw [->] (0, 0) -- (1, 0);
\end{tikzpicture}
\end{document}
The line \draw [> = latex'] (0, 3) -- (1, 3);
produces an error, as above.
The result:
It work like it should.
The description from the TikZ
manual (section 16.1, page 182):
Remark: Almost all of the features described in the following were introduced in version 3.0 of
TikZ
. For compatibility reasons, the old arrow tips are still available. To differentiate between the old and new arrow tips, the following rule is used: The new, more powerful arrow tips start with an uppercase letter as inLatex
, compared to the old arrow tiplatex
.Remark: The libraries
arrows
andarrows.spaced
are deprecated. Usearrows.meta
instead/additionally, which allows you to do all that the old libraries offered, plus much more. However, the old libraries still work and you can even mix old and new arrow tips (only, the old arrow tips cannot be configured in the ways described in the rest of this section; sayingscale=2
for alatex
arrow has no effect for instance, while forLatex
arrows it doubles their size as one would expect.)
latex'
arrow tip is defined in the old arrows
library, so without arrows
in the list of libraries you will get the unknown arrow tip error you mention.
Feb 10, 2017 at 18:22