Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
i4
TeX Vorlagen
neo
Commits
ed9b4701
Commit
ed9b4701
authored
Dec 11, 2020
by
Michael Eischer
Browse files
Limit progress bar to 100%
Adapted from
https://github.com/matze/mtheme/pull/343
by kno10
parent
63b33b9e
Pipeline
#54034
passed with stage
in 33 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beamertheme-source/beamerinnerthemeneo.dtx
View file @
ed9b4701
...
...
@@ -359,9 +359,7 @@
\newlength{\neo@progressonsectionpage@linewidth}
\setlength{\neo@progressonsectionpage@linewidth}{0.4pt}
\setbeamertemplate{progress bar in section page}{
\setlength{\neo@progressonsectionpage}{%
\textwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
}%
\pgfmathsetlength{\neo@progressonsectionpage}{\textwidth * min(1,\insertframenumber/\inserttotalframenumber}%
\tikzexternaldisable%
\begin{tikzpicture}
\fill[bg] (0,0) rectangle (\textwidth, \neo@progressonsectionpage@linewidth);
...
...
@@ -370,20 +368,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
% |\neo@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}
%
%
...
...
beamertheme-source/beamerouterthemeneo.dtx
View file @
ed9b4701
...
...
@@ -307,9 +307,7 @@
\setlength{\neo@progressinheadfoot@linewidth}{0.8pt}
\setbeamertemplate{progress bar in head/foot}{
\nointerlineskip
\setlength{\neo@progressinheadfoot}{%
\paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
}%
\pgfmathsetlength{\neo@progressinheadfoot}{\paperwidth * min(1,\insertframenumber/\inserttotalframenumber}%
\begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot}
\tikzexternaldisable%
\begin{tikzpicture}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment