Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am attempting to compile a 70 frame beamer presentation in TeXworks (on Ubuntu 11.10). The theme I am using is called beamer-goddard (located at the bottom of This Page) . When I compile I receive this console error:

! Arithmetic overflow.
\goddard@progressbar ... by \goddard@temp@count@a 
                                                  \divide \goddard@temp@dime...

as well as this LaTeX error:

Package hyperref Warning: Option `pdfpagelabels' is turned off (hyperref) because \thepage is undefined.

 \documentclass[xcolor=table,serif,8pt]{beamer}
 \setbeamertemplate{footline}[page number]{}

 \usepackage[american]{babel}
 \usepackage[T1]{fontenc}
 \usepackage{listings}
 \usepackage{lmodern}
 \usepackage{textcomp}
 \usepackage{wrapfig}
 \usepackage[pdf]{pstricks}
 \usetheme{Goddard}

 \newcommand{\filepath}{\texttt}
 \newcommand{\command}{\texttt}
 \newcommand{\email}[1]{\href{mailto:#1}{\texttt{#1}}}
 \newcommand{\latexcode}{\texttt}
 \newcommand{\parameter}[1]{\textlangle #1\textrangle}


 \lstset{basicstyle=\ttfamily,keywordstyle\color{goddardblue}               \bfseries,commentstyle=\color{goddardblue!75}\itshape,columns=flexible}

 \rowcolors{1}{goddardblue!50}{goddardblue!30} 
  ...

 \end{document}

I am guessing some values may need to be modified in the \divide portion of the goddard@theme.

share|improve this question
    
Just guessing : The progress bar increment for each frame advance is too small. Can you reduce the number of frames to say 30 or 40 and try again? –  percusse Mar 5 '12 at 21:19

1 Answer 1

up vote 3 down vote accepted

without a working example (or a working installation of that theme) this is untested but I assume that error comes from this bit of code

\def\goddard@progressbar{%
  % No draw if there is only one slide
  \ifnum\inserttotalframenumber=1
  \else
    % Compute the width of the filled part of the progress bar
    \goddard@temp@count@a=\insertframenumber
    \advance\goddard@temp@count@a by -1
    \goddard@temp@count@b=\inserttotalframenumber
    \advance\goddard@temp@count@b by -1
    \goddard@temp@dimen@a=\goddard@barwidth
    \multiply\goddard@temp@dimen@a by \goddard@temp@count@a
    \divide\goddard@temp@dimen@a by \goddard@temp@count@b

in

beamer-goddard-0.1/tex/latex/beamer/themes/outer/beamerouterthemegoddard.sty

If so it's multiplying and dividing by two numbers but overflowing, so you need to rescale the problem (in a local redefinition of \goddard@progressbar.

Without following the code closely making it automatically scale to keep within numeric limits might be hard but you can insert a scaling suitable for this job, try say 100

\def\goddard@progressbar{%
  % No draw if there is only one slide
  \ifnum\inserttotalframenumber=1
  \else
    % Compute the width of the filled part of the progress bar
    \goddard@temp@count@a=\insertframenumber
    \advance\goddard@temp@count@a by -1
    \goddard@temp@count@b=\inserttotalframenumber
    \advance\goddard@temp@count@b by -1
    \goddard@temp@dimen@a=\goddard@barwidth
              \divide\goddard@temp@dimen@a  by 100
    \multiply\goddard@temp@dimen@a by \goddard@temp@count@a
    \divide\goddard@temp@dimen@a by \goddard@temp@count@b
              \multiply\goddard@temp@dimen@a  by 100
share|improve this answer
    
Spectacular! Worked like a charm, thank you so very much David! –  Anders Mar 5 '12 at 23:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.