4

I have two templates I want to fit together.

The first part (Make desired footline) is to add the footline to the Berkeley-Theme while still be able to use the logo. This works like charm so far.

My problem however is the second part where I want to create the desired Roman Appendix numbering (as seen in the slides). With this code I found only my footline diapperes and only a white footline with the correct pagenumbering is present.

Is there a way to combine both such that I still have the footline but the numbering is the way I want it to.

Thank you in advance!

PS: Numbering should be as following:
For the normal slides: 1/x, 2/x, ..., x/x
For the Appendix: I, II, III, IV, ...

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\setcounter{subsection}{1}

\usetheme{Berkeley}
\usecolortheme{seahorse}
\usefonttheme{serif}
\useinnertheme{rounded}

%%Make desired footline
\makeatletter
\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{subtitle in head/foot}%
    \usebeamerfont{title in head/foot}\insertsubtitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
    \insertframenumber/\inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother


%%Make Roman Appendix numbering
\setbeamertemplate{footline}[page number]
\defbeamertemplate{footline}{page number appendix}
{%
  \hfill%
  \usebeamercolor[fg]{page number in head/foot}%
  \usebeamerfont{page number in head/foot}%
  \insertpagenumber\kern1em\vskip2pt%
}
\makeatletter
\g@addto@macro\appendix{%
  \setbeamertemplate{footline}[page number appendix]%
  \renewcommand*{\insertpagenumber}{%
    \Roman{framenumber}%
  }%
}
\makeatother

\usepackage{appendixnumberbeamer}

%%No Navigation template
\beamertemplatenavigationsymbolsempty

%%Title
\title{My beamer slides}
\author{Just another guy}
\institute[ABC]{My famous ABC institute}
\date{worldwide, \today}

%\logo{\includegraphics[width=1.5cm]{./logo}}

\begin{document}

\section{First Section}
\begin{frame}{First slide}
First slide (1/2)
\end{frame}

\begin{frame}{Second slide}
Second slide (2/2)
\end{frame}


\appendix

\section{Appendix}
\begin{frame}
First appednix (I)
\end{frame}

\end{document}

1 Answer 1

3

I think, your footline disappeared, because it was overwritten with \setbeamertemplate{footline}[page number]

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\setcounter{subsection}{1}

\usetheme{Berkeley}
\usecolortheme{seahorse}
\usefonttheme{serif}
\useinnertheme{rounded}

%%Make desired footline
\makeatletter
\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{subtitle in head/foot}%
    \usebeamerfont{title in head/foot}\insertsubtitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
    \insertframenumber/\inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}

\defbeamertemplate{footline}{page number appendix}
{
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
            \usebeamerfont{author in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{subtitle in head/foot}%
            \usebeamerfont{title in head/foot}\insertsubtitle
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
            \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
             \Roman{framenumber}\hspace*{2ex} 
        \end{beamercolorbox}}%
        \vskip0pt%
    }

\g@addto@macro\appendix{%
    \setbeamertemplate{footline}[page number appendix]%
}

\makeatother

\usepackage{appendixnumberbeamer}

%%No Navigation template
\beamertemplatenavigationsymbolsempty

%%Title
\title{My beamer slides}
\author{Just another guy}
\institute[ABC]{My famous ABC institute}
\date{worldwide, \today}

%\logo{\includegraphics[width=1.5cm]{./logo}}

\begin{document}

\section{First Section}
\begin{frame}{First slide}
First slide (1/2)
\end{frame}

\begin{frame}{Second slide}
Second slide (2/2)
\end{frame}


\appendix

\section{Appendix}
\begin{frame}
First appednix (I)
\end{frame}

\begin{frame}
    First appednix (II)
\end{frame}

\end{document}

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.