I'm having some trouble with drawing a couple of pictures in TikZ. It puts a different alignment on two adjacent pictures, as follows:
Also, how can I get the "and" to be centered vertically?
My apologies if this is a repeat question. It must have shown up before, but I didn't see it. Here is the code. Any other comments and suggestions are appreciated, since I'm just learning TikZ.
Edit: I gather that the different alignment is because of the label that's included on the bottom of the right one. But I'm still wondering how to get the "and" centered vertically.
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{calc,shapes}
\usepackage{mathrsfs}
\begin{document}
\begin{center}
\begin{tikzpicture}
\coordinate
(a0) at (0,0);
\coordinate
(a1) at (5,5);
\coordinate[label=left:$g$] (a2) at (2.5,3.5);
\fill (a2) circle (2pt);
\coordinate[label=above:$X$] (a3) at (2.5,5);
\coordinate[label=left:$f$] (a4) at (2.5,2.25);
\fill (a4) circle (2pt);
\coordinate[label=above:$\varepsilon$] (a5) at (3.5,1.5);
\fill (a5) circle (2pt);
\coordinate[label=below:$Y$] (a6) at (1.5,0);
\coordinate
(a8) at (4.35,2.5);
\coordinate[label=above:$L$] (a9) at (4.5,5);
\draw (a0) rectangle (a1);
\draw plot [smooth] coordinates {(a4) (a5) (a8) (a9)};
\draw (a3) -- (a2) -- (a4) -- (a6);
\coordinate[label=$\mathbf{1}$] (1) at (1,3);
\coordinate[label=$\mathscr{D}$] (D) at (3.4,3.4);
\coordinate[label=$\mathscr{C}$] (C) at (3.78,.5);
\end{tikzpicture}
$\qquad$and$\qquad$
\begin{tikzpicture}
\draw (0,0) rectangle (5,3);
\draw (0,3.5) rectangle (5,5);
\draw (2.5, 5) -- (2.5, 3.5);
\draw (4, 5) -- (4, 3.5);
\coordinate[label=above:$X$] (X) at (2.5, 5);
\coordinate[label=above:$L$] (X) at (4, 5);
\draw (2.5, 3) -- (2.5, 1.8) -- (1,0);
\draw plot [smooth] coordinates {(2.5, 1.8) (3.4, 1) (4, 1.8) (4, 3)};
\coordinate[label=below:$\varepsilon$] (epsilon) at (3.4, 1);
\fill (epsilon) circle (2pt);
\coordinate[label=left:$g$] (g) at (2.5, 4);
\fill (g) circle (2pt);
\coordinate[label=left:$f$] (f) at (2.5, 1.8);
\fill (f) circle (2pt);
\end{tikzpicture}
\end{center}
\end{document}
%
after the first\end{tikzpicture}
. Also, why the dollar signs around\qquad
?