2

the following code produces an error:

missing $ inserted. 1.109 \end{array}

any suggestions on what I am missing:

\begin{figure}[H]
\caption{My caption goes in here.}
\centering
\subfloat[Subfloat 01]
{\includegraphics[width=0.30\textwidth]{../PNG/Figure_1.png}}
\subfloat[Subfloat 02]
{\[ \begin{array}{ccc}
$text$ & $text$ & $text$\\
$text$ & $text$ & $text$
\end{array}\]}
\end{figure}

1 Answer 1

2

Don't use display style math directly in this instance. Rather use $\begin{array}...\end{array}$. Here's a complete minimal example:

\documentclass{article}
\usepackage{subfig}% http://ctan.org/pkg/subfig
\usepackage{float}% http://ctan.org/pkg/float
\usepackage[demo]{graphicx}% http://ctan.org/pkg/graphicx
\begin{document}

\begin{figure}[H]
\caption{My caption goes in here.}
\centering
\subfloat[Subfloat 01]
{\includegraphics[width=0.30\textwidth]{../PNG/Figure_1.png}}
\subfloat[Subfloat 02]
{$\begin{array}{ccc}
text & text & text\\
text & text & text
\end{array}$}
\end{figure}

\end{document}

In order to use display style math - which doesn't seem necessary in your example - you need to provide some fixed width for the float in the form of a minipage, say.

The demo option to graphicx is just to make this example compile, since the image Figure_1.png is not available.

1
  • your solution worked. i understand now the issue and the solution.
    – joe
    Commented Jun 14, 2012 at 18:39

You must log in to answer this question.

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