# Exam Class - Automatically print a partial grade table on each page?

When writing exams with the exam class, I like to add a partial grade table to each page for just the questions on that page, and then add a final grade table at the end of the exam by page number.

Here's a MWE:

\documentclass[addpoints]{exam}

\begin{document}
\begin{questions}
\question[10] What does $2+2$ equal?
\question[10] What is $\frac{d}{dx} \sin x$?
\vfill
\begin{flushright}
\end{flushright}

\clearpage
\question I have many parts.
\begin{parts}
\part[5] Graph $y=x^2$.
\part[7] Compute the Laplace Transform of $y(t) = e^{2t} \cos t$.
\end{parts}
\question[42] Quis custodiet ipsos custodes?
\vfill
\begin{flushright}
\end{flushright}
\end{questions}
\end{document}


Which produces the following output:

Is there a way to automate this behavior? The only advice I found in the Exam Doc Class was the technique of creating partial grade tables as shown in the MWE. This gets a bit tedious with a full length exam.

This is about as automated as I can make it. The grading ranges won't work with everypage. They probably use local rather than global definitions.

You might want to think about changing the page geometry and putting the grading tables outside the text area.

\documentclass[addpoints]{exam}
\usepackage{everypage}
\usepackage{tikzpagenodes}

\begin{tikzpicture}[remember picture,overlay]
\node[above left] at (current page text area.south east)
\end{tikzpicture}%
}
\newpage

\begin{document}
\begin{questions}
\question[10] What does $2+2$ equal?
\question[10] What is $\frac{d}{dx} \sin x$?
\nextpage

\question I have many parts.
\begin{parts}
\part[5] Graph $y=x^2$.
\part[7] Compute the Laplace Transform of $y(t) = e^{2t} \cos t$.
\end{parts}
\question[42] Quis custodiet ipsos custodes?

\begin{tikzpicture}[remember picture,overlay]
\node[below left] at (current page text area.south east)
};
\end{tikzpicture}%
\end{questions}
\end{document}


This version uses flowfram instead of tikzpagenodes. It will NOT overlay the questions and the partial grading table. The 1in figure is a guess.

\documentclass[addpoints]{exam}
\usepackage{flowfram}

\newflowframe{\textwidth}{\dimexpr \textheight-1in}{0pt}{1in}

\newdynamicframe{\textwidth}{1in}{0pt}{0pt}[partial]
\setdynamiccontents*{partial}{\vspace*{\fill}\hspace*{\fill}%

\newpage

\begin{document}
\begin{questions}
\question[10] What does $2+2$ equal?
\question[10] What is $\frac{d}{dx} \sin x$?
\nextpage

\question I have many parts.
\begin{parts}
\part[5] Graph $y=x^2$.
\part[7] Compute the Laplace Transform of $y(t) = e^{2t} \cos t$.
\end{parts}
\question[42] Quis custodiet ipsos custodes?