-
Notifications
You must be signed in to change notification settings - Fork 0
/
plickers4.tex
89 lines (83 loc) · 2.22 KB
/
plickers4.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
%%%%%%%%%%%%%%%%%%%%
% The Plickers cards available at
% https://assets.plickers.com/plickers-cards/PlickersCards_2up_LargeAnswers_1-40.pdf
% are here enlarged and tabbed for use in larger classrooms
%
% DIRECTIONS.
% Typeset twice to get positioning correct.
% Print single-sided on card stock,
% ==> change the color of the paper every 13 pages
% then cut out negative space around tabs.
% Tabs make it easy for students to find their
% Plickers card at beginning of each class
%%%%%%%%%%%%%%%%%%%%
\RequirePackage{luatex85}
\documentclass{article}
\usepackage[margin=0in]{geometry}
\usepackage{pdfpages, tikz, mathtools}
\setlength\parindent{0mm}
\usepackage{expl3}
\ExplSyntaxOn
\cs_new_eq:NN \Repeat \prg_replicate:nn
\ExplSyntaxOff
\begin{document}
\sf\bfseries
\newcounter{index}
\Repeat{63}{
\newpage
\stepcounter{index}
\pgfmathtruncatemacro\index{\arabic{index}}
\pgfmathtruncatemacro\position{mod(\index-1,13)}
\pgfmathtruncatemacro\page{floor((\index-1)/2)+1}
\pgfmathtruncatemacro\ones{mod(\index,10)}
\pgfmathtruncatemacro\tens{floor(\index/10)}
\def\zero{0}
\pgfmathtruncatemacro\odd{mod(\index,2)}
\ifnum\odd=1
\pgfmathtruncatemacro\bottom{160}
\pgfmathtruncatemacro\top{20}
\else
\pgfmathtruncatemacro\bottom{20}
\pgfmathtruncatemacro\top{160}
\fi
\begin{tikzpicture}
[scale=2.54, overlay, remember picture]
\foreach \angle in {0, 180}{
\draw[rotate=\angle]
(current page.center)
++({-8.5/2 + 1.65 + 0.4*(0.5+\position)},
11/2 - 0.6)
node[rotate=\angle, align=center,
text width=0.5/3.5, scale=3.5]
{\ifx\tens\zero\else\clap\tens\fi
\\[-1ex]\clap\ones}
++(0.4/2, 0.6)
coordinate
(corner);
\ifnum\position=12 % don't cut 13th, 26th, etc card
\else
\ifnum\index=63 % don't cut last (63rd) card
\else
\draw[rotate=\angle, dashed]
(current page.center)
++(8.5/2 - 1.65, 11/2 - 1.25)
rectangle
(corner);
\fi
\fi
}
\end{tikzpicture}
\begin{minipage}{11in}
\centering
\ifnum\index>40 %switch to extended card deck
\includepdf[pages=\page, height=8in, clip,
trim=58mm \bottom mm 58mm \top mm]
{plickers63.pdf}
\else
\includepdf[pages=\page, height=8in, clip,
trim=58mm \bottom mm 58mm \top mm]
{plickers40.pdf}
\fi
\end{minipage}
}
\end{document}