This commit is contained in:
Erich Schubert 2018-09-13 15:06:53 +00:00 committed by GitHub
commit e1b1bc21ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 20 deletions

View File

@ -335,9 +335,7 @@
\newlength{\metropolis@progressonsectionpage@linewidth}
\setlength{\metropolis@progressonsectionpage@linewidth}{0.4pt}
\setbeamertemplate{progress bar in section page}{
\setlength{\metropolis@progressonsectionpage}{%
\textwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
}%
\pgfmathsetlength{\metropolis@progressonsectionpage}{\textwidth * min(1,\insertframenumber/\inserttotalframenumber}%
\tikzexternaldisable%
\begin{tikzpicture}
\fill[bg] (0,0) rectangle (\textwidth, \metropolis@progressonsectionpage@linewidth);
@ -346,20 +344,6 @@
\tikzexternalenable%
}
% \end{macrocode}
%
% The above code assumes that |\insertframenumber| is less than or equal to
% |\inserttotalframenumber|. However, this is not true on the first compile;
% in the absence of an |.aux| file, |\inserttotalframenumber| defaults to 1.
% This behaviour could cause fatal errors for long presentations, as
% |\metropolis@progressonsectionpage| would exceed \TeX's maximum length
% (16383.99999pt, roughly 5.75 metres or 18.9 feet).
% To avoid this, we increase the default value for |\inserttotalframenumber|;
% presentations with over 4000 slides will still break on first compile, but
% users in that situation likely have deeper problems to solve.
%
% \begin{macrocode}
\def\inserttotalframenumber{100}
% \end{macrocode}
% \end{macro}
%
%

View File

@ -191,9 +191,7 @@
\setlength{\metropolis@progressinheadfoot@linewidth}{0.4pt}
\setbeamertemplate{progress bar in head/foot}{
\nointerlineskip
\setlength{\metropolis@progressinheadfoot}{%
\paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
}%
\pgfmathsetlength{\metropolis@progressinheadfoot}{\paperwidth * min(1,\insertframenumber/\inserttotalframenumber}
\begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot}
\tikzexternaldisable%
\begin{tikzpicture}