Commutative diagram with parallel arrows in opposite direction
First of all don't use align*
for a single object and prefer equation*
.
Simple commutative diagrams with the CD environment can have arrows pointing
right
@>>>
left
@<<<
down
@VVV
up
@AAA
double stem, no arrow head
@=
nothing (for filling blanks)
@.
However CD
doesn't allow for "double arrows" and you have to go to a more specialized package. For instance xy
:
\documentclass{article}
\usepackage{amsmath}
\usepackage[all,cmtip]{xy}
\begin{document}
\begin{equation*}
\xymatrix{
W \ar[r]^{\phi} \ar@<-2pt>[d]_{a} & X \ar@<-2pt>[d]_{c} \\
Y\ar@<-2pt>[u]_{b} \ar[r]^{\phi} & Z \ar@<-2pt>[u]_{d}
}
\end{equation*}
\end{document}
In addition to egregs answer, one could use the package tikz-cd
for this:
% arara: pdflatex
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}
W \arrow{r}{\phi} \arrow[shift right, swap]{d}{a}& X \arrow[shift right, swap]{d}{c}\\
Y \arrow{r}{\phi} \arrow[shift right, swap]{u}{b} & Z \arrow[shift right, swap]{u}{d}
\end{tikzcd}
\]
\end{document}