[Tex/LaTex] How to use wider and higher margins in a beamerboxesrounded box

beamerboxes

I love beamerboxesrounded boxes in Beamer presentations, but the text fits too tightly into the box. So I would like to use equal but wider and higher margins (left, right, top, bottom) around the text, or padding inside the box. How is it possible?

Best Answer

You can use the package tcolorbox which provides several keys for customization of margins, padding and so on.

Here are few examples:

\documentclass{beamer}
\usepackage{lmodern}
\usepackage[most]{tcolorbox}

\tcbset{beamer,colback=blue!20!white,colframe=blue!75!black}

\begin{document}
\begin{frame}{Some boxes}
\begin{tcolorbox}[title=Title]
block text
\end{tcolorbox}

\begin{tcolorbox}[title=Title,boxsep=3mm]
block text
\end{tcolorbox}

\begin{tcolorbox}[title=Title, size=small]
block text
\end{tcolorbox}

\begin{tcolorbox}[title=Title, width=4cm,size=fbox]
block text
\end{tcolorbox}
\end{frame}
\end{document}

The result:

enter image description here

More details in the package documentation.