3

So I'm making some slides that have a table-like structure to them. On the left will be an example, and on the right will be the definition. I also want it to use the pause feature since I'll be going through them one at a time and so I'm using tabular rather than table (since I've haven't found a way to make table and pause work in Beamer). Ideally, I'd just have the widths be half way down the slide.

So far I've figured out how to resize the box but it makes text really small. I'd want a way to keep the text the same size as regular, but have the table automatically begin the next line once the table cell's width is used up.

For example

\begin{frame}

\resizebox{\textwidth}{!}{%
\begin{tabular} {l l}
     2x+3y=4 & \textbf{linear equation} (in the variables $x_{1}, \dots ,x_{n}$): An equation that can be written in the form $a_{1}x_{1}+a_{2}x_{2}+ \cdots +a_{n}x_{n}=b$, where $b$ and the \textbf{coefficients} $a_{1}, \dots, a_{n}$ are real or complex numbers, and $n$ may be any positive integer. \\
\pause
     Example & Definition \\
\end{tabular}
} % end of scope of "\resizebox"  directive

\end{frame}{}
1
  • Tabularx and its X type column might be useful.
    – leandriis
    Commented Nov 13, 2019 at 17:46

2 Answers 2

4

A small variation of the @leandriis answer (+1):

\documentclass{beamer}
\usepackage{tabularx}
\usepackage{amsmath}

\begin{document}
\begin{frame}%[t]
\begin{tabularx}{\linewidth}{@{} lX @{}}
\only<1->{
$2x+3y=4$   &  \textbf{linear equation} (in the variables $x_{1}, \dotsc ,x_{n}$): 

                An equation that can be written in the form 
                    \begin{gather*}
                a_{1}x_{1}+a_{2}x_{2}+ \dotsm +a_{n}x_{n}=b,
                    \end{gather*}
                where $b$ and the \textbf{coefficients} $a_{1}, \dotsc, a_{n}$ are real or complex numbers, and $n$ may be any positive integer $(n \in \mathbb{Z})$. \\
        }
\only<2->{
     Example & Definition \\
        }
\end{tabularx}
\end{frame}
\end{document}

enter image description here

1
  • Thanks, that's it :D Always find "pause" feature in Beamer always tricky when I'm using tables.
    – Sat
    Commented Nov 16, 2019 at 1:39
2

With the help of tabularx and its variable with X type column you can ensure that a table is as wide as a given width:

\documentclass{beamer}
\usepackage{tabularx}

\begin{document}

\begin{frame}
\begin{tabularx}{\textwidth}{lX}
     2x+3y=4 & \textbf{linear equation} (in the variables $x_{1}, \dots ,x_{n}$): An equation that can be written in the form $a_{1}x_{1}+a_{2}x_{2}+ \cdots +a_{n}x_{n}=b$, where $b$ and the \textbf{coefficients} $a_{1}, \dots, a_{n}$ are real or complex numbers, and $n$ may be any positive integer. \\
\pause
     Example & Definition \\
\end{tabularx}
\end{frame}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .