Debian Codegraph @

texmf-dist/doc/latex/stex/packages/stex-hwexam.tex

raw
1 \begin{sfragment}{Introduction}
2 The \pkg{hwexam} package and class supplies an infrastructure that allows to format
3 nice-looking assignment sheets by simply including problems from problem files marked up
4 with the \pkg{problem} package. It is designed to be compatible with |problems.sty|, and
5 inherits some of the functionality.
6 \end{sfragment}
7
8 \begin{sfragment}{Package Options}
9 \begin{variable}{solutions,notes,hints,gnotes,pts,min}
10 The \pkg{hwexam} package and class take the options |solutions|, |notes|, |hints|,
11 |gnotes|, |pts|, |min|, and |boxed| that are just passed on to the \pkg{problems}
12 package (cf. its documentation for a description of the intended behavior).
13 \end{variable}
14
15 Furthermore, the \pkg{hwexam} package takes the option
16 \DescribeMacro{multiple}|multiple| that allows to combine multiple assignment sheets
17 into a compound document (the assignment sheets are treated as section, there is a table
18 of contents, etc.).
19
20 Finally, there is the option \DescribeMacro{test}|test| that modifies the behavior to
21 facilitate formatting tests. Only in |test| mode, the macros |\testspace|,
22 |\testnewpage|, and |\testemptypage| have an effect: they generate space for the
23 students to solve the given problems. Thus they can be left in the {\LaTeX} source.
24 \end{sfragment}
25
26 \begin{sfragment}{Assignments}
27 This package supplies the \DescribeEnv{assignment}|assignment| environment that groups
28 problems into assignment sheets. It takes an optional KeyVal argument with the keys
29 \DescribeMacro{number}|number| (for the assignment number; if none is given, 1 is
30 assumed as the default or --- in multi-assignment documents --- the ordinal of the
31 |assignment| environment), \DescribeMacro{title}|title| (for the assignment title; this
32 is referenced in the title of the assignment sheet), \DescribeMacro{type}|type| (for the
33 assignment type; e.g. ``quiz'', or ``homework''), \DescribeMacro{given}|given| (for the
34 date the assignment was given), and \DescribeMacro{due}|due| (for the date the
35 assignment is due).
36 \end{sfragment}
37
38 \begin{sfragment}{Including Assignments}
39 \begin{function}{\inputassignment}
40 The |\inputassignment| macro can be used to input an assignment from another file. It
41 takes an optional KeyVal argument and a second argument which is a path to the file
42 containing the problem (the macro assumes that there is only one |assignment|
43 environment in the included file). The keys |number|, |title|, |type|, |given|, and
44 |due| are just as for the |assignment| environment and (if given) overwrite the ones
45 specified in the |assignment| environment in the included file.
46 \end{function}
47 \end{sfragment}
48
49 \begin{sfragment}{Typesetting Exams}
50
51 The \DescribeEnv{testheading}|\testheading| takes an optional keyword argument
52 where the keys \DescribeMacro{duration}|duration| specifies a string that specifies the
53 duration of the test, \DescribeMacro{min}|min| specifies the equivalent in number of
54 minutes, and \DescribeMacro{reqpts}|reqpts| the points that are required for a perfect
55 grade.
56
57 \begin{stexcode}
58 \title{320101 General Computer Science (Fall 2010)}
59 \begin{testheading}[duration=one hour,min=60,reqpts=27]
60 Good luck to all students!
61 \end{testheading}
62 \end{stexcode}
63
64 Will result in
65 \begin{center}
66 \begin{minipage}{.9\textwidth}
67 \makeatletter
68 %^^A\@problem{1.1}{4}{10}
69 %^^A\@problem{2.1}{4}{8}
70 %^^A\@problem{2.2}{6}{10}
71 %^^A\@problem{2.3}{6}{10}
72 %^^A\@problem{3.1}{4}{8}
73 %^^A\@problem{3.2}{4}{8}
74 %^^A\@problem{3.3}{2}{4}
75 \makeatother
76 \title{320101 General Computer Science (Fall 2010)}
77 \begin{testheading}[duration=one hour,min=60,reqpts=27]
78 good luck
79 \end{testheading}
80 \end{minipage}
81 \end{center}
82 \footnote{MK: The first three ``problems'' come from the stex examples above, how do we get rid
83 of this?}
84 \end{sfragment}
85
86 %%% Local Variables:
87 %%% mode: latex
88 %%% TeX-master: "../stex-manual"
89 %%% End:
90
91 % LocalWords: hwexam solutions,notes,hints,gnotes,pts,min gnotes testemptypage reqpts
92 % LocalWords: inputassignment reqpts hour,min 60,reqpts