-
Notifications
You must be signed in to change notification settings - Fork 0
/
calc56-ff'f''.tex
100 lines (93 loc) · 2.79 KB
/
calc56-ff'f''.tex
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
100
%%%%%%%%%%%%%%%%%%%%
% DIRECTIONS.
% Print p1 only,
% OR print shortend-duplex & cut in half
%%%%%%%%%%%%%%%%%%%%
\RequirePackage{luatex85}
\documentclass[answers]{exam}
\usepackage[margin=0.5in, two column, column sep=1in, landscape]{geometry}
\usepackage{tikz, amsmath, multicol}
\usepackage{mathabx} %% makes \cup shallower
\setlength\fillinlinelength{0.45in}
\setlength\answerclearance{1.5ex}
\setlength\parindent{0ex}
\CorrectChoiceEmphasis{\bfseries\Large}
\thispagestyle{empty}
\pagestyle{empty}
%% DEFINE \Repeat{n}{content}
\usepackage{expl3}
\ExplSyntaxOn
\cs_new_eq:NN \Repeat \prg_replicate:nn
\ExplSyntaxOff
\newcommand\bc{\text{\!\!\scalebox{0.5}{because}\!\!}}
\newcommand\rowheader[2]{\smash{\begin{matrix}\scalebox{0.5}{\tikz\node[rotate=90, text width=#1]{#2};}\end{matrix}}\!}
\newcommand\content[3]{
\par\bigskip\medskip
\question
\(\begin{matrix}\begin{tikzpicture}[scale=1, very thick]
%% #1 = 0 (f above xaxis) or 1 (f below xaxis)
%% #2 = 0 (f increasing) or 1 (f decreasing)
%% #3 = 0 (f concave up) or 1 (f concave down)
\draw[->] (-1,-1+2*#1) -- ++(right:2);
\draw[->] (0,-1.3) -- ++(up:2.6);
\draw ({-0.6*(1-#3*2)*(1-#2*2)}, {-0.6*(1-#3*2)}) arc
[start angle=-70*(1-#2*2), end angle=-20*(1-#2*2),
radius={2cm*(1-#3*2)*(1-#2*2)}]
node[right, pos={0.5+0.5*(1-#3*2)*(1-#2*2)}, inner sep=0ex] {$f$};
\end{tikzpicture}\end{matrix}\)
\hfill
%% \exonecolor = black (display ans ex1) or white (hide ans ex1)
\(\begin{matrix}
\rowheader{16mm}{Above\\[-1ex] $x$-axis? \\ Below?} &
f \fillin[\color\exonecolor$>0$]\\[2.5ex]
\rowheader{25mm}{Increasing? \\[-0.5ex] Decreasing?} &
f \fillin[\color\exonecolor$\searrow$] &\bc& f' \fillin[\color\exonecolor$<0$]\\[2.5ex]
\rowheader{29mm}{Concavity?} &
f \fillin[\color\exonecolor$\cup$] &\bc& f' \fillin[\color\exonecolor$\nearrow$] &\bc& f'' \fillin[\color\exonecolor$>0$]
\end{matrix}\)
}
\newcommand\directions{\fullwidth{%
Fill in the blanks for each snippet with: \\[0.8ex]
\fillin[$>\!0$] (is positive), \qquad \fillin[$<\!0$] (is negative), \\[0.8ex]
\fillin[$\nearrow$] (is increasing), \qquad \fillin[$\searrow$] (is decreasing), \\[0.8ex]
\fillin[$\cup$] (is concave up), \qquad \fillin[$\cap$] (is concave down).
}}
\begin{document}
\begin{questions}
\Large\boldmath\sf
\Repeat{2}{
\setcounter{question}0
\directions
\vfill
\def\exonecolor{black} \content010
\def\exonecolor{white} \content001
\content110
\content101
\newpage
$~$\par\vfill
\content000
\content011
\content100
\content111
\newpage
}
\Repeat{2}{
\setcounter{question}0
\directions
\vfill
\def\exonecolor{white} \content010
\content001
\content110
\content101
\newpage
\directions
\vfill
\content000
\content011
\content100
\content111
\newpage
}
\end{questions}
\end{document}
NOTE. \fillin inside \tikzcd inside \newcommand breaks