Question: LaTeX Authoring errors - Environment topic undefined

I'm trying to write a Maple T.A. question bank in LaTeX, since the online question bank editor was too slow to be usable. Running LaTeX even on the "Sample Question Bank" from the documentation gives 25 errors, mostly of the form:

  1. "LaTeX error: Environment topic undefined"
  2. "LaTeX error: Environment question undefined"
  3. Undefined control sequence (for \answer, \qutext etc.)

I have the ed.sty file in the same folder as the tex file and it seems to be loading it. So why the errors? The tex file is below.

\documentclass[12pt]{article}
\usepackage{ed}
\setImageBase{web/myclass/Public_Html/Images}
\begin{document}
\begin{topic}{Arithmetic}
%% Question 1
\begin{question}{Numeric}
\name{Addition}
\code{$a = range(1,10);
$b = range(1,10);}
\qutext{What is $\var{a}+\var{b}$?}
\answer{\var{\var{a}+\var{b}}}
\end{question}
%% Question 2
\begin{question}{Formula}
\name{Multiplication}
\code{$a = range(1,10);
$b = range(1,10);}
\qutext{What is $\var{a}\times\var{b}$?}
\answer{\var{\var{a}*\var{b}}}
\end{question}
\end{topic}
\end{document}

Please Wait...