0

I needed to remake the footline in the Szeged theme, I did it according to this thread. But I'm getting this error:

presentatie_template.tex|90 error| Undefined control sequence.

! Undefined control sequence. \beamer@@tmpl@footline ...\insertauthor ~~\beamer {\insertshortinstitute }{}...

l.31 \begin{document}

? ! Emergency stop. \beamer@@tmpl@footline ...\insertauthor ~~\beamer {\insertshortinstitute }{}...

l.31 \begin{document}

885 words of node memory still in use: 11 hlist, 2 vlist, 3 rule, 2 local_par, 8 dir, 6 glue, 4 kern, 3 penalty, 5 glyph, 25 attribute, 70 glue_spec, 25 attribute_list, 8 temp, 1 write, 1 pdf_de st, 10 pdf_colorstack nodes avail lists: 2:1,5:1 ! ==> Fatal error occurred, no output PDF file produced! Transcript written on presentatie_template.log.

shell returned 1

Here is the full sample code:

\documentclass[compress]{beamer}
\setbeameroption{show notes}
\useinnertheme{default}
\usefonttheme{professionalfonts}
\usetheme{Szeged}
\usecolortheme{beaver}

\setbeamertemplate{footline}
{
  \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
  \end{beamercolorbox}
  \hbox{
    \begin{beamercolorbox}[wd=0.5\paperwidth, ht=2.5ex, dp=1.125ex, center]{title in head/foot}
      \usebeamerfont{author in head/foot}\insertauthor~~\beamer{\insertshortinstitute}{}
    \end{beamercolorbox}
    \begin{beamercolorbox}[wd=0.333333\paperwidth, ht=2.5ex, dp=1.125ex, center]{title in head/foot}
      \usebeamerfont{title in head/foot}\insertshorttitle
    \end{beamercolorbox}
    \begin{beamercolorbox}[wd=0.166666\paperwidth, ht=2.5ex, dp=1.125ex, center]{title in head/foot}
      \usebeamerfont{title in head/foot}\insertframenumber/\inserttotalframenumber\hspace*{2ex}
    \end{beamercolorbox}}
  \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
  \end{beamercolorbox}
}

\title{Sample presentation}
\author{Some}
\institute{Some}
\date{Thu Mar 23 07:00:41 PM CET 2023}

\begin{document}

\begin{frame}
    \titlepage
\end{frame}

\section{First frame}
\frame{ \frametitle{First frame}
  Some text and 
    \begin{enumerate}
        \item{one}
        \item{two}
        \item{three}
    \end{enumerate}
}

\end{document}

Any thoughts on how to resolve this?

0

2 Answers 2

1

There is an important difference between the answer you linked to and your code. You have

\beamer{\insertshortinstitute}{}

This will cause an error because the macro \beamer is not defined (the macro is actually called \beamer@ifempty). It also takes 3 arguments, not just 2 as in your code.

In the linked answer the actual code is

\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}

Which will check if the institute is empty and only insert it if it is not empty (this avoids empty () in case it is empty)


\documentclass[compress]{beamer}
\setbeameroption{show notes}
\useinnertheme{default}
\usefonttheme{professionalfonts}
\usetheme{Szeged}
\usecolortheme{beaver}

\makeatletter
\setbeamertemplate{footline}
{%
  \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
  \end{beamercolorbox}
  \hbox{%
    \begin{beamercolorbox}[wd=0.333333\paperwidth, ht=2.5ex, dp=1.125ex, center]{title in head/foot}%
      \usebeamerfont{author in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=0.333333\paperwidth, ht=2.5ex, dp=1.125ex, center]{title in head/foot}%
      \usebeamerfont{title in head/foot}\insertshorttitle
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=0.333333\paperwidth, ht=2.5ex, dp=1.125ex, center]{title in head/foot}%
      \usebeamerfont{title in head/foot}\insertframenumber/\inserttotalframenumber\hspace*{2ex}
    \end{beamercolorbox}}
  \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
  \end{beamercolorbox}
}


\makeatother

\title{Sample presentation}
\author{Some}
\institute{Some}
\date{Thu Mar 23 07:00:41 PM CET 2023}

\begin{document}

\begin{frame}
    \titlepage
\end{frame}

\section{First frame}
\frame{ \frametitle{First frame}
  Some text and 
    \begin{enumerate}
        \item{one}
        \item{two}
        \item{three}
    \end{enumerate}
}

\end{document}
0

I figured it out by trial and error. Changed the line:

 \usebeamerfont{author in head/foot}\insertauthor~~\beamer{\insertshortinstitute}{}

to:

 \usebeamerfont{author in head/foot}\insertauthor \hspace{5pt} \insertshortinstitute{}

And the error was resolved.

You must log in to answer this question.

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