Two chemfig lewis diagrams side by side with labels below

MWE:

\documentclass{report}
\usepackage{chemfig} %for chemistry diagrams

\begin{document}
\vspace{10mm}
\setatomsep{2em}
\begin{center}
\chemfig{%
CH(-[:180]CH_{3})(-[:0]CH_{3})(-[:90]CH_{3})
}
\end{center}
1-chloro-3-methylbutane
\begin{center}
\chemfig{%
CH_{3}-[:0]CH_{2}-[:0]CH(-[:90]CH_{3})(-[:0]CH_{3})
}
\end{center}
1-chloro2-methylbutane
\vspace{10mm}
\end{document}
%


output:

desired output:

What is the best way for me to accomplish this.

-

chemfig provides the command \chemname{<molecule>}{<name>} for writing a name below a molecule. It has an optional argument for the vertical offset and if the molecules have a different depth possibilities are provided to align the names anyway. This is described with examples in section 12 Writing a name under a molecule in chemfig's manual.

With it both molecules can simply be written one after the other.

\documentclass{report}
\usepackage{chemfig} %for chemistry diagrams

\setatomsep{2em}

\begin{document}

% the center' environment should probably be a figure'
% environment or maybe a newly declared scheme' environment
% (with the help of the newfloat' package) but it does its
% work here:
\begin{center}
\chemname{%
\chemfig{%
CH(-[:180]CH_{3})(-[:0]CH_{3})(-[:90]CH_{3})
}
}{1-chloro-3-methylbutane}
% separate both molecules by 2em:
\chemname{%
\chemfig{%
CH_{3}-[:0]CH_{2}-[:0]CH(-[:90]CH_{3})(-[:0]CH_{3})
}
}{1-chloro2-methylbutane}
\end{center}

\end{document}

-
BTW: the names seem to have nothing to do with the molecules? –  cgnieder May 29 '13 at 8:05

You could put it in a tabular environment.

• The \\ command separates each row of the table. I write \\[2mm] to add extra 2mm of vertical space between the rows.
• Within a row, the & command separates each column.
• The {cc} declares a two-column table, and the c means that the contents of each column is centred.

Code:

\documentclass{report}
\usepackage{chemfig} %for chemistry diagrams

\begin{document}
\setatomsep{2em}
\begin{tabular}{cc}
\chemfig{%
CH(-[:180]CH_{3})(-[:0]CH_{3})(-[:90]CH_{3})
}
&
\chemfig{%
CH_{3}-[:0]CH_{2}-[:0]CH(-[:90]CH_{3})(-[:0]CH_{3})
}
\\[2mm]
1-chloro-3-methylbutane
&
1-chloro2-methylbutane
\end{tabular}
\end{document}


By the way:

• \vspace{...} doesn't do anything at the top of a page. (But \vspace*{...} does.)

• You probably ought not to use the center environment in the way that you do -- see this answer by David Carlisle for why \centering might be more appropriate than \begin{center}...\end{center}.

-
I don't believe \begin{centering} works for chemfig...wait did you mean \begin{centering} or \centering –  puk May 29 '13 at 20:29
@puk There is no {centering} environment, only a \centering command for formatting the current paragraph. It works well with chemfig's formulae and schemes as they're just TikZ pictures in the end. –  cgnieder May 29 '13 at 23:39
@cgnieder thanks for clearing that up. –  puk May 30 '13 at 2:11