5

I want to create a custom beamer template with the madrid theme as a basis. I wish to add my university logo in the top right corner inside the circle as shown in the figure.

enter image description here

Can anyone help me as to how do I proceed ? This is my code so far. Note: This MWE is the modified code without the image file. This modification is made based on the comments to get the MWE working.

\documentclass{beamer}
\usepackage{color}
\usepackage{graphicx}
\usepackage{bibentry}
\usetheme{Madrid}
\usepackage[utf8]{inputenc}
\usepackage{default}
\usepackage{pgfplots}
\usepackage{wasysym}
\pgfplotsset{/pgf/number format/use comma,compat=newest}
\usepackage{color}
\usepackage{mathtools}
\usepackage[export]{adjustbox}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{hyperref}
\usepackage{movie15}
\usepackage{subcaption}
\usepackage{tikz}
\usepackage{xcolor,soul}
\usetikzlibrary{shapes.arrows}
\usepackage{enumerate}
\usepackage{empheq}
\theoremstyle{definition}         
\definecolor{devryblue}{RGB}{5, 51, 92}    
\setbeamercolor{titlelike}{bg=devryblue,fg=white}      
\beamertemplatenavigationsymbolsempty
\date{\hspace{8cm} }
\AtBeginSection[]
{
\usebackgroundtemplate{}
\begin{frame}
\setbeamercolor{structure}{fg=devryblue}
\frametitle{Presentation Outline} 
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
\addtobeamertemplate{frametitle}{}{%
\begin{tikzpicture}[remember picture,overlay]
\filldraw[color=devryblue, fill=white, very thick](10.8,0.6) circle 
(0.7);
\end{tikzpicture}}
\begin{frame}
\centering
\vspace{1cm}
\begin{align*}
\text{Problem 1:\:} & \text{To write something using beamer}\\
& \text{and compile it without error}\end{align*}
\end{frame}
\section{Background}
\begin{frame}
\frametitle{Hello World}
\end{frame}
\end{document}

Thank you in advance.

3
  • 1
    unfortunately your MWE does not compile Commented Aug 27, 2018 at 17:22
  • 2
    You can include the logo in the path picture of the node instead of directly in the contents, and then clip it with the shape of the node (which can be any shape). But to give an example, you have to make your MWE working.
    – Max
    Commented Aug 27, 2018 at 18:28
  • If I understood you right you could just include a node at the current page.north east and use the draw,circle,inner sep=… options … Commented Aug 27, 2018 at 19:54

1 Answer 1

5
  • Probably not the most elegant code, but you could include the image like the following:

    \begin{tikzpicture}[remember picture,overlay]
    \coordinate (logo) at ([xshift=-1.5cm,yshift=-0.8cm]current page.north east);
    \fill[devryblue] (logo) circle (.9cm);
    \clip (logo) circle (.75cm);
    \node at (logo) {\includegraphics[width=2.1cm]{example-image}};
    \end{tikzpicture}
    
  • You don't need the packages

    \usepackage{color}
    \usepackage{graphicx}
    \usepackage{color}
    \usepackage{hyperref}
    \usepackage{xcolor}
    \usepackage{enumerate}
    

    with beamer, as beamer already provides these functionalities.

  • if you'd like to avoid the colour clash between the bright blue beamer used by default for many elements and your dark blue, you could use

    \colorlet{beamer@blendedblue}{devryblue}
    

    This will colour elements like bullets or enumerations in better matching shade of blue.

\documentclass{beamer}

\definecolor{devryblue}{RGB}{5, 51, 92}    
\makeatletter
\colorlet{beamer@blendedblue}{devryblue}
\makeatother

\usepackage[utf8]{inputenc}
\usepackage{tikz}

\usetheme{Madrid}  

\addtobeamertemplate{frametitle}{}{%
\begin{tikzpicture}[remember picture,overlay]
\coordinate (logo) at ([xshift=-1.5cm,yshift=-0.8cm]current page.north east);
\fill[devryblue] (logo) circle (.9cm);
\clip (logo) circle (.75cm);
\node at (logo) {\includegraphics[width=2.1cm]{example-image}};
\end{tikzpicture}}

\begin{document}

\section{title}

\begin{frame}
\frametitle{title}
\tableofcontents

\end{frame}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .