2

I would like to extend to the left the space dedicated to the slide title in beamer since it seems that in my case (Hannover theme) all the space available is not used. As an example, the title of the second slide should fit in one line.

Here is my MWE :

\documentclass[table]{beamer}

\usetheme{Hannover}
\makeatletter
\setbeamertemplate{sidebar}{\includegraphics[height=\paperheight]{mysidebar-title}} 
\setbeamertemplate{sidebar left}{\includegraphics[height=\paperheight]{mysidebar-generic}} 
\makeatother
\setbeamercolor{frametitle}{bg=white}

\title[Title]{Title of the presentation (which may run over more than one line)}
\date[]{Very soon,\\ somewhere}
\author[]{Me and my colleagues}%
\institute{\centering Nice Lab logo }

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

\begin{frame}
\frametitle{Short slide title}
First slide
\end{frame}
\begin{frame}
\frametitle{Very very very very loooooong slide title}
Second slide
\end{frame}
\begin{frame}
\frametitle{Very very veryyyyyyyyyyyyyyyyyyyyyyyy   looooooooooooooooooooooong title}
Last slide
\end{frame}

\end{document}

enter image description here

I edited my original post, including @samcarter solution in order to show the 2 problems I am facing now : 1) the frame title background overlay the top of the sidebar 2) I would like to get 2 sidebars: - one for the title slide (mysidebar-title) - one for the other slides (mysidebar-generic) which are wider than the default Hannover sidebar (them come from a corporate template) In my MWE, I simulated them with (mysidebar-title)

\documentclass[border = 0.0cm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[fill=cyan] (0,0) rectangle (7,21.0);
\end{tikzpicture}
\end{document} 

and (mysidebar-generic)

\documentclass[border = 0.0cm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[fill=cyan!50!white] (0,0) rectangle (7,21.0);
\end{tikzpicture}
\end{document}
2

Interestingly this problem only occurs if the background colour of the frametitle is not set. As soon it is set (e.g. to white), the frametitle fills the available space.

\documentclass{beamer}

\usetheme{Hannover}

\setbeamercolor{frametitle}{bg=white}


\begin{document}

\begin{frame}
\frametitle{Short slide title}
First slide
\end{frame}
\begin{frame}
\frametitle{Very very very very loooooong slide title}
Second slide
\end{frame}
\begin{frame}
\frametitle{Very very veryyyyyyyyyyyyyyyyyyyyyyyy   looooooooooooooooooooooong title}
Last slide
\end{frame}

\end{document}

enter image description here

| improve this answer | |
  • Thank you, it is strange but it works. but now I got another problem, since for my real presentation I am using a picture as a sidebar which is larger than the default sidebar of Hannover and I get a white rectangle over the top part of the sidebar. Hiow coud I prevent overlaying my sidebar ? – DRi May 31 '18 at 14:58
  • @DRi Can you make a MWE? – samcarter_is_at_topanswers.xyz May 31 '18 at 15:00
  • Sorry for the delay. I edited my original post, including your solution in order to show the 2 problems I am facing now. – DRi Jun 7 '18 at 14:09
  • @DRi Make the side bar the same width as your image, \usetheme[width=.2\paperwidth]{Hannover} – samcarter_is_at_topanswers.xyz Jun 7 '18 at 14:17
  • Thank you , this works for my first question. but I would like to use 2 different sidebars, one for the title frame and one for the other frames. I think I took the idea of (sidebar) and (sidebar left) from beamer 's user guide to differentiate them, but it doesn't seem to work as i expected it. – DRi Jun 7 '18 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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