# How do I customize Beamer template?

I need to create a custom Beamer presentation theme for my company. I need to do the following:

• Include company logo in the header of each slide
• Include large company logo in the center of the titlepage background
• Modify the font colors

How do I do each of these tasks? I'd appreciate some details.

-

My solution will let you know how to perform the modifications you need by customize a template as example.

I think the first thing to do is to select one of the existent themes as starting point.

Let's suppose to have chosen the Copenhagen theme. This MWE:

\documentclass{beamer}

\usetheme{Copenhagen}
\title{The title}
\author{My name}
\date{\today}

\begin{document}

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

\begin{frame}{The title of the frame}
hello
\end{frame}
\end{document}


allows you to get:

As second step, let's now include a logo in each frame. You can apply the method reported in Positioning logo in the front page as well as slides (in general to position the logo in an arbitrary position you could follow the explanation of How can I position an image in an arbitrary position in beamer? ). I applied the first one and I used just a test image, thus the result is not very good, but the important thing is the idea behind. Now your MWE becomes:

\documentclass{beamer}

\usepackage{textpos} % package for the positioning

\usetheme{Copenhagen}
\title{The title}
\author{My name}
\date{\today}

% position the logo
\begin{textblock*}{100mm}(\textwidth,-1cm)
\includegraphics[height=1cm,width=1cm,keepaspectratio]{logopolito}
\end{textblock*}}

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

\begin{frame}{The title of the frame}
hello
\end{frame}
\end{document}


Let's now add to the title frame a big logo in background. Before doing next passages, I recommend you (not only for this one in particular, but also to change font color), to read carefully the whole code of the starting theme adopted: this will allow you to know how it is composed and what to modify.

To add a large logo in background I used the standard template background: since this will be applied to all frames, I made it transparent for all frames that are not the title page. Perhaps people more expert than me will say that this is not a good method, but I used it two or three times and I think it works pretty well.

The required code is:

\usepackage{tikz,calc}

\pgfdeclareimage[interpolate=true,width=\paperwidth,height=\paperheight]{logo}{logopolito}

\setbeamertemplate{background}{
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle (\the\paperwidth,\the\paperheight);
\pgftext[at=\pgfpoint{0}{0},left,base]{\pgfuseimage{logo}};
\ifnum\thepage>1\relax%
\useasboundingbox (0,0) rectangle (\the\paperwidth,\the\paperheight);
\fill[white, opacity=1](0,\the\paperheight)--(\the\paperwidth,\the\paperheight)--(\the\paperwidth,0)--(0,0)--(0,\the\paperheight);
\fi
\end{tikzpicture}
}


In few words, I declared the image with the size of the full frame ,then I put it inside the template background making a test on the current frame number: if it is not 1 (the title page), I make it invisible setting the opacity to 1.

After this step, the title page becomes:

which actually is very bad because I don't see anymore the author and the date. This is the reason why till now I did not care about colors: at this moment, seeing the partial result it is possible to take better choices; if instead I first decided colors and then put the image, maybe I would had to modify them again.

In this part is really important that you know how is built your starting theme. This one uses as innertheme rounded (that suggest you why the title is put in a rounded box) and as colortheme whale and orchid (you are interested in whale since orchid defines block colors). No definition are given for the fonttheme thus it uses default. Moreover, I noticed that the definition of the title page is not contained in rounded, so the default has been used (a note if you need to modify it).

I adopted several colors as examples: if I really would had to realize a theme it is not a good choice. Just remember that you can use each time a background color (bg) and a foreground color (fg) for the text.

The final example is:

\documentclass{beamer}

\usepackage{textpos} % package for the positioning
\usepackage{tikz,calc}

\usetheme{Copenhagen}
\title{The title}
\author{My name}
\date{\today}

% position the logo
\begin{textblock*}{100mm}(\textwidth,-1cm)
\includegraphics[height=1cm,width=1cm,keepaspectratio]{logopolito}
\end{textblock*}}

\pgfdeclareimage[interpolate=true,width=\paperwidth,height=\paperheight]{logo}{logopolito}

\setbeamertemplate{background}{
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle (\the\paperwidth,\the\paperheight);
\pgftext[at=\pgfpoint{0}{0},left,base]{\pgfuseimage{logo}};
\ifnum\thepage>1\relax%
\useasboundingbox (0,0) rectangle (\the\paperwidth,\the\paperheight);
\fill[white, opacity=1](0,\the\paperheight)--(\the\paperwidth,\the\paperheight)--(\the\paperwidth,0)--(0,0)--(0,\the\paperheight);
\fi
\end{tikzpicture}
}

% Color modification
\setbeamercolor{structure}{fg=red!70!black}% to modify  immediately all palettes
\setbeamercolor{title}{fg=yellow}
\setbeamercolor{author}{bg=blue!10,fg=blue}
\setbeamercolor{date}{bg=yellow!10,fg=red!70!black}

\beamertemplatenavigationsymbolsempty % to get rid of nav symbols

\begin{document}
\begin{frame}[plain] % to remove the footline in the title page
\titlepage
\end{frame}

\begin{frame}{The title of the frame}
hello
\end{frame}
\end{document}


which gives you:

Any time consider that the beamer documentation is there to help you.

-
That was very thorough! Thanks –  Mustafa May 8 '12 at 22:09

Are you free to define your own layout, or must you follow a corporate design template?

I had to create a presentation in my companies corporate design and the specification was: Use this Powerpoint template..

The easiest solution was to take the Powerpoint-Presentation, save an empty page as pdf and include it as a background picture in my beamer-template. After that, I did some positioning to define free areas and write title, name, department, date...

Then I had to include the correct font and I had a LaTeX-Corporate-Design template for my presentations.

If this could be a solution for you, please leave a comment and I will look for my beamer definitions and post it here.

Addendum: The background can be changed with:

\usebackgroundtemplate{
\includegraphics[width=\paperwidth,height=\paperheight]{my_pdf_copy_of_empty_ppt_template}
}

-
Thank you. Yes, i'm free to put my own layout. Basically all I need is a watermarked logo in the background, and the colored logo in the corner. Whatever else is easy, I think. But I'm pretty beginner with 'beamer' and I don't know how to do this. Would you please guide me how to do what mentioned (which files to edit, where to include the pics ...etc.)? –  Mustafa May 8 '12 at 12:54
I think Claudios answer contains already most of the relevant hints. I modified my answer and added an example to modify the background. –  knut May 9 '12 at 18:01