# how can I put Caption with tabular

I had difficulty doing caption for the following set of images. I have done several codes and I was able to have the caption by doing "subfloat", however, with subfloat it was hard for me to do the vertical and horizontal lables. Someone suggested I use the following code to lable the images vertically and horizontally but the code he gave me was using "tabular' , how can I insert caption in the following code. Also, how can I put the labels on left at the center of the images. update: I added a picture in which the figure still needs to be extended vertically to fill a whole page. The code below produces the figure on left (page 48) while another code produced the one on right. Both of them do not extend the figure vertically to get red of the extra space seen on top and at the bottom of the page and thus,both of them did not satisfy my needs yet.

thanks!

\begin{center}
\begin{tabular}{cccc}
w=10nm
w=40nm
w=100nm
\begin{sideways} t=10nm \end{sideways}&
\begin{sideways} t=30nm \end{sideways}&
\begin{sideways} t=50nm \end{sideways}&

\end{tabular}
\end{center}

• Please edit your code to make it compilable. We should be able to cut, paste and hit compile to reproduce what you are seeing. That means you also need to replace images with ones we all have (e.g. from the mwe package). Or you can specify their dimensions and pass graphicx the demo option to replace them with black boxes. – cfr Nov 16 '14 at 2:42
• In your adjustbox environments, you should write 10\,nm, 40\,nm, and so on. Even better, typeset units with the siunitx package. – user10274 Nov 17 '14 at 13:47

To align them you need valign=c and enclose the entire tabular inside figure environment.

\documentclass[demo]{article}
\usepackage[detect-all]{siunitx}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\begin{document}
\begin{figure}
\centering
\begin{tabular}{C{0.03\textwidth}*{3}{C{\dimexpr0.31\textwidth-2\tabcolsep\relax}}}
&   $w=\SI{10}{\nano\meter}$
&   $w=\SI{40}{\nano\meter}$
&   $w=\SI{100}{\nano\meter}$\\
$t=\SI{10}{\nano\meter}$
$t=\SI{30}{\nano\meter}$
$t=\SI{50}{\nano\meter}$

• @Naema Please see the edit. I have also used siunitx for the units and adjust 10mm suitably. – user11232 Nov 16 '14 at 23:16
• @Naema See the update. You may adjust the dimensions in the argument of C – user11232 Nov 17 '14 at 4:16