0

For context, I am using the probsoln package to create a list of problems and solutions. The problems and their solutions come from files in the same directory titled bank_lesson1.tex, bank_lesson2.tex, etc. There are 10 lessons.

For some reason, I'm getting the error "Undefined control sequence \repeat". I was under the impression that \loop and \repeat were built into TeX and were immediately usable.

\documentclass[11pt]{article}
\usepackage[left=1in, top=1.25in, right=1in, bottom=1.25in, head=30pt]{geometry}
 \geometry{letterpaper}
\usepackage{graphicx}
\usepackage{amssymb, amsmath, commath}

\usepackage{probsoln}


\begin{document}

\newcounter{intA}
\setcounter{intA}{1}
\loop
    \loadallproblems[bank_lesson\theintA]{bank_lesson\theintA}

    \section{Lesson \theintA}

    {
    \showanswers
    \begin{enumerate}
        \foreachproblem[bank_lesson\theintA]{\item\thisproblem}
    \end{enumerate}
    }

    \clearpage

    \addtocounter{intA}{1}
\ifnum \value{intA}<11
\repeat


\end{document}
  • 1
    Can you please report exactly the error message as shown in the log file? – egreg Apr 19 at 21:29
  • 1
    In classic fashion, it's working now after not changing anything. Maybe "turning it off and turning it back on again" worked. I'll repost the exact error message if it happens again. Thanks! – ryanj1823 Apr 19 at 21:47
  • I would not use the commath package, – David Carlisle Apr 19 at 23:02

Your Answer

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

Browse other questions tagged or ask your own question.