Mike Gerwitz

Activist for User Freedom

summaryrefslogtreecommitdiffstats
blob: 426e93152f3fbf7d45b0e000ee1ac153b668c509 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
% LoVullo rater specification questions
%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{raterspec/question}
\ProcessOptions\relax


\newlength\questionparsep
\questionparsep\the\marginparsep
\newenvironment{qgroup}[1]%
  {%
    \subsubsection{#1}%
    \begin{description}%
  }%
  {%
    \end{description}%
  }

\newenvironment{subquestions}%
  {%
    \begin{description}%
    \advance\questionparsep by \parindent\relax
  }
  {%
    \end{description}%
  }


\def\@qtypedesc@currency{any dollar and cent amount.}
\def\@qtypedesc@date{a valid date.}
\def\@qtypedesc@float{any floating point value.}
\def\@qtypedesc@noyes{one of either {\sl No\/} or~{\sl Yes}.}
\def\@qtypedesc@number{any whole number.}
\def\@qtypedesc@select{one of the options enumerated below:}
\def\@qtypedesc@text{any string of characters.}
\newcommand\question[5][]{%
  \item
    \beginundersletter
      \llap{%
        \tt\scriptsize\raisebox{-1em}[0em][0em]{%
          \shortstack[r]{%
            \scantokens{#2}\\
            {\tiny \scantokens{#4}}%
          }%
        }%
        \hspace{\the\questionparsep}%
      }%
    \endundersletter
    \vskip-1.5\baselineskip
    \ignorespaces{\sf#5}\unskip
    \par
    \vskip-0.5\baselineskip
  \@margin@sig
  \begingroup
    \def\@mapsto{#3}%
    \ifx\@mapsto\empty
      \May not map to any rater input parameter.%
    \else
      \Shall map to rater input parameter \paramref{#3}.%
    \fi
  \endgroup
  \space Input value \shall be \csname @qtypedesc@#4\endcsname\space
  \ignorespaces
}


% sectioning abstraction
\def\proguistep#1{\subsection{#1}}