My exam template includes a table listing the point values for each problem in the exam. Is there a way to declare the point values of each problem as variables within latex and write code to automatically generate this table?
\documentclass[letterpaper]{article}
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{problem}{Problem}
\begin{document}
\begin{center}
\begin{tabular}{|c|c|c|}
\hline
Problem & Points & Score \\ \hline
1 & 12 & \\ \hline
2 & 17 & \\ \hline
Total & 29 & \\ \hline
\end{tabular}
\end{center}
\begin{problem}[12 Points]
Problem statement.
\end{problem}
\begin{problem}[17 Points]
Problem statement.
\end{problem}
\end{document}
exam
document class, particularly the\addpoints
and\gradetable
commands.