I'm trying to typeset a table of images.
If image inserted into cell with \subfloat (subcaption package included), resulting box will be w/o bottom margin, but top, left and right margins will be ok.
Example:
\documentclass[a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\chapter{Sample Chapter}
\begin{table}
\caption{Sample Table}
\label{tbl:sample}
\begin{tabular}{|c|c|c|}
\hline
\begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image1}} \end{tabular} &
\begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image1}} \end{tabular} &
\begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image1}} \end{tabular}
\\\hline
\begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2}} \end{tabular} &
\begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2}} \end{tabular} &
\begin{tabular}{c} \subfloat{\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2}} \end{tabular}
\\\hline
\end{tabular}
\end{table}
\end{document}
If subcaption package replaced with subfig the table looks good.
Is there any way to fix such behavior, since I can't use subfig?
Or maybe there is another way to do table with images?
Update: Thanks to Gonzalo Medina, I solved original problem. But I stuck with another one with that approach. I'm trying to put titles in separate column:
\documentclass[a4paper]{book}
\usepackage[demo]{graphicx}
\usepackage{caption}
\begin{document}
\begin{table}
\centering
\caption{Sample Table}
\label{tbl:sample1}
\renewcommand\arraystretch{2}
\begin{tabular}{|c|c|c|c|}
\hline\rule{0pt}{\dimexpr0.15\textwidth+1em\relax}
imeage 1 &
\includegraphics[width=0.15\textwidth,height=0.15\textwidth]{image1} &
\includegraphics[width=0.15\textwidth,height=0.15\textwidth]{image1} &
\includegraphics[width=0.15\textwidth,height=0.15\textwidth]{image1}
\\\hline\rule{0pt}{\dimexpr0.15\textwidth+1em\relax}
imeage 2 &
\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2} &
\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2} &
\includegraphics[width=0.15\linewidth,height=0.15\linewidth]{image2}
\\ \hline
\end{tabular}
\end{table}
\end{document}
But text in first column is aligned at bottom of cell. How to make text in title column to be centered?
