Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a beamer presentation and use the PaloAlto theme. As you can see in the code sample I have two logos over each other. I'd like to place one on the left hand and the other on the right side. Would please help?

\logo{\includegraphics[height=0.8cm]{images/city_magazine_custom_logo}\hspace{-60pt}
  \includegraphics[height=0.8cm]{images/ses50}\hspace{-10pt}
  }
share|improve this question
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  egreg Jan 14 '13 at 21:54

4 Answers 4

up vote 5 down vote accepted

Here's one possibility redefining the headline template used by the PaloAlto theme; I defined a command \logoii to be used for the second logo in a fashion completely analogous to the standard \logo command (I used the same image for both logos in my example, but, of course, you can use whatever images you want instead):

\documentclass{beamer}
\usetheme{PaloAlto}

\makeatletter
\newcommand\insertlogoii{}
\newcommand\logoii[1]{\renewcommand\insertlogoii{#1}}
\setbeamertemplate{headline}
  {%
    \begin{beamercolorbox}[wd=\paperwidth]{frametitle}
      \ifx\beamer@sidebarside\beamer@lefttext%
      \else%
        \hfill%
      \fi%
      \ifdim\beamer@sidebarwidth>0pt%  
        \usebeamercolor[bg]{logo}%
        \vrule width\beamer@sidebarwidth height \beamer@headheight%
        \hskip-\beamer@sidebarwidth%
        \hbox to \beamer@sidebarwidth{\hss\vbox to
          \beamer@headheight{\vss\hbox{\color{fg}\insertlogo}\vss}\hss}%
        \hfill%
        \vrule width\beamer@sidebarwidth height \beamer@headheight%
        \hskip-\beamer@sidebarwidth%
        \hbox to \beamer@sidebarwidth{\hss\vbox to
          \beamer@headheight{\vss\hbox{\color{fg}\insertlogoii}\vss}\hss}%
      \else%
        \vrule width0pt height \beamer@headheight%  
      \fi%
    \end{beamercolorbox}
}
\makeatother

\title{The Title}
\subtitle{CTAN lion drawing by Duane Bibby}
\author{The Author}
\logo{\includegraphics[height=0.8cm]{ctanlion}}
\logoii{\includegraphics[height=0.8cm]{ctanlion}}

\begin{document}

\begin{frame}
\maketitle
\end{frame}

\end{document}

enter image description here

share|improve this answer
    
thanks a lot Gonzalo. Muchas gracias. I put as answer but I don't have enough point to vote up. –  user1098135 Jan 15 '13 at 7:18
    
@user1098135 ¡De nada! I'm glad I could help! Thanks for accepting the answer. –  Gonzalo Medina Jan 15 '13 at 20:06

Motivated by Positioning logo in the front page as well as slides I decided to post an answer using tikz package. If one decide to use tikz package, he can add different logos, to different part of a slide. The code is practically the same as Gonzalo Medina's work, but I added a few lines.

\documentclass{beamer}
\usetheme{Berkeley}
\usepackage{tikz}



\title{The Title}
\author{The Author}
\institute{The Institute}

\begin{document}

{
\setbeamertemplate{logo}{}
\begin{frame}
\maketitle
\end{frame}
}

\addtobeamertemplate{frametitle}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,yshift=-4pt] at (current page.north west) {\includegraphics[height=0.9cm]{example-image-a}};
\end{tikzpicture}}

\addtobeamertemplate{frametitle}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north east,yshift=-4pt] at (current page.north east) {\includegraphics[height=0.9cm]{example-image-b}};
\end{tikzpicture}}

\begin{frame}{Motivation}
Now the logo is visible
\end{frame}

\begin{frame}{Motivation}
\framesubtitle{A}
Now the logo is visible
\end{frame}

\end{document}
share|improve this answer

This answer was moved from a duplicate using the Berkeley theme. The code is practically the same as Gonzalo Medina's (since both themes use the sidebar outer theme), but maybe it adds some value for the interested reader (no background color on the right and width/height of the logos)

This might work:

I will add a longer explanation how I came to this solution (and I am by far a Beamer expert), so other can see how to approach problems like this.

First you see that the used theme is "Berkeley", so going into the definition file beamerthemeBerkeley.sty (just google it and you'll find the code).

There we can see that the outer theme (the one responsible for the sidebar and title and all) is "sidebar", so next we take a look at beamerouterthemesidebar.sty and search for the keyword logo and see that it is used in the headline definition.

What I did then is edit the definition to add another logo (logoright) the the right side (by copy and paste with an \hfill inbetween) and define some commands to set the logo. Just adjust the size of the images to your liking.

If you want to adjust the height or width (or both) of the images to the header/sidebar you can set the logos by:

\makeatletter
\logo{\includegraphics[width=\beamer@sidebarwidth,height=\beamer@headheight]{example-image-a}}
\logoright{\includegraphics[width=\beamer@sidebarwidth,height=\beamer@headheight]{example-image-b}}
\makeatother

enter image description here

\documentclass{beamer}
\usetheme{Berkeley}

\def\insertlogoright{\usebeamertemplate*{logoright}}
\def\logoright{\setbeamertemplate{logoright}}

\makeatletter
  \defbeamertemplate*{headline}{mycustom theme}
  {%
    \begin{beamercolorbox}[wd=\paperwidth]{frametitle}
      \ifx\beamer@sidebarside\beamer@lefttext%
      \else%
        \hfill%
      \fi%
      \ifdim\beamer@sidebarwidth>0pt%  
        \usebeamercolor[bg]{logo}%
        \vrule width\beamer@sidebarwidth height \beamer@headheight%
        \hskip-\beamer@sidebarwidth%
        \hbox to \beamer@sidebarwidth{%
        \hss%
        \vbox to \beamer@headheight{%
        \vss\hbox{\color{fg}\insertlogo}\vss%
        }%
        \hss}%
        \hfill%
        \hbox to \beamer@sidebarwidth{%
        \hss%
        \vbox to \beamer@headheight{%
        \vss\hbox{\color{fg}\insertlogoright}\vss%
        }%
        \hss}%
      \else%
        \vrule width0pt height \beamer@headheight%  
      \fi%
    \end{beamercolorbox}
  }
\makeatother

\logo{\includegraphics[width=1.2cm,keepaspectratio]{example-image-a}}
\logoright{\includegraphics[width=1.2cm,keepaspectratio]{example-image-b}}


\title{The Title}
\author{The Author}
\institute{The Institute}

\begin{document}

{
 \setbeamertemplate{logo}{}
 \setbeamertemplate{logoright}{}
 \begin{frame}
  \maketitle
 \end{frame}
}

\begin{frame}{this}
 test
\end{frame}

\end{document}
share|improve this answer

Its a dirty hack but one could try something like this

\logo{%
  \makebox[1.85\paperwidth]{%
        \hfill%
        \hspace{3em}
        \includegraphics[width=1cm,keepaspectratio]{example-image-a}%
        \hfill%
        \includegraphics[width=1cm,keepaspectratio]{example-image-b}%
  }%
}

The idea: the logo is centered in the top left corner. If you make the box big enough (around 2 times the page width) it will extend to the top right corner. Then place the logo in the center and right end of the box.

enter image description here

share|improve this answer
    
If I use different width for two logos, they won't align in a horizontal line and one of them goes lower. –  user263485 Dec 4 at 11:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.