# How to create a 'headline' theme in beamer which occupies only a portion of the sidebar?

The headline in beamer which spans the width of the top or height of the side in most examples I have seen displays the section/subsection/subsubsection labels. Can I produce a header/headline which is a specified portion/percentage of the slide size or length depending if it was placed along a particular edge?

I have in mind placing the headline as a stunted/shortened rectangle along the top, and beside it to have another 'rectangle' to display the frame title with a logo.

 \setbeamertemplate{frametitle}
{\vskip 0.25pt
\leavevmode
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=1.8ex,dp=1ex]{frametitle}%
\insertsection\insertsubsection\\
\raggedright\hspace*{5em}\Large\insertframetitle
\end{beamercolorbox}
}%
\vspace{-25pt}
\hfill
\includegraphics[width=1cm]{UCFLOGO}
\hspace*{0.0cm}
\vskip0pt
%{\color{ucfBlack}\rule{\textwidth}{0.4mm}}
}

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


Depends on the theme, but in most standard themes this should be possible.

As you did not provide any code for your headline, I am going to use the headline from the miniframe outer theme in the following:

\defbeamertemplate*{headline}{miniframes theme}
{%
\end{beamercolorbox}
\end{beamercolorbox}%
\ifbeamer@theme@subsection%
\end{beamercolorbox}
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
\end{beamercolorbox}%
\fi%
\end{beamercolorbox}
}


To adjust the width, you have to do two things

1. Specify the width of the bemaercolorboxes width wd={⟨width⟩}
2. adjusting the width of the navigation element by modifying \insertnavigation{\paperwidth}

So for a headline spanning half the page:

\documentclass{beamer}
\usecolortheme{whale}

\end{beamercolorbox}
\end{beamercolorbox}%
\end{beamercolorbox}
}

\begin{document}

\section{1}\begin{frame}\end{frame}
\section{2}\begin{frame}\end{frame}
\section{3}\begin{frame}\end{frame}
\section{4}\begin{frame}\end{frame}
\section{5}\begin{frame}\end{frame}
\section{6}\begin{frame}\end{frame}
\section{7}\begin{frame}\end{frame}
\section{8}\begin{frame}\end{frame}
\section{9}\begin{frame}\end{frame}
\section{10}\begin{frame}\end{frame}

\end{document}


(The colour theme is only loaded to make things more visible)

• I am getting an error, ! Undefined control sequence. \beamer@@tmpl@headline ..beamer@theme@subsection \begin {beamercolorbox}[co..., At the moment I am not importing any theme as I would like to make one from scratch. I cannot figure out where this error I am getting is coming from ... – Vass Feb 6 '17 at 17:51
• @Vass Can you provide a MWE of what you have tried? – samcarter_is_at_topanswers.xyz Feb 6 '17 at 17:56
• here is a link to the recent state of the .sty file on github, prior to adding your recommended code, github.com/mantzaris/PegasusBeamer/blob/master/… – Vass Feb 6 '17 at 18:00
• @samcarter: I would like to nominate you for the TUG Membership 2017 'competition' in order to appreciate your enormous support here on TeX.SE (and because your answers are very often underrated :-() – user31729 Feb 7 '17 at 10:17
• @ChristianHupfer Please don't worry about the rating of my answers, that is just an intrinsic problem of answering beamer questions. The few occasions I answer different stuff, like siunitx there are many upvotes. – samcarter_is_at_topanswers.xyz Feb 7 '17 at 12:55