2

I am trying to create a figure composed of 2 images stacked vertically, with captions underneath each. There are 2 captions (horizontally) under the second image, therefore I use 2 columns. My latex is the following:

\begin{figure}
\begin{tabular}{@{}l@{}l@{}}
\begin{multicolumn}{2}{c}{\includegraphics[width=0.8\linewidth]{fig_a.png}} \\
\begin{multicolumn}{2}{p{0.8\linewidth}}{Caption (a)}  \\
\begin{multicolumn}{2}{l}{\includegraphics[width=0.7\linewidth]{fig_b_c.png}}\\
\begin{multicolumn}{1}{r}{Caption (b)} &
\begin{multicolumn}{1}{r}{(Caption (c)}
\end{tabular}
\caption{Figure caption.}
\label{fig:two-part-image} 
\end{figure}

However I am getting the error

!Misplaced \omit.
\multispan ->\omit
@\multispan

and can't figure out what is wrong. Any help would be much appreciated!

3
  • 1
    might i sugggest you have a look at subfigure or subcaption or anything other than a table inside of a figure? a quick search brings up these answers which do that, and i'm sure there are more on this site. May 1, 2015 at 23:17
  • 3
    Don't use \begin{multicolumn}... instead \multicolumn{..}{..}{...}.
    – Werner
    May 1, 2015 at 23:20
  • @Werner You gave the answer!
    – egreg
    Oct 3, 2015 at 21:16

1 Answer 1

1

Don't use \begin{multicolumn}... instead use \multicolumn{<num>}{<col spec>}{<stuff>}. This will make a single cell entry with <stuff> span <num> columns with <col spec> as a specification (like c or p{<len>}).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .