0

I am new to LaTeX. I want to add a university logo below the first page (as shown in the photo below). Also, I want to change the color of box (I don't like the color red).

Any idea please.

Tex file:

\documentclass[9pt,]{beamer}
\usetheme{Warsaw}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{dsfont}
\usepackage{color}
\usepackage{pifont}
\usepackage{tikz}
\usepackage{colortbl}
\usepackage{fancybox} 
\setcounter{MaxMatrixCols}{50}
\usepackage{amsmath, amssymb, mathrsfs}
\setbeamertemplate{navigation symbols}{\insertframenumber~/~\inserttotalframenumber}
\usepackage{graphicx}
%\usecolortheme{beaver}
\definecolor{UBCblue}{rgb}{0.0, 0.5, 1.0}
\usecolortheme[named=UBCblue]{structure}
\setbeamercolor{block title}{use=structure,fg=white,bg=UBCblue!75!black}
\setbeamercolor{block body}{use=structure,fg=black,bg=white!20!white}
\title{Title}
\author{Name} 
 \institute{University}
\date{2020}
\begin{document}
\begin{frame}[plain, noframenumbering]
  \titlepage
\end{frame}
\begin{frame}
\begin{alertblock}{Theorem:}
ABCDEFGH
\end{alertblock}
\end{frame}
\end{document}

Result

enter image description here

Logo:

enter image description here

1
3

Adding the logo

You can add your university logo at any field of the title page. In your case you want it below the date so you can change the \date command as follows:

\date{2020\par \includegraphics[width=0.2\linewidth]{JOoML.png}}

or even better (thanks to @Rmano comment)

\date[2020]{2020\par \includegraphics[width=0.2\linewidth]{JOoML.png}} 

so you have the short date form 2020 if it is needed in the format elsewhere.

You can also add a small sized logo at each page of your presentation using

\logo{\includegraphics[width=0.5cm]{JOoML.png}} % optional

Changing the block color

You can change the color of any block by \setbeamercolor command then adding the name of the block and the color of your choice of the background and foreground. Here is an example you can use

\setbeamercolor{block title alerted}{bg=green!50,fg=black}
\setbeamercolor{block body alerted}{bg=yellow!50,fg=black}

The output would be

enter image description here

Here's your full code:

\documentclass[9pt,]{beamer}
\usetheme{Warsaw}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{dsfont}
\usepackage{color}
\usepackage{pifont}
\usepackage{tikz}
\usepackage{colortbl}
\usepackage{fancybox} 
\setcounter{MaxMatrixCols}{50}
\usepackage{amsmath, amssymb, mathrsfs}
\setbeamertemplate{navigation symbols}{\insertframenumber~/~\inserttotalframenumber}
\usepackage{graphicx}
%\usecolortheme{beaver}
\definecolor{UBCblue}{rgb}{0.0, 0.5, 1.0}
\usecolortheme[named=UBCblue]{structure}
\setbeamercolor{block title}{use=structure,fg=white,bg=UBCblue!75!black}
\setbeamercolor{block body}{use=structure,fg=black,bg=white!20!white}
\title{Title}
\author{Name}
\institute{University}
%
%
\date[2020]{2020\par \includegraphics[width=0.2\linewidth]{JOoML.png}} % <--- modified
\logo{\includegraphics[width=0.5cm]{JOoML.png}} % <--- added
%
\setbeamercolor{block title alerted}{bg=green!50,fg=black} % <--- added
\setbeamercolor{block body alerted}{bg=yellow!50,fg=black} % <--- added
%
\begin{document}
    \begin{frame}[plain, noframenumbering]
        \titlepage

    \end{frame}
    \begin{frame}
        \begin{alertblock}{Theorem:}
            ABCDEFGH
        \end{alertblock}
    \end{frame}
\end{document}
3
  • 1
    +1, but it is better to use \date[2020]{2020\par \includegraphics[width=0.2\linewidth]{JOoML.png}} --- so you have the short date form if it is needed in the format.
    – Rmano
    Jun 9 '20 at 15:31
  • @Rmano Very nice remark. In fact I would have even inserted the logo in the \institute command and let the date be last. Will the short field form still apply. e.g. \institute[University ]{University \par \includegraphics[width=0.2\linewidth} ?
    – hesham
    Jun 9 '20 at 15:38
  • 1
    yes, see page 95 in the manual.
    – Rmano
    Jun 9 '20 at 15:40

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.