Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dimension to large error #70

Closed
jakobbossek opened this issue Jun 11, 2015 · 4 comments
Closed

Dimension to large error #70

jakobbossek opened this issue Jun 11, 2015 · 4 comments

Comments

@jakobbossek
Copy link

Hi,

it took me quite long to figure out what exactly was responsable for my ! Dimension too large error. It occurs if the option usetitleprogressbar is set and we have 45 or more slides.

\documentclass[10pt, compress]{beamer}

\usetheme[usetitleprogressbar]{m}

\usepackage{booktabs}
\usepackage[scale=2]{ccicons}

\usepgfplotslibrary{dateplot}


\title{A modern beamer theme}
\subtitle{}
\date{\today}
\author{Matthias Vogelgesang}
\institute{Institute or miscellaneous information}

\begin{document}

\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}
\begin{frame}
  \frametitle{Test}
\end{frame}

\end{document}
@rchurchley
Copy link
Contributor

Thanks for the bug report. Awesome detective work!

I think I've tracked down the cause. The error occurs in the calculation of the width of the progress bar. When the presentation is compiled for the first time, \inserttotalframenumber defaults to 1 when it has no aux file to read from. Therefore, \ratio{\insertframenumber pt}{\inserttotalframenumber pt}, which we've assumed to be between 0 and 1, can actually become quite large. And if the width of the frame times this number ever exceeds 16384pt (about 18.9ft), then we get the error.

Fortunately, this problem is easily worked around by re-compiling. Once beamer has an aux file to read from, \inserttotalframenumber will be set to something reasonable and the error will no longer occur. Perhaps we should redefine \inserttotalframenumber to default to 100 to avoid this under reasonable usage?

rchurchley added a commit to rchurchley/mtheme that referenced this issue Jun 11, 2015
@bgat
Copy link
Contributor

bgat commented Jun 11, 2015

I fixed it by just setting the total frame number to 1 if it is ever less
than that.

b.g.

On Thu, Jun 11, 2015, 3:26 AM Ross Churchley notifications@github.com
wrote:

Thanks for the bug report. Awesome detective work!

I think I've tracked down the cause. The error occurs in the calculation
of the width of the progress bar. When the presentation is compiled for the
first time, \inserttotalframenumber defaults to 1 when it has no aux file
to read from. Therefore, \ratio{\insertframenumber
pt}{\inserttotalframenumber pt}, which we've assumed to be between 0 and
1, can actually become quite large. And if the width of the frame times
this number ever exceeds 16384pt (about 18.9ft)
http://tex.stackexchange.com/questions/139883/origin-and-formation-to-the-error-dimension-too-large,
then we get the error.

Fortunately, this problem is easily worked around by re-compiling. Once
beamer has an aux file to read from, \inserttotalframenumber will be set
to something reasonable and the error will no longer occur. Perhaps we
should redefine \inserttotalframenumber to default to 100 to avoid this
under reasonable usage?

Reply to this email directly or view it on GitHub
#70 (comment).

Bill Gatliff
bgat@billgatliff.com

@bgat
Copy link
Contributor

bgat commented Jun 11, 2015

Seems like the default might actually be zero, in other words...

On Thu, Jun 11, 2015, 5:18 AM Bill Gatliff bgat@billgatliff.com wrote:

I fixed it by just setting the total frame number to 1 if it is ever less
than that.

b.g.

On Thu, Jun 11, 2015, 3:26 AM Ross Churchley notifications@github.com
wrote:

Thanks for the bug report. Awesome detective work!

I think I've tracked down the cause. The error occurs in the calculation of
the width of the progress bar. When the presentation is compiled for the
first time, \inserttotalframenumber defaults to 1 when it has no aux file
to read from. Therefore, \ratio{\insertframenumber
pt}{\inserttotalframenumber pt}, which we've assumed to be between 0 and 1,
can actually become quite large. And if the width of the frame times this
number ever exceeds 16384pt (about 18.9ft)
http://tex.stackexchange.com/questions/139883/origin-and-formation-to-the-error-dimension-too-large,
then we get the error.

Fortunately, this problem is easily worked around by re-compiling. Once
beamer has an aux file to read from, \inserttotalframenumber will be set to
something reasonable and the error will no longer occur. Perhaps we should
redefine \inserttotalframenumber to default to 100 to avoid this under
reasonable usage?

Reply to this email directly or view it on GitHub
#70 (comment).

Bill Gatliff
bgat@billgatliff.com

--

Bill Gatliff
bgat@billgatliff.com

@matze matze closed this as completed in cc24402 Jun 11, 2015
@jakobbossek
Copy link
Author

Thanks for fixing that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants