This is the code for beamer's sidebar:
\documentclass{beamer}
\usepackage{tikz,graphicx}
\title{Title}
\author{My name}
\institute{My institute}
\useoutertheme[right,height=0pt,width=0.12\paperwidth]{sidebar}
\setbeamertemplate{sidebar canvas right}[horizontal shading] [left=blue!10!white,right=white]
\makeatletter
\addtobeamertemplate{sidebar right}{}{%
\begin{tikzpicture}[remember picture,overlay] %
\node[anchor=north east,xshift=0.8pt,yshift=2pt] at (current page.north east) {\includegraphics[width=0.11\paperwidth]{logo.png}};
\end{tikzpicture}
}
\makeatother
\begin{document}
\begin{frame}[plain]
\titlepage
\end{frame}
\begin{frame}
Frame content
\end{frame}
\end{document}
I want the logo image file(logo.png) to be transparent at the top of the sidebar and not cover the texts, what should I do?
Best Answer
The
jpg
format has no idea of what transparency is. If you create apng
image with a proper alpha (transparent) layer, it should simply work.I have
(using
\usepackage[absolute,overlay]{textpos}
) and it works nicely:(and the image is a
.png
with the parts external to the circle marked as transparent).update
With the new MWE, and your logo, the result is satisfactory:
If you want that also the orange part (which is not transparent in the
.png
) you canedit the PNG image so that it is partially transparent, or
add
opacity
like this:to obtain:
and/or move the logo down (for example with
yshift=-0.11\paperwidth
: