--- /dev/null
+# each MetaPost graphic has it's own file,
+# so the basic definitions should get bundled out into an external file
+# (encourages reuse anyway, so it's good for you :p)
+
+all : sols.pdf probs.pdf
+
+view : vprobs vsols
+
+vprobs : probs.pdf
+ xpdf $< &
+
+vsols : sols.pdf
+ xpdf $< &
+
+%.pdf : %.tex problems.tex
+ TEXINPUTS="..:" pdflatex $<
+ TEXINPUTS="..:" pdflatex $<
+
+semi-clean :
+ rm -f *.1 *.log *.mp *.mpx *.aux *.out *.cut
+
+clean : semi-clean
+ rm -f *.pdf
--- /dev/null
+\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.
--- /dev/null
+\documentclass[letterpaper, 10pt]{article}
+
+\usepackage[nosolutions,
+ author={W. Trevor King},
+ coursetitle={Physics 101},
+ classtitle={Recitation 1},
+ subheading={Chapter 1}]{../problempack}
+\usepackage{wtk_cmmds}
+\usepackage{wtk_format}
+\usepackage{tikz}
+\usetikzlibrary{calc,backgrounds}
+
+\begin{document}
+
+\input{problems}
+
+\end{document}
--- /dev/null
+\documentclass[letterpaper, 10pt]{article}
+
+\usepackage[solutions,
+ author={W. Trevor King},
+ coursetitle={Physics 101},
+ classtitle={Recitation 1},
+ subheading={Chapter 1}]{../problempack}
+\usepackage{wtk_cmmds}
+\usepackage{wtk_format}
+\usepackage{tikz}
+\usetikzlibrary{calc,backgrounds}
+
+\begin{document}
+
+\input{problems}
+
+\end{document}