Graphics, Figures & Tablesbeamer | Array Size Adjustment to Frame Size

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
nounouuuuu201186
Posts: 36
Joined: Sun May 20, 2012 6:28 am

beamer | Array Size Adjustment to Frame Size

Post by nounouuuuu201186 »

Hi all,

I inserted a table into a page of a beamer presentation but the problem is that the array size exceeds the frame. How to adjust the array size to the size of the frame?

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

beamer | Array Size Adjustment to Frame Size

Post by Stefan Kottwitz »

You could use tabularx for producing a table with \textwidth or less, or use \resizebox of the graphicx package, with \textwidth as width argument.

Example:

Code: Select all

\documentclass{beamer}
\usepackage{tabularx}
\begin{document}
\begin{frame}\small
  \frametitle{Fitting a table}
  \begin{tabularx}{\textwidth}{*{20}{@{}X@{}}}
     01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 &
     11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20
  \end{tabularx}
  \normalsize
\end{frame}
\end{document}​
Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

beamer | Array Size Adjustment to Frame Size

Post by localghost »

Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to {TeX} SX (migrated from Stack Overflow).
Post Reply