[Tex/LaTex] modifying margins for one slide

beamermargins

I need help for modifying the margins for only one slide in the beamer class

In other words, I need a local version of

\setbeamersize{text margin left=<size>,text margin right=<size>} 

in here

\documentclass{beamer}
\usetheme{Rochester}
\usepackage{lipsum}

\setbeamersize{text margin left=5pt,text margin right=5pt}

\begin{document}

\begin{frame}
\lipsum[2]
\end{frame}

\end{document}

Best Answer

You can define a command for this using a minipage of the desired width inside a \makebox (using the optional argument you can change the default value of 3em to any desired value):

\documentclass{beamer}
\usetheme{Rochester}
\usepackage{lipsum}

\newcommand\Wider[2][3em]{%
\makebox[\linewidth][c]{%
  \begin{minipage}{\dimexpr\textwidth+#1\relax}
  \raggedright#2
  \end{minipage}%
  }%
}

\begin{document}

\begin{frame}
\lipsum[2]
\end{frame}

\begin{frame}
\Wider{\lipsum[2]}
\end{frame}

\begin{frame}
\Wider[4em]{\lipsum[2]}
\end{frame}

\end{document}

enter image description here

Another option, would be to use a list, and this can be easily done using adjustwidth from the changepage package:

\documentclass{beamer}
\usetheme{Rochester}
\usepackage{changepage}
\usepackage{lipsum}

\begin{document}

\begin{frame}
\lipsum[2]
\end{frame}

\begin{frame}
\begin{adjustwidth}{-1.5em}{-1.5em}
\lipsum[2]
\end{adjustwidth}
\end{frame}

\begin{frame}
\begin{adjustwidth}{-2em}{-2em}
\lipsum[2]
\end{adjustwidth}
\end{frame}

\end{document}
Related Question