\maketitle

We'll start with some automatically numbered problems \ldots

\begin{problem}
A problem \Part{a} with \Part{b} parts.
\end{problem}
\begin{solution}
\Part{a} A solution with \ans{answers}.
\end{solution}

\begin{problem}
What is $5\U{Hz}$ times $10^{-3}\U{m}$?
\end{problem}
\begin{solution}
\Part{a} Another solution.
\Part{b} this time with numbers:
$5\U{Hz}\cdot10^{-3}\U{m} = \ans{5\E{-3}\U{m/s}}$.
\end{solution}

\ldots and move on to an explicitly numered problem.

\begin{problem*}{98}
An apparently difficult problem.
\end{problem*}
\begin{solution}
But still easily solved.
\end{solution}

\begin{problem*}{101}
The last problem: draw the direction of any forces.
\end{problem*}
% this is a bit tricky, since we have one drawing that we'd like to show
% for nosolutions (just the charges), and another we would like to show
% when solutions are on that is very similar (charges+forces).
% the parts of the drawing common to both get defined as a macro:
\newcommand{\problemOneOhOneBaseFigure}{
  \coordinate (A) at ($ (0,0) + 0.5*(rand,rand) $);
  \coordinate (B) at ($ (3,1) + 0.5*(rand,rand) $);
  \fill[red] (A) circle (6pt);
  \fill[blue] (B) circle (3pt);
  \node at (A) [below=8pt] {A};
  \node at (B) [below=8pt] {B};
}

\begin{nosolution}
\begin{center}
\begin{tikzpicture}
  \problemOneOhOneBaseFigure{}
\end{tikzpicture}
\end{center}
\end{nosolution}

\begin{solution}
\begin{center}
\begin{tikzpicture}
  \problemOneOhOneBaseFigure{}
  \begin{pgfonlayer}{background}
    \draw[->] (A) -- ($ (A) ! -0.3 ! (B) $) node[pos=1,left=8pt] {\vbox{\hbox{$F_{BA}$}\hbox{($B$ on $A$)}}};
    \draw[->] (B) -- ($ (B) ! -0.3 ! (A) $) node[pos=1,right=8pt] {\vbox{\hbox{$F_{AB}$}\hbox{($A$ on $B$)}}};
  \end{pgfonlayer}
\end{tikzpicture}
\end{center}
\end{solution}

Note that the problem-separating space occurs after the nosolution
section in nosolution mode.
