# beamer: frame without decorations, with custom margin

I use \begin{frame}[plain] to have a frame without decorations. The content (inside columns environment) seems to horizontally still respecting the old margins (with Warsaw, gap on the left), although vertically, the whole space is taken as it should be. Beamer manual says that plain only suppresses decorations, but does not mention it changing geometry.

Is there a straightforward way to have empty frame, with some user-defined margins?

EDIT: this is what I get with the following; text on the second slide is not left.

\documentclass{beamer}
\usetheme{Berkeley}
\begin{document}
\section{foo}
\begin{frame}[t]
Text
\end{frame}
\begin{frame}[plain,t]
Text
\end{frame}
\end{document}


EDIT 2:

The solutions suggested by @MarcoDaniel does not restore the margin correctly unfortunately (without \restoregeometry, the slide decoration starts on the left correctly, but the block goes over it just like on the screenshot). Enclosing the change in \bgroup...\egroup does not help:

The bounty has already been awarded, but here's the beamer way:

beamer uses six horizontal lengths:

• \beamer@leftsidebar and \beamer@rightsidebar store the (horizontal) sizes of the side bars.

• \beamer@leftmargin and \beamer@rightmargin store the distance between sidebar and text.

• The macros \Gm@lmargin and \Gm@rmargin store the distance from the edge of the paper to the edge of the text.

Thus the sum \beamer@leftsidebar and \beamer@leftmargin is exactly \Gm@lmargin.

Thus, if you wish to put some text right next to the left edge of paper with the proper separation, you need a horizontal skip equal to \beamer@leftsidebar to get there.

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

\newlength\leftsidebar
\newlength\rightsidebar
\makeatletter
\setlength\leftsidebar{\beamer@leftsidebar}
\setlength\rightsidebar{\beamer@rightsidebar}
\makeatother

\begin{document}

\begin{frame}[t]
\lipsum[4]
\end{frame}

\hoffset=-\leftsidebar
\begin{frame}[plain,t]
\lipsum[4]
\end{frame}

\end{document}

• I found I had to use -0.5\leftsidebar to get it to work – Jack Aidley Aug 24 '15 at 14:48
• You might want to check my answer to this related post, where I compile stuff from different answers and end up with even less beamer-hacking than in this answer. – benjamin Oct 19 '16 at 8:49
• There is a bug in this approach. Please, put there a new textual content after removing the left bar. There is no stopper at the end. How to do it? - - I think you need \hoffset=0in % restore left margin. – Léo Léopold Hertz 준영 Oct 5 '17 at 10:50

One way to do this is to use the changemargin environment from UK List of TeX FAQ:

\documentclass{beamer}
\usetheme{Berkeley}

\newenvironment{changemargin}[2]{%
\begin{list}{}{%
\setlength{\topsep}{0pt}%
\setlength{\leftmargin}{#1}%
\setlength{\rightmargin}{#2}%
\setlength{\listparindent}{\parindent}%
\setlength{\itemindent}{\parindent}%
\setlength{\parsep}{\parskip}%
}%
\item[]}{\end{list}}

\begin{document}
\section{foo}
\begin{frame}[t]
Text
\end{frame}

\begin{frame}[plain,t]
\begin{changemargin}{-2cm}{0cm}
Text
\end{changemargin}
\end{frame}
\end{document}


A simple solution is change the \hoffset:

\documentclass{beamer}
\usetheme{Berkeley}
\begin{document}
\section{foo}

\begin{frame}[t]
Text
\end{frame}

\hoffset=-.8in % no left margin

\begin{frame}[plain,t]
Text
\end{frame}

\hoffset=0in % restore left margin

\begin{frame}[t]
Text
\end{frame}

\end{document}


Edit

Determine automatically the right \hoffset

To remove the left margin (completely, not as in the MWE) you can add this to the preamble:

\usepackage{calc}% http://ctan.org/pkg/calc
\newlength{\noleftmargin}
\setlength{\noleftmargin}{-1in-\oddsidemargin}%


And then, before of the plain frame, use:

 \hoffset=\noleftmargin


Explanation

The left margin of a Beamer presentation is always 1 inch plus the lengths \hoffset and \oddsidemargin.

In the default theme, as well as in Berkeley or Warsaw you can see that the default \hoffset is 0pt and \oddsidemargin is a negative value. You always can check this value with \the\oddsidemargin.

How I can one be sure that there are exactly 1 inch plus \hoffset plus \oddsidemargin? Use the package layout:

\documentclass{beamer}
\usetheme{Berkeley}
\usepackage{layout}
\begin{document}
\begin{frame}
The \texttt{\textbackslash hoffset} is now \the\hoffset\\
The \texttt{\textbackslash oddsidemargin} is now \the\oddsidemargin
\end{frame}
\begin{frame}[plain]
\vspace{-1.5cm}\hspace{1cm}\vbox{% only to move a little the scheme
\layout
}
\end{frame}
\end{document}


So, in the first MWE, as the default \oddsidemargin was -13pt (-.18in), still remain - roughly - 0.8 inches of left margin.

Therefore, you can remove completely the left margin changing accordingly one or two of these lengths. For example, without the package calc and nothing special in the preamble , you can also remove the left margin with:

\oddsidemargin=0pt
\hoffset=-1in


But this way you need to restore two values to return to the defaults.

• This solution is very simple :-). If you can tell me a way to automatically determine the -.8in you get the bounty. – Ingo Aug 27 '14 at 13:45
• In my opinion, the bounty is well deserved :-). Thanks a lot! – Ingo Aug 27 '14 at 17:13

The class beamer loads the package geometry by default. The package geometry provides the command \newgeometry which allows to change the page settings inside the document.

Here an example:

\documentclass{beamer}
\usetheme{Berkeley}
\begin{document}
\section{foo}
\begin{frame}[t]

Text
\end{frame}

\newgeometry{margin=1cm}
\begin{frame}[plain,t]

Text
\end{frame}
\restoregeometry
\begin{frame}[plain,t]

Text
\end{frame}

\end{document}


• Thanks. I double-checked, the theme was Berekeley, and posted a screen into the quietion itself. – eudoxos Nov 10 '11 at 16:57
• Oh crap, the geometry does not get restored properly :-| I put screenshot of the question edit... – eudoxos Nov 11 '11 at 18:02
• What @eudoxos says: the geometry does not get reset. – Ingo Aug 21 '14 at 14:12
• @Ingo I've provided another answer below using the native beamer lengths. I don't care about the bounty, though (and you've already awarded it), but you might be interested in knowing the "proper" lengths that beamer uses in a frame. – Gonzalo Medina Aug 27 '14 at 17:32

Related to this earlier question:

\documentclass{beamer}
\usetheme{default}
\setbeamersize{text margin left=1ex} % Beamer manual, section 8.3
\begin{document}
\begin{frame}[plain,t]
Here's some more content. Here's some more content. Here's some more content.
\end{frame}
\end{document}

• that solution doesn't work inside \begin{document}. The command uses \geometry. You can use \newgeometry instead. – Marco Daniel Nov 10 '11 at 17:35
• What doesn't work inside \begin{document}? Not following. – Mike Renfro Nov 11 '11 at 2:23
• The command \setbeamersize works only in the preamble. So you can manipulation a single frame with this command. – Marco Daniel Nov 11 '11 at 8:31
• @MarcoDaniel: confirming that { \newgeometry{margin=1cm}\begin{frame}[plain] ... \end{frame} } works. Can you write it as answer so that it is visible and I can accept it? Thanks! – eudoxos Nov 11 '11 at 8:39
• @MarcoDaniel: I did :-) – eudoxos Nov 11 '11 at 8:58