In addition to postaction
here are two more ways:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (A) at (0,0) {$A$};
\node (B) at (1,0) {$B$};
\draw[transform canvas={yshift=0.3ex},->] (A) -- (B);
\draw[transform canvas={yshift=-0.3ex},<-] (A) -- (B);
\end{tikzpicture}
\begin{tikzpicture}
\node (A) at (0,0) {$A$};
\node (B) at (1,0) {$B$};
\draw[->] (A.10) -- (B.170);
\draw[<-] (A.350) -- (B.190);
\end{tikzpicture}
\end{document}
Note that you need to use transform canvas
as “normal” transforms leave the nodes fixed. The (A.10)
syntax means a point on the boundary of A, 10 degrees counterclockwise from (A.east)
.
Here's one option using the tikz-cd package which facilitates the creation of commutative diagrams:
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
& X\arrow[Rightarrow]{dr}{}\arrow[Rightarrow,to path={..controls +(-2.5,0.7) and +(-2.5,-0.7).. (\tikztotarget)}]{ddd}{} \\
A \arrow[Rightarrow]{ur}{}\arrow{r}{}\arrow{d} & B \arrow{r}{}\arrow{d} & C\arrow{r}{}\arrow{d} & D\arrow{d}\\
E \arrow[Rightarrow]{dr}{} \arrow{r}{} & F \arrow{r}{} & G\arrow{r}[color=red]{} & H\\
& I\arrow[Rightarrow]{ur}{}\\
\end{tikzcd}
\end{document}
If all the arrows should be given the style of \Rightarrow
, it's enough to use the arrows=Rightarrow
option:
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[arrows=Rightarrow]
& X\arrow{dr}{}\arrow[to path={..controls +(-2.5,0.7) and +(-2.5,-0.7).. (\tikztotarget)}]{ddd}{} \\
A \arrow{ur}{}\arrow{r}{}\arrow{d} & B \arrow{r}{}\arrow{d} & C\arrow{r}{}\arrow{d} & D\arrow{d} \\
E \arrow{dr}{} \arrow{r}{} & F \arrow{r}{} & G\arrow{r}[color=red]{} & H \\
& I\arrow{ur}{}
\end{tikzcd}
\end{document}
I initially forgot question 2. You can use the in=
, out=
keys to bend the arrows:
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[arrows=Rightarrow]
& X\arrow{dr}{}\arrow[to path={..controls +(-2.5,0.7) and +(-2.5,-0.7).. (\tikztotarget)}]{ddd}{} \\
A \arrow{ur}{}\arrow[out=30,in=150]{r}{}\arrow{d} & B \arrow[out=210,in=330]{l}{}\arrow{r}{}\arrow{d} & C\arrow{r}{}\arrow{d} & D\arrow{d} \\
E \arrow{dr}{} \arrow{r}{} & F \arrow{r}{} & G\arrow{r}[color=red]{} & H \\
& I\arrow{ur}{}
\end{tikzcd}
\end{document}
Best Answer
Simply place the specifications at either side of the
-
:open triangle 90-triangle 45
, as in: