When I make quizzes for my lab my code complies, but i get a "Missing number treated as zero error" on each question and subpart. It's been happening for weeks and drive me crazy. Code below:


\firstpageheader{% left
    MATH 1426: Quiz 5 \\
}{% center - blank
}{% right

\runningheader{}{}{ Name:\enspace\makebox[2in]{\hrulefill}  }


    % Quiz instructions
    \parbox{5.5in}{\centering\itshape Answer each of the following questions.}

    % Quiz questions

    An object thrown vertically upward from the surface of a celestial body at a velocity of 12 ​m/s reaches a height of $s(t)=-0.6t^2+12t$ meters in $t$ seconds.
        Determine the body's velocity after $t$ seconds?
        When does the object reach its highest point?
        What is the height of the object at the highest point?
        When does the object strike the ground?
        With what velocity does the object strike the ground?


  • why was this tagged beamer ? – David Carlisle Oct 4 '17 at 16:29
  • As far as I can see, the page number appears nowhere on the printed pages, so \pagenumbering{gobble} is useless. Remove it. – egreg Oct 4 '17 at 17:15
  • David Carlisle: I was working on a beamer at the same time as this short quiz and accidentally put beamer for some reason... – enlimbo Oct 5 '17 at 18:06

the class is using the page number somewhere internally but you used the form


which was never a supported numbering style and it removes a number from where a number was expected.

Almost certainly the class should be using the value of the counter rather than its print form, but currently it clearly does not.


The exam class only prints the page number if the page style headandfoot (default) or foot is selected. With \pagestyle{head} you already suppress it, so \pagenumbering{gobble} (that should never be used anyway) is useless.

You can even suppress the page number in the headandfoot or foot style by issuing \cfoot{}.

Just remove \pagenumbering{gobble} and the document will compile regularly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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