2

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.

  • 1
    unfortunately your MWE does not compile – user36296 Aug 27 '18 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 Aug 27 '18 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 … – current_user Aug 27 '18 at 19:54
2
  • Probably not the most elegant code, but you could include the image like the following:

    \fill[devryblue] (10.8,0.6) circle (.9cm);
    \clip (10.8,0.6) circle (.75cm);
    \node at (10.8,0.6) {\includegraphics[width=2.1cm]{example-image}};
    
  • 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}
\usepackage{default}  

\addtobeamertemplate{frametitle}{}{%
\begin{tikzpicture}[remember picture,overlay]
\fill[devryblue] (10.8,0.6) circle (.9cm);
\clip (10.8,0.6) circle (.75cm);
\node at (10.8,0.6) {\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

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.