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 usually apply a \scalebox to resize things, but I always stumble upon the fact that I cannot simply include a \caption{...} in the \scalebox.

As an alternative to \scalebox, I found I may use \resizebox, but this macro also does not allow me to include \caption{...}'s.

Is there anyway to resize both the tabular and the table's caption?

share|improve this question
1  
Using scalebox in this way is going to lead to an inconsistent looking document. Changes to captions (size/font/colour, etc) can be made using the caption package –  cmhughes Jan 16 '13 at 16:21
    
@cmhughes So, does it mean there's no applicable macro for this case? Something like \scale_tabular_and_caption{...} \= There's no much concern about the looking of this \tabular + \caption and the rest of the document; I just want to have them both resized. –  Rubens Jan 16 '13 at 16:26

1 Answer 1

up vote 7 down vote accepted

Here is working example of resizing table together with caption.

\documentclass{article}
\usepackage{graphicx}
\begin{document}

\begin{table}[htbp]
  \centering
  \resizebox{0.5\textwidth}{!}{\begin{minipage}{\textwidth}
        \caption{Table caption}
        \begin{tabular}{|c|c|c|c|}
          \hline
          $t_0~(MeV\cdot fm^3 ) $ & $t_3~(MeV\cdot fm^6)$ & $v_0/\mu~(MeV\cdot fm)$ & $1/\mu~(fm)$\\
          \hline
          $$ -497.726 & $17270$ & $-166.924$ & $0.45979$\\
          \hline
        \end{tabular}
      \end{minipage}}
\end{table}

\end{document}

FIXED: Example was edited. Thanks!

share|improve this answer
3  
+1 it might be worth mentioning that the same approach works with other boxes too such as vbox, parbox, etc. You can also just use \centering rather than \begin{centering}...\end{centering}; finally- table captions should go on top :) –  cmhughes Jan 16 '13 at 17:26
3  
Why figure? Use table and the simple \caption command. There are spurious spaces: one after \resizebox{.5\hsize}{ (and \textwidth would be better than \hsize), one after \end{minipage}. –  egreg Jan 16 '13 at 17:30
    
Thank you all for the tips! –  Rubens Jan 16 '13 at 18:33

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.