In any TikZ command, for example \draw
, how does TikZ extract the keys, as they can be in any order.
For example, the following \draw
statements, give the same output (in different locations in the 2D space though):
\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikz \draw[->,red,thick,dashed] (0,0) |- (2,2);
\tikz \draw[->,thick,red,dashed] (3,0) |- (0,5);
\end{document}
The first \draw
command has the keys, red
, thick
and dashed
.
The second\draw
command has the keys, thick
, red
and dashed
.
How does TikZ/LaTeX know, red
means color, thick
is thickness of the line.
What is the logic behind this.
thick
is a known key, and tikz tries to map unknown keys likered
to colors..search also
is explained. (The colors do not work precisely that way but it explains a bit how it can happen that TikZ tries to find a reasonable interpretation of a key. The color behavior is determined by\tikzoption{color}{...}
intikz.code.tex
.)