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.

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}
share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
your solution worked. i understand now the issue and the solution. –  joe Jun 14 '12 at 18:39

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.