I'm working on a formatting system for standardized tests. Within each section of a test, there are groups of consecutive questions that I might choose to contain inside an environment.
\begin{passagequestions}
\begin{question} % question 1, or whichever this is.
\end{question}
% and so on
\end{passagequestions}
The counter questioncount
is provided outside whenever passagequestions
is used. Assume that question
does little more than increment the question number, i.e. via \stepcounter{questioncount}
.
At the beginning of each instance of passagequestions
, I would like to name all of the questions that are part of the question group. Each instance of passagequestions
should begin with Questions {0}--{1} are based on the following passage.
, where {0}
is the index of the first question (which may or may not be 1) and {1}
is the index of the last question.
My previous solution was going to begin by using a totcount
to keep track of the length of a question group, but I got the impression that that was not a good idea.
\label
approach?