1

I have an element in the footline that I want to left-align with the frame contents. I have tried using \Gm@lmargin in various ways, but I always get an "undefined control sequence" error. Here is an example of what I've tried.

\documentclass{beamer}

\title{Sample Presentation}

\defbeamertemplate*{footline}{custom}[1][]
{
  \begin{beamercolorbox}{footline}
    \hspace{\Gm@lmargin} % Gives me "undefined control sequence"
    This text should be left aligned with the frame contents

    THIS WILL BE A GRAPHIC THAT SPANS THE WIDTH OF THE WHOLE PAGE
  \end{beamercolorbox}
}

\begin{document}

\begin{frame}{My frame title}
Lorem ipsum dolor sit amet, and so on and so forth.
\end{frame}

\end{document}

I tried looking at how some of the templates use this variable, but the examples I found were difficult for me to understand.

0

1 Answer 1

1

\gm@lmargin contains an @ sign, this means you need to enclose the definition of your template in \makeatletter ... \makeatother, see the linked question at the very top of your question to learn why (and you have one space too much after the \hspace):

\documentclass{beamer}

\title{Sample Presentation}

\makeatletter
\defbeamertemplate*{footline}{custom}[1][]
{
  \begin{beamercolorbox}{footline}
    \hspace{\Gm@lmargin}% Gives me "undefined control sequence"
    This text should be left aligned with the frame contents

    THIS WILL BE A GRAPHIC THAT SPANS THE WIDTH OF THE WHOLE PAGE
  \end{beamercolorbox}
}
\makeatother
\begin{document}

\begin{frame}{My frame title}
Lorem ipsum dolor sit amet, and so on and so forth.
\end{frame}

\end{document}

enter image description here

Not the answer you're looking for? Browse other questions tagged .