2

I am making a presentation and I'd like to add a logo on the bottom right side of all frames except the titlepage. First, I set four beamercolorboxes , the last one for the logo. it was not aligned well. Then, added the logo into the third beamercolorbox. It seems to be aligned, however, it has made the date and page number seem blurred plus the color of the image itself has been changed from white to the color of the beamercolorbox. I want to the image rather to come to the front.

MWE

\documentclass[11pt]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[export]{adjustbox}
\usepackage{tikz}
\usetikzlibrary{positioning}
\setbeamertemplate{headline}{}
\setbeamercovered{transparent}
\usetheme{Madrid}
\useoutertheme{miniframes} 
\useinnertheme{circles}
\setbeamercolor{subsection in head/foot}{bg=black,fg=white}

\def\logo{%
    \includegraphics[fbox, ,width=1cm, height=3ex,raise=-0.6ex]{polyLogo.pdf}%
}

\setbeamerfont{footline}{size=\fontsize{6}{6}\selectfont}
\setbeamercolor{section in foot}{bg=gray,fg=white}
\setbeamercolor{subsection in foot}{bg=black,fg=white}


\setbeamertemplate{footline}
{
    \hbox{%
        \begin{beamercolorbox}[wd=.35\paperwidth,ht=2.6ex,dp=1ex,center]{section in foot}%
            \usebeamerfont{section in foot}\insertshortauthor
        \end{beamercolorbox}%
    % here I replace \insertsubtitle with \insertshorttitle
        \begin{beamercolorbox}[wd=.30\paperwidth,ht=2.6ex,dp=1ex,center]{subsection in foot}%
            \usebeamerfont{section in foot}\insertshorttitle
        \end{beamercolorbox}%
        \pgfsetfillopacity{0.5}\begin{beamercolorbox}[wd=.35\paperwidth,ht=2.6ex,dp=1ex,center]{subsection in foot}%
            \usebeamerfont{section in foot} \text{\today} \hspace{0.1 in} \insertframenumber/\inserttotalframenumber\hfill\setlength\fboxrule{0pt}\logo\hfill
        \end{beamercolorbox}%
    }%
    
    \vskip0pt%
}

\usepackage{xcolor}
\usepackage{booktabs}
\setbeamercolor{framesource}{fg=gray}
\setbeamerfont{framesource}{size=\tiny}
\newcommand{\source}[1]{\begin{textblock*}{4cm}(8.7cm,8.6cm)
        \begin{beamercolorbox}[ht=0.5cm,right]{framesource}
            \usebeamerfont{framesource}\usebeamercolor[fg]{framesource} Source: {#1}
        \end{beamercolorbox}
\end{textblock*}}
\title[VeryCoolVeryCool]{\small\textbf{\documenttitle}}
\subtitle{\small DVeryCoolVeryCoolVeryCool}
\author[VeryCoolVeryCoolVeryCool] {VeryCoolVeryCool}
\institute[]
{} 
\date[Winter 2021] % (optional)
{VeryCoolVeryCoolVeryCoolVeryCoolVeryCool \vspace{0.1 in}}
\newcommand{\documenttitle}{VeryCoolVeryCoolVeryCoolVeryCoolVeryCoolVeryCoolVeryCoolVeryCool}


\begin{document}
    \begin{frame}[plain]
        \titlepage
    \end{frame}
\section{Outline}
\begin{frame}
    \frametitle[allowframebreaks]{Outline}
    \tableofcontents
\end{frame}
\section[intro]{A Cool Theory}
\begin{frame}{Rules}
    \frametitle{Brief History }
        These are the principal rules:
\end{frame}
\end{document}

EDIT: cannot upload the image polyLogo.pdf , thus, uploaded the .PNG version of it. Thus, it just needs to be replaced by polyLogo.PNG.

enter image description here

Any workaround would be appreciated.

2
  • I can neither reproduce a blurred date/page number nor a color change in an image (I had to replace polyLogo.pdf with example-image in order to get a compilable example code.) Could it be possible that your logo has a transparent background?
    – leandriis
    Jan 15, 2021 at 18:23
  • @leandriis the polyLog.pdf does not have a transparent background; it has a white background with black texts on it, which has changed to gray. I will add the image now.
    – BMB
    Jan 16, 2021 at 3:25

2 Answers 2

1
  • The background colour changes to the one of the footline because your logo has a transparent background. If you want to keep the white background, you can place the logo into a \colorbox

  • The colors of the logo changed because your were using a different \pgfsetfillopacity{0.5} for the last box. This has all kinds of problems and on some viewers it might lead to the blurry text you describe. Instead of changing the opacity, change the colours to the grays you want

  • you distort the image by setting both the width and height. You should only set one of them or if you really must set both, use the keepaspectratio option


\documentclass[11pt]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[export]{adjustbox}
\usepackage{tikz}
\usetikzlibrary{positioning}
\setbeamertemplate{headline}{}
\setbeamercovered{transparent}
\usetheme{Madrid}
\useoutertheme{miniframes} 
\useinnertheme{circles}
\setbeamercolor{subsection in head/foot}{bg=black,fg=white}

\def\logo{%
    \includegraphics[fbox, ,width=1cm, height=3ex,raise=-0.6ex,keepaspectratio]{polyLogo}%
}

\setbeamerfont{footline}{size=\fontsize{6}{6}\selectfont}
\setbeamercolor{section in foot}{bg=gray,fg=white}
\setbeamercolor{subsection in foot}{bg=black,fg=white}

\setbeamercolor{date in foot}{bg=gray,fg=lightgray}

\setbeamertemplate{footline}
{
    \hbox{%
        \begin{beamercolorbox}[wd=.35\paperwidth,ht=2.6ex,dp=1ex,center]{section in foot}%
            \usebeamerfont{section in foot}\insertshortauthor
        \end{beamercolorbox}%
    % here I replace \insertsubtitle with \insertshorttitle
        \begin{beamercolorbox}[wd=.30\paperwidth,ht=2.6ex,dp=1ex,center]{subsection in foot}%
            \usebeamerfont{section in foot}\insertshorttitle
        \end{beamercolorbox}%
%        \pgfsetfillopacity{0.5}
        \begin{beamercolorbox}[wd=.35\paperwidth,ht=2.6ex,dp=1ex,center]{date in foot}%
            \usebeamerfont{section in foot} \text{\today} \hspace{0.1 in} \insertframenumber/\inserttotalframenumber\hfill\setlength\fboxrule{0pt}\colorbox{white}{\logo}\hfill
        \end{beamercolorbox}%
    }%
    
    \vskip0pt%
}

\usepackage{xcolor}
\usepackage{booktabs}
\setbeamercolor{framesource}{fg=gray}
\setbeamerfont{framesource}{size=\tiny}
\newcommand{\source}[1]{\begin{textblock*}{4cm}(8.7cm,8.6cm)
        \begin{beamercolorbox}[ht=0.5cm,right]{framesource}
            \usebeamerfont{framesource}\usebeamercolor[fg]{framesource} Source: {#1}
        \end{beamercolorbox}
\end{textblock*}}
\title[VeryCoolVeryCool]{\small\textbf{\documenttitle}}
\subtitle{\small DVeryCoolVeryCoolVeryCool}
\author[VeryCoolVeryCoolVeryCool] {VeryCoolVeryCool}
\institute[]
{} 
\date[Winter 2021] % (optional)
{VeryCoolVeryCoolVeryCoolVeryCoolVeryCool \vspace{0.1 in}}
\newcommand{\documenttitle}{VeryCoolVeryCoolVeryCoolVeryCoolVeryCoolVeryCoolVeryCoolVeryCool}


\begin{document}
    \begin{frame}[plain]
        \titlepage
    \end{frame}
\section{Outline}
\begin{frame}
    \frametitle[allowframebreaks]{Outline}
    \tableofcontents
\end{frame}
\section[intro]{A Cool Theory}
\begin{frame}{Rules}
    \frametitle{Brief History }
        These are the principal rules:
\end{frame}
\end{document}

enter image description here

-3

Well, still don't know why polyLogo.pdf was blurred in beamercolorbox, but replacing it by its .PNG version, the issue was resolved eventually.

You must log in to answer this question.

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