How to scale/resize a table/tabular inside a minipage
This question is the first one to pop up when searching for: latex scale table in minipage. Likewise queries such as rescale table in minipage or resize table in minipage end up at this answer too.
I was personally also searching for this and couldn't find an answer anywhere. However,
I've found the solution. Judging by the amount of views of this question, I guess it'll be extremely helpful to some people to post it here.
So to resize/rescale a table inside a minipage, do the following:
Include the adjustbox package in your preamble:
\usepackage{adjustbox}
\usepackage{caption} % only if you want to add a caption to your table
Now you can rescale your tabular or table environment as follows:
\begin{minipage}[t]{0.5\textwidth} % minipage spans half the textwidth
\begin{center}
\begin{adjustbox}{center, width=\columnwidth-10pt} % can also use \linewidth or sth. else
% your table .. % put your table here
\end{adjustbox}
\captionof{table}{Your caption goes here} % add a caption if you want
\end{center}
\end{minipage}
Note that I've used the parameter center (to center the content). Somehow I still needed \begin{center} .. \end{center} to get everything properly aligned. Also note I used width=\columnwidth-10pt which scales both the width and height of the table simultaneously.
To use other scaling, simply use another width= for your adjustbox. This works just as normal width parameters.
Hope that helped some people out :)
You can find additional documentation of adjustbox here: adjustbox documentation.
Edit: A MWE
A minimal working example (MWE) would be the following:
\documentclass{article}
\usepackage{adjustbox}
\usepackage{caption} % only if you want to add a caption to your table
\begin{document}
\noindent % remove any indentation
\begin{minipage}[t]{0.5\textwidth} % minipage spans half the textwidth
\begin{center}
\begin{adjustbox}{center, width=\columnwidth-10pt} % can also use \linewidth or sth. else
\begin{tabular}{c | c} % little tabular example
Column 1 & Column 2 \\
\hline
1 & 2
\end{tabular}
\end{adjustbox}
\captionof{table}{Your caption goes here} % add a caption if you want
\end{center}
\end{minipage}
\end{document}
scaleboxin this way is going to lead to an inconsistent looking document. Changes tocaptions(size/font/colour, etc) can be made using thecaptionpackage – cmhughes Jan 16 '13 at 16:21\scale_tabular_and_caption{...}= There's no much concern about the looking of this\tabular + \captionand the rest of the document; I just want to have them both resized. – Rubens Jan 16 '13 at 16:26