Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bjoern Hagemeier
beamertheme-juelich
Commits
16c6b958
Commit
16c6b958
authored
Aug 05, 2018
by
Ivo Kabadshow
Browse files
fix progress bar computation
parent
356d7253
Pipeline
#11693
failed with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beamerouterthemeJuelich.sty
View file @
16c6b958
...
...
@@ -213,7 +213,7 @@
%------------------------------------------------
\defbeamertemplate
{
progressbar
}{
visible
}
{
%
\
tlap
{
\
progressbar
@progressba
r
}
\
usebeamertemplate*
{
progress
bar
foote
r
}
}
\defbeamertemplate*
{
progressbar
}{
invisible
}{}
...
...
beamerthemeJuelich.sty
View file @
16c6b958
...
...
@@ -10,6 +10,7 @@
\RequirePackage
{
calc
}
\RequirePackage
{
textcase
}
\usetikzlibrary
{
calc
}
\usetikzlibrary
{
external
}
\ifluatex
\RequirePackage
{
microtype
}
...
...
@@ -91,27 +92,26 @@
% define progressbar
\makeatletter
\def\progressbar
@progressbar
{}
% the progress bar
\newcount\progressbar
@tmpcounta
% auxiliary counter
\newcount\progressbar
@tmpcountb
% auxiliary counter
\newdimen\progressbar
@pbht
%progressbar height
\newdimen\progressbar
@pbwd
%progressbar width
\newdimen\progressbar
@tmpdim
% auxiliary dimension
\progressbar
@pbwd=
\paperwidth
\progressbar
@pbht=0.2ex
\def\progressbar
@progressbar
{
%
\progressbar
@tmpcounta=
\insertframenumber
\progressbar
@tmpcountb=
\inserttotalframenumber
\progressbar
@tmpdim=
\progressbar
@pbwd
\divide\progressbar
@tmpdim by 128
\multiply\progressbar
@tmpdim by
\progressbar
@tmpcounta
\divide\progressbar
@tmpdim by
\progressbar
@tmpcountb
\multiply\progressbar
@tmpdim by 128
\begin{tikzpicture}
\draw
[draw=none,fill=fzjblue]
%
(0pt, 0pt) rectangle ++ (
\progressbar
@tmpdim,
\progressbar
@pbht);
\end{tikzpicture}
%
\newlength
{
\fzj
@progressinheadfoot
}
\newlength
{
\fzj
@progressinheadfoot@linewidth
}
\setlength
{
\fzj
@progressinheadfoot@linewidth
}{
0.4pt
}
\setbeamertemplate
{
progress bar footer
}{
\nointerlineskip
\setlength
{
\fzj
@progressinheadfoot
}{
%
\paperwidth
*
\ratio
{
\insertframenumber
pt
}{
\inserttotalframenumber
pt
}
%
}
%
\begin{beamercolorbox}
[wd=
\paperwidth
]
{
progress bar footer
}
\tikzset
{
external/export next=false
}
%
\begin{tikzpicture}
\fill
[fg]
(0,0) rectangle (
\fzj
@progressinheadfoot,
\fzj
@progressinheadfoot@linewidth);
\end{tikzpicture}
%
\end{beamercolorbox}
}
% make sure we have a large number of total slided before the first run to keep the frame/total frame ratio below 1
% if your slide deck has more than 300 slides, you might increase the number below
% after the second latex run the totalframenumber will be read correctly from the .aux file
\def\inserttotalframenumber
{
300
}
\makeatother
tests/many-pages.tex
View file @
16c6b958
\documentclass
[t]
{
beamer
}
\usetheme
{
Juelich
}
\usepackage
{
calc
}
\title
{
Test for Very Long Documents
}
\subtitle
{
Large numbers might break computation
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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