6

I am facing a problem with logo placement in beamer. I want to put it in from of top frame, however, it doesnt move properly. How can I solve the problem?

I use \logo{\vspace*{9cm}\includegraphics[scale=0.02]{logo.jpg}} to position the logo on top right. When I increase the vspace value, the logo doesnt move up. How can I fix this problem? obviuosly I need the logo on top of the frame to be visible.

MWE: beamerthemesimple.sty

% Copyright 2015 by Facundo Muñoz
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%


\ProvidesPackage{beamerthemesimple}

%\def\beamer@simplecolor{gris}
%\DeclareOptionBeamer{color}{\beamer@simplecolor=#1}
%\ExecuteOptionsBeamer{gris}
%\ProcessOptionsBeamer

\usepackage{tikz}
\usetikzlibrary{arrows,shapes,trees,positioning,fadings}

\input xkeyval

\newcommand<>{\includeoverlaygraphics}[2][]
{
  \begin{tikzpicture}
    \alt#3{\node[opacity=1] {\includegraphics[#1]{#2}};}
          {\node[opacity=.15] {\includegraphics[#1]{#2}};}
  \end{tikzpicture}
}

% These define macros \KV@setwatermark@hoffset that take one argument
% which is processed by the last piece of codes into braces
\def\@hos{}
\def\@vos{}
\def\@alpha{} % This one does not work. Why?
\define@key{setwatermark}{hoffset}[\def\@hos{.}]{\def\@hos{\hspace*{#1}}} 
\define@key{setwatermark}{voffset}[\def\@vos{.}]{\def\@vos{\vspace*{#1}}} 
\define@key{setwatermark}{alpha}[\def\@alpha{0.7}]{\def\@alpha{#1}} 

\def\setwatermark{\@ifnextchar[\@setwatermark{\@setwatermark[]}}
\def\@setwatermark[#1]#2{%
  \setkeys{setwatermark}{#1}%
  \def\@watermark{#2}
}
% \newcommand{\setwatermark}[1]{\def\@watermark{#1}}
\setwatermark{}   % Empty initialization


\mode<presentation>

  % http://www.colorcombos.com/color-scheme-275.html
  \definecolor{destacado}{HTML}{515151} % gris oscuro
  \definecolor{normal}{HTML}{797979}  % gris medio
  \definecolor{fondo}{HTML}{e6e6e6}  % gris claro

  \setbeamercolor{normal text}{bg=white,fg=normal}
  \setbeamercolor*{block title}{bg=fondo,fg=destacado}
  \setbeamercolor*{block body}{bg=fondo,fg=normal}
  \setbeamercolor{alerted text}{fg=black}

  \usetheme{default}
%  \usecolortheme[named=gris]{structure}
  \usecolortheme[named=destacado]{structure}
  \usefonttheme{structurebold}

  % overlays semitransparentes
  \setbeamercovered{transparent}

  % incluir el contador de diapos
  \setbeamertemplate{footline}[frame number]

  % eliminar íconos de nav.
  \setbeamertemplate{navigation symbols}{}

  % bloques
  \setbeamertemplate{blocks}[rounded][shadow=true]

  % especificación global para listas
  %\beamerdefaultoverlayspecification{<+-| alert@+>}

  % márgenes
  \setbeamersize{text margin left=0.4cm,text margin right=0.4cm}

  \setbeamertemplate{background}{
  \parbox[c][\paperheight]{\paperwidth}{%
    \vfill \hfill 
    \begin{tikzpicture}
      %\node[opacity=\@alpha]  % not working. why?
      \node[opacity=.07]
      {
        \@watermark
      };
    \end{tikzpicture}
    \@hos

    \@vos
  }
} 

\mode
<all>

demo.tex

\documentclass{beamer}

\usetheme{simple}
\useoutertheme{smoothbars}

\usepackage{lmodern}
\usepackage[scale=2]{ccicons}

\title{A simple beamer theme}
\subtitle{}
\date{\today}
\author{Facundo Mu\~noz}
\institute{\url{http://github.com/famuvie}}

\logo{\vspace*{9cm}\includegraphics[scale=0.1]{img/Heckert_GNU_white.png}}

\begin{document}

\begin{frame}[plain]
\titlepage 
\end{frame}

\section{test}
\subsection{test2}
\begin{frame}{simple}
  \framesubtitle{A beamer theme}

  \texttt{simple} is a minimalist Beamer theme that features

  \begin{columns}
    \column{.5\textwidth}
      \begin{itemize}
        \item a \alert{watermark} logo in the background
        \item slide \alert{numbers}
        \item \emph{emph}asized and \alert{alert}ed text
      \end{itemize}

    \column{.5\textwidth}
      \begin{block}{And of course...}
         blocks, columns, and all Beamer power
      \end{block}
  \end{columns}

\end{frame}

\section{section 2}
\begin{frame}
\end{frame}

\section{section 3}
\begin{frame}
\end{frame}

\section{.}
\begin{frame}
\end{frame}

\end{document}

enter image description here

Sadegh
  • 2,190
  • alternatively, I tried this answer, the problem is the logo also appears in title page – Sadegh Feb 23 '17 at 08:54
  • The logo won't move up because the space is already occupied by the headline. But you could add it to the headline. – samcarter_is_at_topanswers.xyz Feb 23 '17 at 08:55
  • It's really nice of you to offer this bounty! But for the future, this is really not necessary -- getting feedback if the answer helped you is already much more then I am used to get. And you definitely should try to keep more then 50 rep for you self, as this allows you to comment on all the questions and answers on this site. – samcarter_is_at_topanswers.xyz Feb 28 '17 at 17:03
  • This is my way of saying big thank you! you helped me in critical moment just few hours before my thesis presentation! cheers – Sadegh Mar 01 '17 at 08:29

1 Answers1

9

The logo won't move up because the space is already occupied by the headline. But you could add it to the headline.

\documentclass{beamer}

%\usetheme{simple}
\useoutertheme{smoothbars}

\usepackage{lmodern}
\usepackage[scale=2]{ccicons}

\title{A simple beamer theme}
\subtitle{}
\date{\today}
\author{Facundo Mu\~noz}
\institute{\url{http://github.com/famuvie}}

\makeatletter
\setbeamertemplate{headline}{%
  \pgfuseshading{beamer@barshade}%
  \ifbeamer@sb@subsection%
    \vskip-9.75ex%
  \else%
    \vskip-7ex%
  \fi%
  \begin{beamercolorbox}[ignorebg,ht=2.25ex,dp=3.75ex,wd=.9\paperwidth]{section in head/foot}
    \insertnavigation{.9\paperwidth}\raisebox{-7ex}{\includegraphics[height=\headheight]{example-image}}
  \end{beamercolorbox}
  \ifbeamer@sb@subsection%
    \begin{beamercolorbox}[ignorebg,ht=2.125ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil,wd=.9\paperwidth]{subsection in head/foot}
      \usebeamerfont{subsection in head/foot}\insertsubsectionhead
    \end{beamercolorbox}%
  \fi%
}%
\makeatother

\begin{document}

\begin{frame}[plain]
\titlepage 
\end{frame}

\section{test}
\subsection{test2}
\begin{frame}{simple}
  \framesubtitle{A beamer theme}

  \texttt{simple} is a minimalist Beamer theme that features

  \begin{columns}
    \column{.5\textwidth}
      \begin{itemize}
        \item a \alert{watermark} logo in the background
        \item slide \alert{numbers}
        \item \emph{emph}asized and \alert{alert}ed text
      \end{itemize}

    \column{.5\textwidth}
      \begin{block}{And of course...}
         blocks, columns, and all Beamer power
      \end{block}
  \end{columns}

\end{frame}

\section{section 2}
\begin{frame}
\end{frame}

\section{section 3}
\begin{frame}
\end{frame}

\section{.}
\begin{frame}
\end{frame}

\end{document}

enter image description here

  • @Woeitg If you'd like to award a bounty to @samcarter you need to press the +50 under the up/down vote buttons, and not only accept his answer. – MarcinKonowalczyk Feb 28 '17 at 17:50