0

I would like to modify the CambridgeUS theme in order to keep the same color but by changing the disposition of my footer as follows: Title/Number of page with "--" and not "/" and Subtitles.

For the title page, I'd like to remove the header and footer as it is possible to do with a simple \thispagestyle{empty}.

Two more things: how can I change the right and left margins of the document to get less tighter? How is it possible to not have shadow block but the same provide by the pictures below? (with the Cambridge theme and the lily color if it is simple to do that...). Thank you very much!

\documentclass{beamer}

\mode<presentation> {
\usetheme{CambridgeUS}
\usecolortheme{lily}
\useinnertheme{circles} % rectangles, circles, inmargin, rounded
}
\setbeamertemplate{blocks}[rounded][shadow=true]
\usepackage{lmodern}  % latin modern font
\usepackage{cmbright} % computer modern font sans serif
\usepackage{graphicx} % Allows including images
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
\usepackage{appendixnumberbeamer} % Number for appendix numbers
\usepackage{amsmath}
\usepackage{ragged2e} % \justifying to justify the text

\addtobeamertemplate{block begin}{}{\justifying}

\usepackage{hyperref} % Generate hyperlinks in the final pdf

% CREATE HYPERLINKS
\hypersetup{
    %bookmarks=true,                    % show bookmarks bar?
    unicode=false,                      % non-Latin characters in Acrobat’s bookmarks
    pdftoolbar=true,                    % show Acrobat’s toolbar?
    pdfmenubar=true,                    % show Acrobat’s menu?
    pdffitwindow=false,                 % window fit to page when opened
    pdfstartview={FitH},                % fits the width of the page to the window
    %pdftitle={My title},               % title
    %pdfauthor={Author},                % author
    %pdfsubject={Subject},              % subject of the document
    %pdfcreator={Creator},              % creator of the document
    %pdfproducer={Producer},            % producer of the document
    %pdfkeywords={keyword1} {key2},     % list of keywords
    %pdfnewwindow=true,                 % links in new window
    colorlinks=true,                    % false: boxed links; true: colored links
    linkcolor=black,                    % color of internal links (change box color with linkbordercolor)
    citecolor=green,                    % color of links to bibliography
    filecolor=magenta,                  % color of file links
    urlcolor=red                    % color of external links
}

% gets rid of bottom navigation bars
%\setbeamertemplate{footline}[page number]{}

% gets rid of navigation symbols
\setbeamertemplate{navigation symbols}{}

% add figures numbering
\setbeamertemplate{caption}[numbered]

%\setbeamerfont{frametitle}{family=\bfseries}

% Display content for long talk
%\setbeamerfont{myTOC}{series=\bfseries,size=\normalfont}
%\AtBeginSection[]{\frame{\frametitle{Outline}
%\usebeamerfont{myTOC}\tableofcontents[current]}}
%\setbeamertemplate{headline}{}

\setcounter{tocdepth}{1} % in the table of contents
\setcounter{secnumdepth}{2} % with a number

\title[SCI Communication]{Serial Communication Interface Evaluation} % The short title appears at the bottom of every slide, the full title is only on the title page
\subtitle{EE-491(a): Project in Electrical Energy Systems}

\author{Antoine Giraldi} % Your name
\institute[EPFL] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space
{Power Electronics Laboratory, EPFL
%   \inst{1}%
%   EPFL %\\ % Your institution for the title page
%   \and
%   \inst{2}%
%   Power Electronics Laboratory
%\bigskip
%\textit{Power Electronics Laboratory} % Your email address
}
\date{\today} % Date, can be changed to a custom date

\begin{document}
%------------------------------------------------
\begin{frame}
\titlepage % Print the title page as the first slide
\end{frame}

\section[Technical Approach]{Technical Approach} 
%------------------------------------------------
\begin{frame}
\frametitle{Simulink implementation}

\end{frame}
\end{document}

enter image description here

enter image description here

enter image description here

2 Answers 2

1

Here's the definition of the footline used by CambridgeUS (from the file beamerouterthemeinfolines.sty):

\defbeamertemplate*{footline}{infolines theme}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \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%
}

Clearly, the / you want to replace is on the \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} row.

As for the titlepage, you can use \begin{frame}[plain] to get an empty titlepage.

Here's an MWE with a redefinition of the footline:

\documentclass{beamer}

\mode<presentation> {
\usetheme{CambridgeUS}
\usecolortheme{lily}
\useinnertheme{circles} % rectangles, circles, inmargin, rounded
}
\setbeamertemplate{blocks}[rounded][shadow=true]

\makeatletter
\setbeamertemplate{footline}%{infolines theme}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \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

% gets rid of navigation symbols
\setbeamertemplate{navigation symbols}{}

% add figures numbering
\setbeamertemplate{caption}[numbered]

\setcounter{tocdepth}{1} % in the table of contents
\setcounter{secnumdepth}{2} % with a number

\title[SCI Communication]{Serial Communication Interface Evaluation} % The short title appears at the bottom of every slide, the full title is only on the title page
\subtitle{EE-491(a): Project in Electrical Energy Systems}

\author{Antoine Giraldi} % Your name
\institute[EPFL] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space
{Power Electronics Laboratory, EPFL
%   \inst{1}%
%   EPFL %\\ % Your institution for the title page
%   \and
%   \inst{2}%
%   Power Electronics Laboratory
%\bigskip
%\textit{Power Electronics Laboratory} % Your email address
}
\date{\today} % Date, can be changed to a custom date

\begin{document}

%------------------------------------------------
\begin{frame}[plain]
\titlepage % Print the title page as the first slide
\end{frame}

\section[Technical Approach]{Technical Approach} 
%------------------------------------------------
\begin{frame}
\frametitle{Simulink implementation}

\end{frame}
\end{document}

And the result:

Result

You can change \setbeamertemplate{blocks}[rounded][shadow=true] to change the block appearance and use \setbeamersize{text margin left=0pt,text margin right=0pt} to change the text margin.

Let me know if you have any questions!

5
  • Thank you it's perfect ! I can see you put in white the section title. Mine is black in the header what is the code for this? And what is the goal by using the commands: \makeatletter and \makeatother ?
    – yond4im
    Jun 9, 2015 at 9:30
  • As you can see in the definition of the footline, everything is done inside beamercolorbox environments. These are named different things, for example the author in the footline is in the beamercolorbox called author in head/foot (\begin{beamercolorbox}[...]{author in head/foot}<-NAME). To change the color of the content in a colorbox, use \setbeamercolor{NAME}{fg=black,bg=yellow} (bg sets the background, remove this if you don't want to change the background of the colorbox). In your particular case, you can write \setbeamercolor{section in head/foot}{fg=black}
    – user49901
    Jun 9, 2015 at 9:38
  • \makeatletter and \makeatother are programming commands to make @ a command instead of a letter, sort of
    – user49901
    Jun 9, 2015 at 9:39
  • I added this code because I want to modify the headline and put the \setbeamercolor as you told me to put it but this does not work... I am doing something wrong :P So I need to modify the setbeamertemplate{headline} and put \setbeamercolor where?
    – yond4im
    Jun 9, 2015 at 12:01
  • In the beginning, before \begin{document}, and after your \usetheme, \usecolortheme (and so on) commands. If you can't get it to work, update your question with your new code and I'll look at it!
    – user49901
    Jun 9, 2015 at 12:12
0

Thank you for looking at I put at the place you wanted to...

\documentclass{beamer}

\mode<presentation> {
\usetheme{CambridgeUS}
%\usecolortheme{dove} % simple gray
\usecolortheme{lily}
\useinnertheme{circles} % rectangles, circles, inmargin, rounded
}
\setbeamertemplate{blocks}[rounded][shadow=false]
\setbeamercolor{section in head/foot}{fg=white}

% % % MY THEME % % %
\makeatletter % and \makeatother are programming commands to make @ a command instead of a letter, sort of
\setbeamertemplate{footline}%{infolines theme}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \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
% % % MY THEME % % %
6
  • Okay, so what else was it that you wanted to change? The code you posted works at least. The definition of the headline is also in the file beamerouterthemeinfolines.sty, you can copy the definition from there to change it.
    – user49901
    Jun 9, 2015 at 12:37
  • I just want to put the Section title in the header in white color with the red background.
    – yond4im
    Jun 9, 2015 at 12:46
  • Isn't it white with red background now? Looks white and red to me :/
    – user49901
    Jun 9, 2015 at 12:49
  • haha, not for me... Normally I do not need to use the headline definition after adding your command. <img src="i60.tinypic.com/a2lfm.png" border="0" alt="Image and video hosting by TinyPic"></a>
    – yond4im
    Jun 9, 2015 at 13:04
  • Ok I found it... the linkcolor is just in black in my \hypersetup... I need to manage that or comment it..
    – yond4im
    Jun 9, 2015 at 13:08

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.