3

Like many, I've been trying to create my institution's Powerpoint presentation template in Beamer. It is going pretty well, but I'm running into the problem that I cannot find how all of Beamer's templates fit together.

The excellent guide at http://www.cpt.univ-mrs.fr/~masson/latex/Beamer-appearance-cheat-sheet.pdf is very helpful in enumerating and grouping them, but a I haven't been able to identify what template determines the background color of a regular frame.

I was able to get the title page to be good (enough), as well as the frametitle and the footline.

The remaining questions I have are:

  1. What template do I need to define set background color, font color, and font family of "regular" frames?

  2. How could I have figured this out without asking here?

My current definitions are:

color theme:

\mode<presentation>

\definecolor{gold}{RGB}{255, 181, 0}
\definecolor{brown}{RGB}{ 79, 44, 29}

% Settings
\setbeamercolor*{title page header}{fg=brown}
\setbeamercolor*{subtitle}{fg=white}
\setbeamercolor*{author}{fg=white}
\setbeamercolor*{date}{fg=white}
\setbeamercolor*{footline}{fg=gold, bg=brown}
\setbeamercolor*{white}{bg=white}

\mode
<all>

Outer theme:

\mode<presentation>

% Frame title
\defbeamertemplate*{frametitle}{adelphi}[1][]
{
  \begin{beamercolorbox}[wd=\paperwidth]{frametitle}
  \begin{tikzpicture}
  \useasboundingbox[fill=gold](0,0) rectangle(\the\paperwidth,.11\paperheight);

   \ifx\insertframesubtitle\@empty%
      {\node[anchor=west, brown, font=\large] at (0.5,0.5){\insertframetitle};}
   \fi
  \end{tikzpicture}
  \end{beamercolorbox}
}


\defbeamertemplate*{footline}{adelphi}[1][]
{
  \begin{beamercolorbox}[wd=\paperwidth, ht=.02\paperheight,leftskip=.05\paperwidth]{white}%
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=\paperwidth, ht=.1\paperheight,leftskip=.05\paperwidth,
    rightskip=.05\paperwidth]{footline}%
  \begin{minipage}[c]{.25\paperwidth}
  \insertauthor
  \end{minipage}
  \hfill
  \insertframenumber
  \hfill
  \includegraphics[height=.08\paperheight]{Adelphi-Wordmark-Gold-RGB.png}\smallskip%
  \end{beamercolorbox}
  \vfill
}

\mode<all>

Inner template

\mode<presentation>

\defbeamertemplate*{background}{adelphi}[1][] {
  \begin{tikzpicture}
  \useasboundingbox (0, 0) rectangle(\paperwidth,\paperheight);
  \fill[color=gold](0, 0) rectangle (\paperwidth, \paperheight);
  \ifnum\thepage>1\relax%
   \fill[white,opacity=1] (0,0) rectangle (\the\paperwidth,\the\paperheight);
  \fi
  \end{tikzpicture}
}



% Title page
\defbeamertemplate*{title page}{adelphi}[1][] {
   \vskip.2\paperheight%
    \begin{beamercolorbox}[wd=\paperwidth,leftskip=.05\paperwidth,sep=8pt,#1]{title page header}
      \usebeamerfont{title}\inserttitle\par%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=\paperwidth,leftskip=.05\paperwidth,sep=8pt,#1]{subtitle}
      \usebeamerfont{subtitle}\insertsubtitle\par%
    \end{beamercolorbox}%
}


\defbeamertemplate*{block body}{adelphi} {
  \begin{tikzpicture}
  \useasboundingbox (0, 0) rectangle(\paperwidth,\paperheight);
  \fill[color=gold](0, 0) rectangle (\paperwidth, \paperheight);
  \end{tikzpicture}

}


\setbeamerfont{default}{family=\sffamily}
\mode
<all>

Thank you,

Kees

  • Welcome to TeX.Stackexchange! – user36296 Aug 21 '18 at 22:31
1
  • you can change the background colour of all frames with \setbeamercolor{background canvas}{bg=green}. However you won't see the result with your beamer theme, because you draw a rectangle filling the whole page above it with \fill[color=gold](0, 0) rectangle (\paperwidth, \paperheight);

  • to change the text colour: \setbeamercolor{normal text}{fg=red}

  • normally one would assume that to change the font family of normal text, one could use \setbeamerfont{normal text}{family=\rmfamily}, but a little trick is necessary to make this take affect:


\documentclass{beamer}

\setbeamercolor{background canvas}{bg=green}
\setbeamercolor{normal text}{fg=red}
\setbeamerfont{normal text}{family=\rmfamily}

\AtBeginDocument{\usebeamerfont*{normal text}}


\begin{document}

\begin{frame}
    abc
\end{frame} 

\end{document}

enter image description here

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.