6

I want to scale down an element in a slide so that it fits the width and/or height better. I'm willing to reduce the font size, use something like a scalebox/resizebox, or anything similar (not space squeezing though). The thing is, I want to avoid lower-level or "non-beamerish" commands, as well as avoiding choosing explicit font sizes; rather, I would like an acceptable default scaling.

What's the "beamer-idiomatic" way of doing this?

9
  • 1
    Could shrink and squeeze options suffice? They are in beamer manual, page 61, section 8.1.
    – Rmano
    Jun 8, 2016 at 15:48
  • You explicitly mention fitting to "width". Does that mean that height need not be considered in the fit? Also, how do you want the "ideal" structure of the fix? E.g. Scale by this %, fit this specified width, or make [A] the same size as [B]. Jun 8, 2016 at 16:23
  • Can you tell us, what such an "element" could be? I guess there is not "the right way" for all possible elements. Jun 8, 2016 at 16:32
  • @samcarter: Say a table (tabular), or a block.
    – einpoklum
    Jun 8, 2016 at 18:33
  • @StevenB.Segletes: See edit.
    – einpoklum
    Jun 8, 2016 at 18:34

1 Answer 1

9

To achieve a very similar goal I generally use the following:

\begin{frame}
\frametitle{Size changed}
\scalebox{0.8}{\begin{minipage}{1.20\textwidth}

... your content here ...

\end{minipage}}
\end{frame}

I do not know how to compute the combined values of the scale factor and of the minipage width, I generally try several values until it satisfies me.

For example, the following content:

\begin{itemize}
\item First item.
  \begin{itemize}
  \item First subitem.
    \begin{itemize}
    \item \lipsum[75]
    \item \lipsum[66]
    \item \lipsum[75]
    \end{itemize}
  \item Second subitem.
  \end{itemize}
\item Second item.
\item Third item.
\end{itemize}

gives:

enter image description here

and if you change the scale/minipage values to 0.6/1.6 you obtain:

enter image description here

For a centered table I use:

\begin{frame} {Scale Items}
\makebox[1.1\linewidth][c]{\scalebox{0.8}{\begin{minipage}{0.8\linewidth}
\begin{tabular}{l | c | c | c | c }
      & Column1 & Column2 & Column3 & Column4 \\
\hline \hline
Line1 & Value11 & Value12 & Value13 & Value14\\ 
Line2 & Value21 & Value22 & Value23 & Value24\\
Line3 & Value31 & Value32 & Value33 & Value34\\
Line4 & Value41 & Value42 & Value34 & Value44 
\end{tabular}
\end{minipage}}}
\end{frame}

which leads to:

enter image description here

and if you change \scalebox{0.8} to \scalebox{1.2} then you will have the following result:

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.