Showing posts with label latex. Show all posts
Showing posts with label latex. Show all posts

Wednesday, January 27, 2010

LaTeX, subfig, subfigure, subfloat and table

Just crashed my head for half an hour on LaTeX bc I was trying to use an ordinary \begin{table}.. in a document using \usepackage{subfig} for subfloats like:

\begin{figure}

\centering

\subfloat[Raw Line Extraction]{\label{fig:lex_raw}\includegraphics[width=0.35\textwidth]{EXPS/raw_extraction.png}}

\hspace{4pt}

\subfloat[Using Timestamp Matching]{\label{fig:lex_tm}\includegraphics[width=0.35\textwidth]{EXPS/matched_extraction.png}}
\caption{Line Feature Extraction while spinning at +$1rad/s$; orange lines represent real walls.}

\label{fig:lExtraction}

\end{figure}


It'll just mess up with your table's caption... seems that there's something related to the caption package.
This problem will make your tables look like this:


The solution is to dump \usepackage{subfig} in favor of \usepackage{subfigure} and \subfloat[..]{..} in favor of \subfigure[..]{..}.. the rest is all the same