# How to remove the sidebar but keep the upper-left logo in the beamer 'sidebar' outer theme?

I need to customize either the Berkeley or PaloAlto themes, or just the sidebar outer theme, in order to keep the logo in its default position (upper-left corner) while removing the sidebar. At the moment I have only been able to remove the sidebar (by using the width=0 option, but this removes the logo as well.

As a side issue, I would also like to add an horizontal gray rectangle along the bottom of the slides, that would be immaterial to content layout, that is, that its presence does not alter the output of any contents in the slides, in the sense of scaling or rearranging it anyhow.

-

You can redefine the headline and frametitle templates; an auxiliary length can be used to save the original sidebar width for later use. For the horizontal rectangle at the bottom, define the footline template using a beamercolorbox of the desired width, height (and depth) and use a previously defined color:

\documentclass{beamer}
\usetheme{PaloAlto}

\setbeamercolor{footlinebox}{fg=gray,bg=gray!60}

\makeatletter
\newdimen\tmpsbwd
\tmpsbwd=\beamer@sidebarwidth
\beamer@sidebarwidth=0pt
{%
\begin{beamercolorbox}[wd=\paperwidth]{frametitle}
\usebeamercolor[bg]{logo}%
\hbox to \tmpsbwd{\hss\vbox to
\end{beamercolorbox}
}
\setbeamertemplate{frametitle}
{%
\nointerlineskip%
\vfil
\leftskip=-\beamer@leftmargin%
\rightskip=-\beamer@rightmargin%
{\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\par}%
{\usebeamercolor[fg]
{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle\par}%
\vbox{}%
\vskip-1em%
\vfil
}%
}
\setbeamertemplate{footline}
{%
\begin{beamercolorbox}[wd=\paperwidth,ht=1ex,dp=1ex]{footlinebox}
\end{beamercolorbox}
}
\makeatother

\setbeamersize{sidebar width left=0cm}

\logo{\includegraphics[width=1.5cm]{cat}}

\begin{document}

\begin{frame}
\frametitle{Test title}
\framesubtitle{Test subtitle}
Test frame
\end{frame}

\end{document}


-
Thanks @GonzaloMedina ! What should I modify in order to set the height of the title bar? It looks to me it is set in terms of predefined variables like \vskip. –  Luis E. Jun 19 '12 at 16:31
@LuisE. the value controlling this height is \beamer@headheight; you can change this value and possibly will have to make some other adjustments. –  Gonzalo Medina Jun 19 '12 at 16:35
That worked well. Now for the footline, I don't get any visible output out of it. I have tried this: \setbeamertemplate{footline} {% \begin{beamercolorbox}[wd=\paperwidth,ht=1ex,dp=1ex]{footlinebox} \color{gray} \end{beamercolorbox} } –  Luis E. Jun 19 '12 at 16:49
@LuisE. comments are not the best place to write code. You can edit your original question and add the new problem. –  Gonzalo Medina Jun 19 '12 at 16:51
I had not seen the edit you made, adding definitions for fg and bg in the footlinebox. This now works as well. Thanks for the exceedingly quick help! –  Luis E. Jun 19 '12 at 17:05
show 1 more comment