Yes, TikZ can use polar coordinates. Not sure exactly what is the best way of defining the second node, here is one way.
\documentclass{scrartcl}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (A) {A};
\path (A) ++(30:2) node (B) [draw,fill=blue!20] {B};
\end{tikzpicture}
\end{document}
In (30:2)
30 is the angle, 2 the distance. 0° is to the right, positive direction is counterclockwise, so node B
will be above and to the right of A
.
Well, I don't know why it is happening but I know where it is happening. The arrowhead stealth'
is the culprit and amazingly it gets affected by the line
\renewcommand{\baselinestretch}{2}
regardless of the amount put inside the definition. You don't see that with other arrow heads. It happens with arrows library specific arrows. Here is a much simpler MWE (I wish you did this for us but anyway)
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}
\node[draw] (A) {$q_a$};
\node[draw] (B) at (1,0) {a};
\draw[-stealth'](A) -- (B);
\end{tikzpicture}
\renewcommand{\baselinestretch}{2}
\begin{tikzpicture}
\node[draw] (A) {$q_a$};
\node[draw] (B) at (1,0) {a};
\draw[-stealth'](A) -- (B);
\end{tikzpicture}
\end{document}
David Carlisle also indicated that there is a font selection issue or absence of it for reasons beyond me. Hence,
\renewcommand{\baselinestretch}{2}\selectfont
brings the arrow back to the node border. But I don't know what it breaks....
Long story short this is very likely to be related to the way how \nullfont
declaration is invoked. For example, putting \selectfont\nullfont
as the first code inside the TikZ picture also removes the artifact. So at some point before TikZ starts to do its job font selection should be finished so that one can switch to the \nullfont
properly.
Thus, David's comment below is very important.
Best Answer