-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.tex
More file actions
100 lines (86 loc) · 2.58 KB
/
example.tex
File metadata and controls
100 lines (86 loc) · 2.58 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
\documentclass[10pt]{article}
\usepackage{MathCloze}
% some user macros:
\newcommand{\CC}{\mathbb{C}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\ZZ}{\mathbb{Z}}
% use \def instead of \renewcommand
\def\phi{\varphi}
% DeclareMathOperator should also work
\DeclareMathOperator{\Mat}{Mat}
\begin{document}
\begin{note}{mydeck-0001}
\field Title of Card 1
\field
This is a \cloze{1}cloze\clend\
deletion test. You can have several \cloze{2}clozes\clend\ on the same card.
In the pdf and html previews, they get displayed in different colours.
You can also define a \cloze{3}cloze with a hint\hint hint\clend.
\field
You can display some additional info on the back of the card.
\field Test Chapter
\field Example
\field 01
\end{note}
\begin{note}{mydeck-0002}
\field Preimage
\field
A \textbf{preimage} of an element \(b \in B\) under a map \(f\colon A\to B\) is \cloze{1}an element \(a\in A\) with \(f(a) = b\).\hint (think of an element in \(A\))\clend
\field
\field Set Theory
\field definition
\field 05
\end{note}
\begin{note}{mydeck-0003}
\field
User macros
\field
User \cloze{1}marcos\clend\ get expanded by plastex: \(\RR\), \(\CC\)
\field
\field Test Chapter
\field Example
\field 02
\end{note}
\begin{note}{mydeck-0004}
\field
Tables
\field
LaTeX tabulars get converted to html tables:
\cloze{1}
\begin{center}
\begin{tabular}{ll}
\(a\) & \(b\) \\
\(c\) & \(d\)
\end{tabular}
\end{center}
\clend
\field
\field Test Chapter
\field Example
\field 02
\end{note}
\begin{note}{mydeck-0005}
\field
Aligned equations
\field
Aligned equations that contain cloze deletions are best simulated using tabulars:
\begin{center}
\begin{tabular}{rcl}
& & \cloze{1} \(f(\vec v_1, \dots, \vec v_{i-1}, \vec v_i + \vec v_i' , \vec v_{i+1},\dots, \vec v_n)\) \clend \\
& & \(=\) \cloze{2} \(\begin{aligned}
& f(\vec v_1, \dots, \vec v_{i-1}, \quad\vec v_i\quad, \vec v_{i+1},\dots, \vec v_n)
\\
+\,
& f(\vec v_1, \dots, \vec v_{i-1}, \quad\vec v_i'\quad , \vec v_{i+1},\dots, \vec v_n)
\end{aligned}\) \clend \\
~\\
& & \cloze{3} \(f(\vec v_1, \dots, \vec v_{i-1}, s\vec v_i , \vec v_{i+1},\dots, \vec v_n)\) \clend \\
& = & \cloze{4} \(s \cdot f(\vec v_1, \dots, \vec v_{i-1}, \phantom{s} \vec v_i, \vec v_{i+1},\dots, \vec v_n)\) \clend
\end{tabular}
\end{center}
\field
\field Test Chapter
\field Example
\field 03
\end{note}
\end{document}