# LaTex Beamer: Frame title over two lines moves logo

I am just starting to do my presentations with LaTex beamer, so I am not so familiar with all the concepts. Right now I have the problem, that the logo changes its position, when the frametitle is so long, that it has to split into two lines. I insert the logo with:

\addtobeamertemplate{frametitle}{}{%
\begin{textblock*}{100mm}(.81\textwidth,7.2cm)
\includegraphics[width=2cm]{logo.png}
\end{textblock*}}


I want it to stay where it is indepenedet of the length of the framtitle. Can somebody explain me the problem? Thank you! Here is a minimal example without titlepage etc.

\documentclass[10pt]{beamer}
\usepackage[utf8x]{inputenc}
\usepackage{textpos}
\usepackage{graphicx, caption, subcaption, tabularx, tikz, textpos}
\usepackage{appendixnumberbeamer}

\usetheme{Hannover}
\usecolortheme{rose}
\useoutertheme{infolines}

\useinnertheme{circles}
\logo{\includegraphics[width = 3.5cm]{logo.png}}

\begin{document}

\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%

\end{beamercolorbox}}%
\vskip0pt%
}

\begin{textblock*}{100mm}(.81\textwidth,7.2cm)
\includegraphics[width=2cm]{logo.png}
\end{textblock*}}
\begin{frame}
\frametitle{LIBS and Raman spectroscopy}
\end{frame}

\begin{frame}
\frametitle{LIBS and Raman spectroscopy for Solar System exploration}
\end{frame}

\end{document}


Quick hack: Instead of abusing the frametitle to add your logo, abuse the navigation symbols

Also please don't load packages multiple times and you don't need graphicx with beamer.

\documentclass[10pt]{beamer}
\usepackage[utf8x]{inputenc}
%\usepackage{textpos}
%\usepackage{graphicx}
\usepackage{caption, subcaption, tabularx, tikz, textpos}
\usepackage{appendixnumberbeamer}

\usetheme{Hannover}
\usecolortheme{rose}
\useoutertheme{infolines}

\useinnertheme{circles}
\logo{\includegraphics[width = 3.5cm]{logo.png}}

\setbeamertemplate{footline}{
\leavevmode%
\hbox{%
\end{beamercolorbox}}%
\vskip0pt%
}

\begin{document}

\begin{frame}
\frametitle{LIBS and Raman spectroscopy}
\end{frame}

\begin{frame}
\frametitle{LIBS and Raman spectroscopy for Solar System exploration}
\end{frame}

\end{document}

• Can you explain what you corrected? :) – AndréC Aug 20 '18 at 9:19
• @AndréC I corrected nothing, just replaced one hack with another :) – user36296 Aug 20 '18 at 9:22
• I misspoke, I'm sorry. The question code written by @Tini doesn't work, yours works, what did you do to make it work? – AndréC Aug 20 '18 at 9:27
• @AndréC Other than missing images, the code in the OP works for me. What errors do you get? – user36296 Aug 20 '18 at 9:32
• I can no longer see the image on the second slide of the slide show. – AndréC Aug 20 '18 at 9:33