0
votes

I would like to modify my Latex Beamer Template. Hence, I would like to increase the space between the displayed sections in the section navigation bar. At the moment the are left indented but the sections are way to close together.

I use the following code to generate the headline:

setbeamertemplate{headline}{%
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=\paperwidth,ht=3ex,dp=1.125ex]{palette tertiary}%
        \insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll}                 
        \end{beamercolorbox}%
    }
}

How can I modify the spacing between the displayed section?

1

1 Answers

1
votes

The tipple fill plus1filll you insert after the navigation makes it flush left. If you remove it, the sections will automatically be distributed within the available paper width:

\documentclass{beamer}

\setbeamertemplate{headline}{%
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=\paperwidth,ht=3ex,dp=1.125ex]{palette tertiary}%
        \insertsectionnavigationhorizontal{\paperwidth}{}{}
        \end{beamercolorbox}%
    }
}

\begin{document}

\section{title}
\begin{frame}
content...
\end{frame}

\section{title}
\begin{frame}
content...
\end{frame}

\end{document}

If you want to keep the sections flush left and just add some additional space between:

\documentclass{beamer}

\setbeamertemplate{headline}{%
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=\paperwidth,ht=3ex,dp=1.125ex]{palette tertiary}%
        \insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll}
        \end{beamercolorbox}%
    }
}

\setbeamertemplate{section in head/foot}{\insertsectionhead\hspace{0.5cm}}

\begin{document}

\section{title}
\begin{frame}
content...
\end{frame}

\section{title}
\begin{frame}
content...
\end{frame}

\end{document}