Graphics, Figures & TablesRescale table with caption

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tho_mi
Posts: 20
Joined: Tue Sep 11, 2012 6:57 pm

Rescale table with caption

Post by tho_mi »

Hey,

I try to rescale a table with a caption, but it doesn't work. First i put the tabular into a center environment and the rescaling (via resizebox or scalebox) worked perfectly. But in the center environment it isn't possible to add a caption-tag, so I changed the center to table, but then the rescaling doesn't work anymore, no matter whether I use the resizebox or the scalebox.

Here is the code:

Code: Select all

\begin{frame}[c]{test-table}
\scalebox{0.5}{
%\resizebox{100px}{!}{
\begin{center}
%\begin{table}

%\caption{test}
\begin{tabular}{rclrrrr}
	\toprule
		& \phantom{   } && \textbf{test} & \textbf{test} & \textbf{test} & \textbf{test} \\
	\bottomrule
\end{tabular}
\end{center}
%\end{table}
}
\end{frame}
Putting the resize-element into the table environment also doesn't change anything. Does anyone know how I can get both, a caption and a rescaled table?

Thanks in advance!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply