-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmarkup.sty
59 lines (49 loc) · 1.09 KB
/
markup.sty
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
\usepackage{zref-abspos}
\newcommand*{\SEP}[1]{
\zsaveposy{#1}
}
\newcommand\config[2]{
\SEP{config=#1=#2}
}
\ifdefined\qunlist
\let\oldqunlist\qunlist
\let\oldendqunlist\endqunlist
\renewenvironment{qunlist}{
\SEP{begin_questions}
\oldqunlist
\let\oldqns\qns
\renewcommand\qns{\SEP{new_question}\oldqns}
\newcommand\qpart{\SEP{new_part}}
}
{
\oldendqunlist
\SEP{end_questions}
}
\fi
\newenvironment{Choices}{
\SEP{begin_choices}
\newcommand{\TrueChoice}{\SEP{true_choice}}
\newcommand{\FalseChoice}{\SEP{false_choice}}
\newcommand{\Hint}{\SEP{hint}}
}{
\SEP{end_choices}
}
\newenvironment{Multi}{
\SEP{begin_multi}
\newcommand{\TrueChoice}{\SEP{true_choice}}
\newcommand{\FalseChoice}{\SEP{false_choice}}
\newcommand{\Hint}{\SEP{hint}}
}{
\SEP{end_multi}
}
\newenvironment{Freeform}[1]{
\SEP{begin_freeform}
\SEP{ans_equals@#1}
\newcommand{\Hint}{\SEP{hint}}
}{
\SEP{end_freeform}
}
\let\olddocument\document
\renewcommand\document{\olddocument\SEP{begin_document}}
\let\oldenddocument\enddocument
\renewcommand\enddocument{\SEP{end_document}\oldenddocument}