I am using the probsoln package to generate random math quizzes. For polynomial division, I can generate random integer coefficients, but I had planned on using the polynom package to auto-generate the solution, but I keep getting one of those "I was expecting a number" errors.
Here is an MWE
\documentclass{article}
\usepackage{probsoln}
\usepackage{polynom}
\newcounter{myCounter}
\begin{document}
\random{myCounter}{1}{10}
\[ \polylongdiv{ \value{myCounter}x^2 + 1 }{ x + 1 } \]
\end{document}
I have also tried this using \arabic{myCounter} instead of \value, and I have tried using \pgfmathsetmacro{\newMacro}{\value{myCounter} followed by \pgfmathtruncatemacro{\truncatedMacro}{\newMacro}. Each time, `\polylongdiv' issues the same error.
The .sty file: I have even opened up the .sty file to try and understand how \polylongdiv works, but it just looked like my cats and my kids had randomly played with my keyboard. I couldn't even begin to parse it.
Does anyone have a quick insight/adjustment I can use to accomplish this?
