# Reduce horizontal width of miniframe in beamer

I have a beamer presentation with only three sections. Right now they are spaced at equal distances across the slide, but I would like to compress them so that they are spaced evenly in the left hand side of the headline.

Right now it looks like:

Section 1  ---------------------------- Section 2---------------------------Section 3

And I would prefer it to look like

Section 1-------Section 2-------Section 3

Is there a way to customize the horizontal width of the navigation bar at the top? Thank you in advance!

\documentclass[compress]{beamer}
\useoutertheme[footline=authortitle,subsection=false]{miniframes}
\begin{document}
\section{Section 1}
\subsection{Subsection 1}
\frame{}\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}
\section{Section 2}
\subsection{Subsection 1}
\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}\frame{}
\section{Section 3}
\subsection{Subsection 1}
\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}\frame{}
\end{document}

Yes, this is possible. Below I'll present two options: the first one is the easier and with sorter code, but depends on you giving the desired total width for the navigation bar; the second one offers you more flexibility and freedom (since you can control the separation between sections at will), but it requires a more involved modification.

1. In this option you redefine the headline template, as implemented by the miniframes outer theme, so \insertnavigation doesn't take the whole \paperwidth; for example, using 0.5\paperwidth (change this value in the line marked with % Change here to suit your needs):

\documentclass[compress]{beamer}
\useoutertheme[footline=authortitle,subsection=false]{miniframes}

\makeatletter
{%
\end{beamercolorbox}
\end{beamercolorbox}%
\ifbeamer@theme@subsection%
\end{beamercolorbox}
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
\end{beamercolorbox}%
\fi%
\end{beamercolorbox}
}
\makeatother

\begin{document}
\section{Section 1}
\subsection{Subsection 1}
\frame{}\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}
\section{Section 2}
\subsection{Subsection 1}
\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}\frame{}
\section{Section 3}
\subsection{Subsection 1}
\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}\frame{}
\end{document}

2. In this option you need a redefinition of some beamer internals: \sectionentry and \insertnavigation (original definitions in beamerbasenavigation.sty). By changing \sectionsep (default of 20pt) you can have the desired separation between sections in the navigation bar:

\documentclass[compress]{beamer}
\useoutertheme[footline=authortitle,subsection=false]{miniframes}

\newlength\sectionsep
\setlength\sectionsep{20pt}% default 1.875ex plus 1fill

\makeatletter
\def\sectionentry#1#2#3#4#5{% section number, section title, page
\ifnum#5=\c@part%
\beamer@section@set@min@width
\box\beamer@sectionbox\hskip\sectionsep%original: 1.875ex plus 1fill%
\beamer@xpos=0\relax%
\beamer@ypos=1\relax%
\setbox\beamer@sectionbox=
{%
\ifnum\c@section=#1%
\else%
\fi}%
}%
\ht\beamer@sectionbox=1.875ex%
\dp\beamer@sectionbox=0.75ex%
\fi\ignorespaces}
\vbox{{%
\beamer@xpos=0\relax%
\beamer@ypos=1\relax%
\hbox to #1{\hskip.3cm\setbox\beamer@sectionbox=\hbox{\kern1sp}%
\ht\beamer@sectionbox=1.875ex%
\dp\beamer@sectionbox=0.75ex%
\hskip-\sectionsep% original -1.875ex plus 1fill
\global\beamer@section@min@dim\z@
\beamer@section@set@min@width
\box\beamer@sectionbox\hfill\hfill %\hfill%\hskip.3cm
}%
}}}
\makeatother

\begin{document}
\section{Section 1}
\subsection{Subsection 1}
\frame{}\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}
\section{Section 2}
\subsection{Subsection 1}
\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}\frame{}
\section{Section 3}
\subsection{Subsection 1}
\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}\frame{}
\end{document}