Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am writing a custom beamer theme. In one of my theme .sty files I am using:

\setbeamertemplate{background}{
  \begin{tikzpicture}
    \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
    \fill[color=greenCiti] (0,0) rectangle(\the\paperwidth,0.75);
    \node at (0.7,9.2) {\includegraphics{logo-citi-small.png}};
    \node at (1.0,0.375) {\includegraphics[width=1.5cm]{logo-univ.png}};
    \node at (3.5,0.375) {\includegraphics[width=3.2cm]{logo-ra.png}};
    \node at (11.6,0.36) {\includegraphics[width=2.5cm]{logo-insa.png}};
  \end{tikzpicture}
} 

Now I need to extend this property, in order to add a fourth image in the top right corner of my slides but only for one document using the theme and thus not in the theme file itself.

I.e I want to add a fourth line such as:

\node at (6.6,5.2) {\includegraphics[width=2cm]{fig/logo-bull.png}};

How should I achieve this?

share|improve this question

1 Answer 1

You can use \setbeamertemplate{background}...} in the document itself. Here I have used a background picture.

\setbeamertemplate{background}{%
    \tikz[remember picture]\node[inner sep=0pt,outer sep=0pt,opacity=0.4] at (current page.center) {\includegraphics[width=\paperwidth,height=\paperheight]{background1}};
}

Replace the contents of setbeamertemplate above with relevant code for the background and replace the theme in the below code with yours.

Full code:

\documentclass[compress]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usetheme{Madrid}
\usepackage{tikz}

\title{There Is No Largest Prime Number}
\date[ISPN ’80]{27th International Symposium of Prime Numbers}
\author[Euclid]{Euclid of Alexandria \texttt{euclid@alexandria.edu}}

\setbeamertemplate{background}{%
    \tikz[remember picture]\node[inner sep=0pt,outer sep=0pt,opacity=0.4] at (current page.center) {\includegraphics[width=\paperwidth,height=\paperheight]{background1}};
}

\begin{document}
\begin{frame}
\titlepage
\end{frame}
\section{First section}
\subsection{1}

\begin{frame}
\frametitle{There Is No Largest Prime Number}
\framesubtitle{The proof uses \textit{reductio ad absurdum}.}
\begin{theorem}
There is no largest prime number. \end{theorem}
\end{frame}

\end{document}

enter image description here

share|improve this answer
    
Thanks for you answer, but what I need is a way to add a picture on top of the existing background and not to replace it –  Manuel Selva Mar 21 at 8:22
    
@ManuelSelva This did not replace any thing. If you show your code for \setbeamertemplate{background}{, it will be easy for answering specifically. Can you please add it to the question? –  Harish Kumar Mar 21 at 22:36
    
Sorry for vague question, I updated it –  Manuel Selva Mar 22 at 16:44
    
did you saw my question's update ? –  Manuel Selva Mar 24 at 10:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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