or
Seb123 imported from SE
beamer
I am inserting the list of section names in the footer using:



The complete code for the footer (using the metropolis theme) is

\makeatletter
\setbeamertemplate{footline}{%
\begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}%
\usebeamertemplate*{frame footer}
\hfill%
\usebeamertemplate*{frame numbering}
\end{beamercolorbox}%

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


However I have too many sections and it escapes the end of the footer. See picture of slide:

[![enter image description here][1]][1]

To fix this I would like to move the navigation to the left as the current section increases. Something like:



where \sectionnumber is the number of the current section (made up the command).

[1]: https://i.stack.imgur.com/yvKTR.png
samcarter
The problem with moving the content by a fixed amount of space for each section is that this does not take into acocunt different lenghts of section names.

However using a similar approach as in https://topanswers.xyz/tex?q=415#a418 you can show only a fixed number of sections in the navigation bar, e.g. the current section +-2 other sections.


\documentclass{beamer}

\usetheme{metropolis}

\makeatletter
\setbeamertemplate{footline}{%
\begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}%
\usebeamertemplate*{frame footer}
\hfill%
\usebeamertemplate*{frame numbering}
\end{beamercolorbox}%

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

% based on the original definitions in beamerbasenavigation.sty
\def\sectionentry#1#2#3#4#5{% section number, section title, page
%
\newcount\mymin%
\mymin=3
\ifnum\c@section=1%
\mymin=5
\fi%
\ifnum\c@section=2%
\mymin=4
\fi%
%
\newcount\mymax%
\mymax=3
\ifnum\c@section=\beamer@sectionmax%
\mymax=5
\fi%
\ifnum\c@section=\numexpr\beamer@sectionmax-1%
\mymax=4
\fi%
%
\ifnum\numexpr\c@section-#1<\mymax%
\ifnum\numexpr#1-\c@section<\mymin%
\ifnum#5=\c@part%
\beamer@section@set@min@width
\box\beamer@sectionbox\hskip1.875ex plus 1fill%
\beamer@xpos=0\relax%
\beamer@ypos=1\relax%
\setbox\beamer@sectionbox=
\hbox{

{%
\ifnum\c@section=#1%
\else%
\fi%
}%
}%
\ht\beamer@sectionbox=1.875ex%
\dp\beamer@sectionbox=0.75ex%
\fi%
\fi%
\fi%
\ignorespaces%
}

\def\slideentry#1#2#3#4#5#6{%
%section number, subsection number, slide number, first/last frame, page number, part number
%
\newcount\mymin%
\mymin=3
\ifnum\c@section=1%
\mymin=5
\fi%
\ifnum\c@section=2%
\mymin=4
\fi%
%
\newcount\mymax%
\mymax=3
\ifnum\c@section=\beamer@sectionmax%
\mymax=5
\fi%
\ifnum\c@section=\numexpr\beamer@sectionmax-1%
\mymax=4
\fi%
%
\ifnum\numexpr\c@section-#1<\mymax%
\ifnum\numexpr#1-\c@section<\mymin%
\ifnum#6=\c@part\ifnum#2>0\ifnum#3>0%
\ifbeamer@compress%
\else%
\beamer@xpos=#3\relax%
\beamer@ypos=#2\relax%
\fi%
\hbox to 0pt{%
\beamer@tempdim=-\beamer@vboxoffset%
\multiply\beamer@tempdim by\beamer@ypos%
\raise\beamer@tempdim\hbox{%
\beamer@tempdim=\beamer@boxsize%
\multiply\beamer@tempdim by\beamer@xpos%
\kern\beamer@tempdim
\global\beamer@section@min@dim\beamer@tempdim
\usebeamerfont{mini frame}%
\ifnum\c@section=#1%
\ifnum\c@subsection=#2%
\usebeamercolor[fg]{mini frame}%
\ifnum\c@subsectionslide=#3%
\usebeamertemplate{mini frame}%\beamer@minislidehilight%
\else%
\usebeamertemplate{mini frame in current subsection}%\beamer@minisliderowhilight%
\fi%
\else%
\usebeamercolor{mini frame}%
%\color{fg!50!bg}%
\usebeamertemplate{mini frame in other subsection}%\beamer@minislide%
\fi%
\else%
\usebeamercolor{mini frame}%
%\color{fg!50!bg}%
\usebeamertemplate{mini frame in other subsection}%\beamer@minislide%
\fi%
}}}\hskip-10cm plus 1fil%
}\fi\fi%
\else%
\fakeslideentry{#1}{#2}{#3}{#4}{#5}{#6}%
\fi%
\fi%
\fi%
\ignorespaces%
}
\makeatother

\begin{document}

\section{section 1}
\begin{frame}
abc
\end{frame}

\section{section 2}
\begin{frame}
abc
\end{frame}

\section{section 3}
\begin{frame}
abc
\end{frame}

\section{section 4}
\begin{frame}
abc
\end{frame}

\section{section 5}
\begin{frame}
abc
\end{frame}

\section{section 6}
\begin{frame}
abc
\end{frame}

\section{section 7}
\begin{frame}
abc
\end{frame}

\section{section 8}
\begin{frame}
abc
\end{frame}

\section{section 9}
\begin{frame}
abc
\end{frame}

\end{document}


![Screen Shot 2019-12-11 at 17.08.07.png](/image?hash=b37ac84da4b508661b67ee0cbbbc3d233d2a50a3fdede184b7b3ffcc8c42e4d6)

(I would prefer if this answer would **not** be copied to tex.se)
Move \insertnavigation to the left in later sections in beamer footer
Jack Douglas
https://topanswers.xyz/meta?q=24
yes it is a complex issue and hard to label concisely and precisely. The '+' means 'in addition to' (i.e. dual licensed) rather than 'as an exception' but I can't think of a way of saying that that doesn't take up more space. I think the actual meta post that the "LPPL for original code" link takes you to makes it more clear…
ok, thanks for clarifying my misconception. I thought it was meant that code is licensed under LPPL and the rest is licensed under CC BY-SA (the heading above the answer suggests this by stating "CC BY-SA 4.0 + LPPL for original code").
If you really just mean your code, the LPPL already covers commercial reuse for just that — CC BY-SA-NC would only affect sites like SE that want to republish your entire answer. You are probably right anyway though it will work work either way…
Thanks for the suggestion about the other license! I don't mind commercial companies in general reusing my code, e.g. Typesetting services should definitly be able to use my code.  The addendum to my answer was a reaction to https://topanswers.xyz/tex?q=393#question and while I know that the license I choose allows others to repost it, I think can polity ask them not to do this on tex.se
CC BY-SA applies to the entire post — SE can republish under that license. LPPL is an *additional* license covering just original code which is more about how other people can use it in real life, rather than about who can publish it.
@samcarter re "I would prefer if this answer would not be copied to tex.se" have you considered licensing your content under CC BY-SA-NC instead? Stack Exchange is a commercial company and would not be able to republish your content under that license.
but I'm no legal expert and especially license stuff is hard to understand for me, so this assumption might be false.
Good :)
I'm not sure if it were legal to copy it to tex.se, as I don't know whether the CC BY-SA is compatible with LPPL (which applies to your code).