beamer add tag
samcarter
> # Don't take this question as an invitation to place long texts in beamer frames -- that's usually bad style and your audience will probably hate it

Assume that I need a beamer frame with more text than fits on the frame. For a good readability, I don't like scaling elements which contain text, how can I instead automatically choose a suitable font size so the text fits in the frame? 

```
\documentclass{beamer}

\usepackage{lipsum}

\begin{document}

\begin{frame}
  \lipsum[1-5]
\end{frame}
\end{document}
```

![Screenshot 2021-10-05 at 12.48.16.png](/image?hash=1d76ae06d126da4d74c030edef2fe1138d199c4a4eca40d006a1d51f8c86ba07)
Top Answer
samcarter
One possibility is to use the `fitting` library from the `tcolorbox` package:

```
\documentclass{beamer}

\usepackage{lipsum}
\usepackage{tcolorbox}
\tcbuselibrary{fitting}

\begin{document}

\begin{frame}
 \begin{tcolorbox}[fit,width=\textwidth,height=.9\textheight,size=minimal,colback=white,fit algorithm=fontsize,colframe=white]
  \lipsum[1-5]
 \end{tcolorbox}
\end{frame}
\end{document}
```

![Screenshot 2021-10-05 at 12.46.52.png](/image?hash=71a2ef00c706103ba07426ba2674619b0795f3c8c07aa2cdc4cf4d9f131fdb81)

(Dependingly on how tall other elements on the frame are, you might have to adjust `height=.9\textheight` to a suitable value)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.