Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like to put (sub)captions under the diagrams on the right hand side of the equation in the following code. For example, I'd like to label them (a) through (e).

Thanks in advance for any help!

\documentclass[11 pt]{amsart}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{subfig}

\usetikzlibrary{calc}
\tikzstyle{hackennode}=[draw,circle,inner sep=0,minimum size=4pt]
\tikzstyle{hackenline}=[line width=3pt]

\begin{document}

\begin{figure}[h]
{\Large
\[
\begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
    \draw[densely dashed] (-1,-1) -- (3,-1);
    \node[hackennode] (0) at (0,-1) {};
    \node[hackennode] (1) at (0,0) {};
    \node[hackennode] (2) at (0,1) {};
    \node[hackennode] (3) at (0,2) {};
    \draw[hackenline,blue] (0) -- (1) {};
    \draw[hackenline,red] (1) -- (2) -- (3) {};
    \node[hackennode] (10) at (1,-1) {};
    \node[hackennode] (11) at (1,0) {};
    \node[hackennode] (12) at (1,1) {};
    \node[hackennode] (13) at (1,2) {};
    \draw[hackenline,blue] (10) -- (11) {};
    \draw[hackenline,red] (11) -- (12) -- (13) {};
    \node[hackennode] (20) at (2,-1) {};
    \node[hackennode] (21) at (2,0) {};
    \node[hackennode] (22) at (2,1) {};
    \draw[hackenline,red] (20) -- (21);
    \draw[hackenline,blue] (21) -- (22);
\end{tikzpicture}
=
\left \{
    \begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
        \draw[densely dashed] (-1,-1) -- (3,-1);
        \node[hackennode] (10) at (1,-1) {};
        \node[hackennode] (11) at (1,0) {};
        \node[hackennode] (12) at (1,1) {};
        \node[hackennode] (13) at (1,2) {};
        \draw[hackenline,blue] (10) -- (11) {};
        \draw[hackenline,red] (11) -- (12) -- (13) {};
        \node[hackennode] (20) at (2,-1) {};
        \node[hackennode] (21) at (2,0) {};
        \node[hackennode] (22) at (2,1) {};
        \draw[hackenline,red] (20) -- (21);
        \draw[hackenline,blue] (21) -- (22);
    \end{tikzpicture}
\tikz[baseline=-0.65ex,scale=0.5] \node[inner sep=0] at (0,-1) {,\,};
\begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
    \draw[densely dashed] (-1,-1) -- (3,-1);
    \node[hackennode] (0) at (0,-1) {};
    \node[hackennode] (1) at (0,0) {};
    \node[hackennode] (2) at (0,1) {};
    \node[hackennode] (3) at (0,2) {};
    \draw[hackenline,blue] (0) -- (1) {};
    \draw[hackenline,red] (1) -- (2) -- (3) {};
    \node[hackennode] (10) at (1,-1) {};
    \node[hackennode] (11) at (1,0) {};
    \node[hackennode] (12) at (1,1) {};
    \node[hackennode] (13) at (1,2) {};
    \draw[hackenline,blue] (10) -- (11) {};
    \draw[hackenline,red] (11) -- (12) -- (13) {};
    \node[hackennode] (20) at (2,-1) {};
    \node[hackennode] (21) at (2,0) {};
    \draw[hackenline,red] (20) -- (21);
\end{tikzpicture}
\middle |
\begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
    \draw[densely dashed] (-1,-1) -- (3,-1);
    \node[hackennode] (0) at (0,-1) {};
    \node[hackennode] (1) at (0,0) {};
    \node[hackennode] (2) at (0,1) {};
    \draw[hackenline,blue] (0) -- (1) {};
    \draw[hackenline,red] (1) -- (2)  {};
    \node[hackennode] (10) at (1,-1) {};
    \node[hackennode] (11) at (1,0) {};
    \node[hackennode] (12) at (1,1) {};
    \node[hackennode] (13) at (1,2) {};
    \draw[hackenline,blue] (10) -- (11) {};
    \draw[hackenline,red] (11) -- (12) -- (13) {};
    \node[hackennode] (20) at (2,-1) {};
    \node[hackennode] (21) at (2,0) {};
    \node[hackennode] (22) at (2,1) {};
    \draw[hackenline,red] (20) -- (21);
    \draw[hackenline,blue] (21) -- (22);
\end{tikzpicture}
\tikz[baseline=-0.65ex,scale=0.5] \node[inner sep=0] at (0,-1) {,\,};
\begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
    \draw[densely dashed] (-1,-1) -- (3,-1);
    \node[hackennode] (0) at (0,-1) {};
    \node[hackennode] (1) at (0,0) {};
    \draw[hackenline,blue] (0) -- (1) {};
    \node[hackennode] (10) at (1,-1) {};
    \node[hackennode] (11) at (1,0) {};
    \node[hackennode] (12) at (1,1) {};
    \node[hackennode] (13) at (1,2) {};
    \draw[hackenline,blue] (10) -- (11) {};
    \draw[hackenline,red] (11) -- (12) -- (13) {};
    \node[hackennode] (20) at (2,-1) {};
    \node[hackennode] (21) at (2,0) {};
    \node[hackennode] (22) at (2,1) {};
    \draw[hackenline,red] (20) -- (21);
    \draw[hackenline,blue] (21) -- (22);
\end{tikzpicture}
\tikz[baseline=-0.65ex,scale=0.5] \node[inner sep=0] at (0,-1) {,\,};
\begin{tikzpicture}[baseline=-0.65ex,scale=0.5]
    \draw[densely dashed] (-1,-1) -- (3,-1);
    \node[hackennode] (0) at (0,-1) {};
    \node[hackennode] (1) at (0,0) {};
    \node[hackennode] (2) at (0,1) {};
    \node[hackennode] (3) at (0,2) {};
    \draw[hackenline,blue] (0) -- (1) {};
    \draw[hackenline,red] (1) -- (2) -- (3) {};
    \node[hackennode] (10) at (1,-1) {};
    \node[hackennode] (11) at (1,0) {};
    \node[hackennode] (12) at (1,1) {};
    \node[hackennode] (13) at (1,2) {};
    \draw[hackenline,blue] (10) -- (11) {};
    \draw[hackenline,red] (11) -- (12) -- (13) {};
\end{tikzpicture}
\right \} \]
}% End group with \Large
\caption{}
\end{figure}

\end{document}
share|improve this question
2  
I took the liberty to format your code to make it a easier to read, and removed some unnecessary stuff in the preamble. It's great that you showed a working example, but it's usually a good idea to include only the relevant portion of the code. See this question for more information: meta.tex.stackexchange.com/questions/228/… –  Martin Tapankov Feb 23 '11 at 8:17
    
@Martin: Thanks for editing it...I tried to take out all the irrelevant garbage, but I honestly didn't know what some of the preamble stuff was... –  pgaf Feb 24 '11 at 18:42
    
Don't forget to mark the answer as "accepted" (see the checkmark below the score) if you are satisfied with the solution. This will help others with similar problems to see what worked for you. –  Martin Tapankov Feb 24 '11 at 19:19

1 Answer 1

up vote 4 down vote accepted

I'm not sure about what you want but it's easy to add a label below axes, something like this

\draw[densely dashed] (-1,-1) -- node[below] {b)} (3,-1);

The result is: enter image description here

share|improve this answer
    
@Hendrik: Did it! –  Ignasi Feb 23 '11 at 9:29
    
Thanks! (And sorry that I orphaned your comment by deleting mine.) A tip for the next image: Use png instead of jpg; this gives much better quality for this kind of image. –  Hendrik Vogt Feb 23 '11 at 9:41
    
Thanks! That's exactly what I was looking for, and it's a much simpler solution than I was trying. –  pgaf Feb 24 '11 at 18:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.