22

I'm trying to resize an equation on a beamer slide to make it larger. However, the usual approach of using \scalebox doesn't seem to work:

\begin{frame}
\scalebox{2}{
\begin{align}
  x &= y\\
  y &= z
\end{align}
}
\end{frame}

Producing the following error:

! Missing \endgroup inserted.
<inserted text> 
                \endgroup

How do I rescale an align environment on a beamer slide?

1
  • Add \Huge just before it? Mar 18, 2014 at 6:15

1 Answer 1

25

align adjusts its contents based on the available width (in order to place it horizontally in the centre, and to place the appropriate tags/numbering). Inserting it inside a \scalebox causes the problem that there's no defined box to contain it. However, if you provide such a containment, it scales without problem:

enter image description here

\documentclass{beamer}% http://ctan.org/pkg/beamer
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}

\begin{frame}
\begin{align}
  x &= y\\
  y &= z
\end{align}
\end{frame}

\begin{frame}
\scalebox{2}{\parbox{.5\linewidth}{%
\begin{align}
  x &= y\\
  y &= z
\end{align}
}}
\end{frame}
\end{document}
4
  • +1 Off topic: I am curious why beamer.cls which is not a package is hosted in pkg directory of ctan.org? Theoretically it should be placed in ctan.org/cls. :-) Mar 18, 2014 at 6:35
  • 1
    @WeirdstressFunction: Yes. There are many such examples: IEEEtran, AMS-LaTeX - a collection of packages and classes, math-mode, texbook and TeX by Topic which are documents only, ... It may just be a database (filename) structure that they've stuck to in order to ease retrieval of information.
    – Werner
    Mar 18, 2014 at 6:42
  • 2
    @WeirdstressFunction "package" at ctan is a package in the sense of a package manager for linux (or tex live) a group of related files. The use is different (and predates) the use of "package" for latex which is a file containing a group of related commands. Mar 18, 2014 at 9:58
  • @Werner This way the equations inside the align environment are not in display mode any more. Any idea how to fix that other than manually leaving blank lines before and after the \scalebox and center all this stuff?
    – jdhao
    Nov 23, 2016 at 11:16

You must log in to answer this question.

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