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.

I have an image containing tabular data and would not like to convert this to a real table. What I do want is for this image to have a proper caption and be included in the listoftables.

Is it possible I make some sort of fake, empty table? Or just register a table without actually supplying data?

share|improve this question
add comment

2 Answers 2

up vote 21 down vote accepted

You must differentiate between the table float environment and the tabular environment.

tabular is for creating the table structure and can basically be used everywhere. table is for creating floats which hold a logical table, i.e. it is a container, mostly for tabulars, but could contain anything (except page breaks etc.). LaTeX then places the content at the best position, e.g. at the top of the next page.

You can include your image as a table using the following (example) code:

\begin{table}
  \centering % to have it centered
  \caption{The table caption you like}\label{tab:somelabel}
  \includegraphics[width=.95\textwidth]{yourimagefile}
\end{table}

This includes the image with 95% of the text width. Different widths are possible, of course. I just wanted to show how to use a LaTeX length together with a factor.

If you want the caption below the table, simply move \caption below \includegraphics. Please note that the caption skip might not be correct for top-side captions. The KOMA classes provide an option tablecaptionabove (or so) to fix this. See How to force table caption on top? for more.


The same principle is true for figures where figure is the floating container and \includegraphics (or another image inclusion macro) is the content producing macro which can also be used outside figure. You can use this to declare a tabular as a logical figure. Its cells can of course also include \includegraphics macros. This is often used to lay out multiple images (with or without some extra text) as one figure.

\begin{figure}
  \centering % to have it centered
  \begin{tabular}{ll}
      A logical & figure \\
      with a & tabular structure \\
  \end{tabular}
  \caption{The figure caption you like}\label{fig:somelabel}
\end{table}

It's even possible to have multiple \caption in different cells, but for this there are now specialized packages as mentioned in e.g. Table of images with captions.

share|improve this answer
10  
Why would someone downvote this answer? –  Alan Munn Feb 6 '11 at 14:41
add comment

You don't have to do anything. The table environment doesn't have to contain a tabular environment.

\documentclass[12pt]{scrartcl}
\begin{document}
\listoftables
\begin{table}
Whatever you want, e.g.\ an image.
\caption{My first table}
\end{table}
\end{document}  
share|improve this answer
add comment

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.