[Tex/LaTex] How to put two images side by side and put some symbol in the center

horizontal alignmenttikz-pgf

I want to put two images side by side and put a comparison symbol in between them. Here is the tikz code :

\documentclass{article}

\usepackage{tikz}

\usepackage[margin=15mm]{geometry}

\usepackage{calc}

\usetikzlibrary{matrix,arrows}

\usetikzlibrary{positioning,arrows}

\usetikzlibrary{shapes,arrows,fit,calc,positioning,automata}

\begin{document}

\begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 0.75, transform shape]

      \coordinate (a1) [] {};
      \node[rectangle] (a) [draw,minimum width=2cm,minimum height=1cm, below of=a1,node distance=1.5cm] { };
      \node[rectangle] (b) [draw,minimum width=2cm,minimum height=1cm, below of=a,node distance=2cm] { };
      \coordinate[below=1cm of b] (b1)  {};
      \path[->] (a)  edge node {{$\gamma$} } (b);
      \path[->] (a1) edge node {{$\alpha.\beta$} } (a);
      \path[->] (b)  edge node {{$\delta$} } (b1);
\end{tikzpicture}

      \begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 0.75, transform shape]
      \coordinate (a1) [] {};
      \node[rectangle] (a) [draw,minimum width=4cm,minimum height=1cm, below of=a1,node distance=1.5cm] {};
      \coordinate[below=1cm of a] (b1)  {};

      \path[->] (a1) edge node {  $\alpha.\beta$ } (a);
      \path[->] (a) edge node {  $\delta$ } (b1);
      \end{tikzpicture}

\end{document} 

I want to put these to images side by side with an equality symbol in between them. How do I do that?

Best Answer

You can use minipage to do this; adjust the widths given in the following as you see fit.

Note that each \end{minipage} has a trailing % to prevent it from adding extra horizontal space. If this picture is going to be put in a figure environment, use \centering instead of \begin{center}...\end{center}

screenshot

\documentclass{article}

\usepackage[margin=15mm]{geometry}
\usepackage{tikz}

\usetikzlibrary{arrows,positioning}

\begin{document}

\begin{center}
\begin{minipage}{.2\textwidth}
\begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 0.75, transform shape]
      \coordinate (a1) [] {};
      \node[rectangle] (a) [draw,minimum width=2cm,minimum height=1cm, below of=a1,node distance=1.5cm] { };
      \node[rectangle] (b) [draw,minimum width=2cm,minimum height=1cm, below of=a,node distance=2cm] { };
      \coordinate[below=1cm of b] (b1)  {};
      \path[->] (a)  edge node {{$\gamma$} } (b);
      \path[->] (a1) edge node {{$\alpha.\beta$} } (a);
      \path[->] (b)  edge node {{$\delta$} } (b1);
\end{tikzpicture}
\end{minipage}%
\begin{minipage}{.2\textwidth}
your symbol here
\end{minipage}%
\begin{minipage}{.2\textwidth}
      \begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 0.75, transform shape]
      \coordinate (a1) [] {};
      \node[rectangle] (a) [draw,minimum width=4cm,minimum height=1cm, below of=a1,node distance=1.5cm] {};
      \coordinate[below=1cm of a] (b1)  {};

      \path[->] (a1) edge node {  $\alpha.\beta$ } (a);
      \path[->] (a) edge node {  $\delta$ } (b1);
      \end{tikzpicture}
\end{minipage}%
\end{center}

\end{document}