7

I have a table where I have put pictures (plots) in each cell. The whole point of making this table is for comparison of the plots. However it does not look good to refer to this set as a table, because indeed it is just a big figure.

Is there any easy way of referring to this table as figure in text, and also in the caption?

BTW, I checked this question already, How to refer a figure as a table?. It is the corollary of my question, but the solution for it does not seem to work in my case.

Here is the MWE:

\documentclass[a4paper, 11pt, oneside]{Thesis}
\begin{document}

\begin{table}
\label{table:mul}
\begin{center}
\begin{tabular}{|c|c|}
\toprule

\textbf{A} & \adjustimage{height=8cm,valign=m}{PlotA} \\
\midrule
\textbf{B} & \adjustimage{height=8cm,valign=m}{PlotB} \\
\midrule
\textbf{C} & \adjustimage{height=8cm,valign=m}{PlotC} \\

\bottomrule
\end{tabular}
\end{center}
\caption{I don't want a table}
\end{table}

\end{document}

Thanks!

  • 1
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – DG' Apr 16 '15 at 12:53
  • 1
    \begin{figure}\caption{Not a table}\label{fig:plots}\input{plots}\end{figure} – musarithmia Apr 16 '15 at 12:56
  • \captionof{figure}{And now for something completely different}\label{somelabel} using caption package in the table environment – user31729 Apr 16 '15 at 12:56
  • @AndrewCashner I removed the table label and caption, put it in a separate file and tried your solution, I got ``Not in outer par mode'' error. – Man Apr 16 '15 at 13:08
  • 1
    Which of the 50000000 different Thesis.cls files do you use? ;-) And where is \begin{document}?;-) A lot of missing packages and a wrong label ;-) – user31729 Apr 16 '15 at 13:20
7

Both Andrew Cashner's and my proposition should work, the images are listed in the LoF, not as table and referenced as figures as well.

\documentclass[a4paper, 11pt, oneside,demo]{Thesis}

\usepackage{adjustbox}
\usepackage{caption}
\usepackage{booktabs}
\begin{document}
\listoftables
\listoffigures


%%% Andrew Cashner's way

\begin{figure}
\begin{center}
\begin{tabular}{|c|c|}
\toprule

\textbf{A} & \adjustimage{height=8cm,valign=m}{PlotA} \\
\midrule
\textbf{B} & \adjustimage{height=8cm,valign=m}{PlotB} \\
\midrule
\textbf{C} & \adjustimage{height=8cm,valign=m}{PlotC} \\

\bottomrule
\end{tabular}
\end{center}
\caption{I don't want a table: Andrew Cashner's way} \label{faketable:mul}

\end{figure}


\begin{table}
\begin{center}
\begin{tabular}{|c|c|}
\toprule

\textbf{A} & \adjustimage{height=8cm,valign=m}{PlotA} \\
\midrule
\textbf{B} & \adjustimage{height=8cm,valign=m}{PlotB} \\
\midrule
\textbf{C} & \adjustimage{height=8cm,valign=m}{PlotC} \\

\bottomrule
\end{tabular}
\end{center}
\captionof{figure}{I don't want a table: My way} \label{table:mul}

\end{table}

\end{document}

enter image description here

  • 1
    One would have to weigh the advantages of either environment. For instance, if you've used etoolbox to set up uniform formatting like AtBeginEnvironment{table}{\singlespacing} and this "tabular figure" needs that formatting, then it makes sense to use table with \captionof. Otherwise, if it's a figure I would just call it a figure. – musarithmia Apr 16 '15 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.