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 a table like this:

\begin{table}
\centering
\begin{center}
\begin{tabular}{c|c|c|c}
Data set & Image size & Hole size (pix) & Total time\\
\hline
Mailbox & 459 $\times$ 489 & 30171 & 1m5s \\
Electric boxes & 688 $\times$ 478 & 45434 & 2m19s\\
Trashcan & 572 $\times$ 517 & 42734 & 1m59s\\
Air conditioners & 400 $\times$ 496 & 13709 & 23s
\end{tabular}
\end{center}
\caption{A summary of the data sets shown throughout this paper.}
\label{tab:Timing}
\end{table}

Table image

The problem is that the caption is only about 1 word wide (and centered), so it takes up about 10 lines. Why would this caption not behave like a normal figure caption and simply occur page-width?

Here is a minimal working example (you need this style: daviddoria.com/Uploads/acmtog.cls):

\documentclass{acmtog}
\pdfminorversion=5
\begin{document}

\begin{table}
\centering
\begin{center}
\begin{tabular}{c|c|c|c}
Data set & Image size & Hole size (pix) & Total time\\
\hline
Mailbox & 459 $\times$ 489 & 30171 & 1m5s \\
Electric boxes & 688 $\times$ 478 & 45434 & 2m19s\\
Trashcan & 572 $\times$ 517 & 42734 & 1m59s\\
Air conditioners & 400 $\times$ 496 & 13709 & 23s
\end{tabular}
\end{center}
\caption{A summary of the data sets shown throughout this paper.}
\label{tab:Timing}
\end{table}

\end{document}
share|improve this question
1  
You need to turn this into a complete minimal document. Simply pasting your code into an article document, for example, does not reproduce the behaviour. –  Jake Apr 24 '12 at 15:49
    
@Jake Ok, I modified the original question to include a minimal document and the document class file necessary. –  David Doria Apr 24 '12 at 15:59
3  
\centering inside floats like figure and table is sufficient -- don't use the center environment in addition (or instead). See tex.stackexchange.com/questions/2651/… for details. –  lockstep Apr 24 '12 at 16:02
    
Would you mind changing the title of your question to something like "Table caption very skinny when using ACM ToG documentclass"? That will make it easier for others with the same problem to find the question. –  Jake Apr 24 '12 at 16:15
add comment

1 Answer

up vote 11 down vote accepted

In ACM document classes, I think you create tables via the \tbl macro.

\begin{table}
\tbl{caption}{%                                          
\begin{tabular}
...
\end{tabular}}
\end{table}

See section 4.2 of the documentation for acmsmall for example.

Change the table to:

\begin{table}
\tbl{A summary of the data sets shown throughout this paper.}{
\begin{tabular}{c|c|c|c}
Data set & Image size & Hole size (pix) & Total time\\
\hline
Mailbox & 459 $\times$ 489 & 30171 & 1m5s \\
Electric boxes & 688 $\times$ 478 & 45434 & 2m19s\\
Trashcan & 572 $\times$ 517 & 42734 & 1m59s\\
Air conditioners & 400 $\times$ 496 & 13709 & 23s
\end{tabular}}
\label{tab:Timing}
\end{table}
share|improve this answer
    
Thanks Ian! I added the correct syntax for my table to your answer - once it is peer reviewed it should appear. –  David Doria Apr 24 '12 at 16:12
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.