Debian Codegraph @

texmf-dist/doc/generic/lecturer/LecturerDemo-Mondrian.tex

raw
1 % This is a demonstration file distributed with the
2 % Lecturer package (see lecturer-doc.pdf).
3 %
4 % You can recompile the file with a basic TeX implementation,
5 % using pdfTeX or LuaTeX with the plain format.
6 %
7 % The reusable part ends somewhere around line 150.
8 %
9 % Author: Paul Isambert.
10 % Date: July 2010.
11
12 \input lecturer
13
14 %\showgrid{1cm}
15
16 \setparameter job:
17 fullscreen = true
18 font = \mainfont
19
20 \setparameter slide:
21 width height = 12cm
22 top = 0cm
23 bottom = 3cm
24 left = 5cm
25 right = 1.6cm
26 topskip = 0pt
27 background = black % For the lines between squares.
28 foreground = white
29 vpos = center
30 hpos = ff
31
32 \setarea{area1 area2 matharea}
33 width = 3cm
34
35 \setarea{area1 area2}
36 height = 4.3cm
37 background = white
38
39 \setarea{area2}
40 vshift = 4.7cm
41
42 \setarea{matharea footnotearea}
43 height = 2.6cm
44 vshift* = 0pt
45 topskip = .1cm
46 baselineskip = .333cm
47 vpos = center
48
49 \setarea{matharea}
50 background = blue
51 foreground = white
52 hpos = rr
53
54 % Below the slide's text.
55 \setarea{mainarea}
56 hshift = 3.4cm
57 hshift* = 0pt
58 height = 9cm
59 background = red
60
61 \setarea{footnotearea}
62 hshift = 3.4cm
63 hshift* = 1.8cm
64 left right = .3cm
65 background = white
66 font = \footnotefont
67 hpos = ff
68
69 \setarea{area6 area7}
70 width = 1.4cm
71 hshift* = 0pt
72 height = 1.1cm
73
74 \setarea{area6}
75 vshift = 9.4cm
76 background = white
77
78 \setarea{area7}
79 vshift* = 0pt
80 background = yellow
81
82
83
84 \setparameter step:
85 vskip = \baselineskip
86
87 \setstep\emptystep
88 vskip = 0pt
89
90 % Used for the maths.
91 \def\mathstep#1 #2 #3{\emptystep[on=#1,off=#2]\position{matharea}[0pt,0pt]{$#3$}\ignorespaces}
92 \def\Mathstep#1 #2{\emptystep[off=#1,visible=true]\position{matharea}[0pt,0pt]{$#2$}\ignorespaces}
93
94 % The footnote. Since the same name is given
95 % to each footnote step, there must be at most
96 % one per slide. Otherwise, a name should be given
97 % manually (or automatically with a number in the name,
98 % and a counter to increment it on every footnote call).
99 \def\footnote#1{%
100 \showorhide{toggle=footnote}{\super{\usecolor{blue}{*}}}
101 \emptystep[footnote,on=]
102 \position{footnotearea}{\quitvmode\llap{* }#1}%
103 }
104
105 % On the last equation.
106 \newsymbol\cross[1.7em]{%
107 pen 0.1,
108 move 0 -.5, .5 .9, stroke,
109 move 0 .9, .5 -.5, stroke,
110 }
111 % Font for text.
112 \font\mainfont=cmss10
113 \font\supmainfont=cmss10 at 7.5pt
114 % Simple superscript (I'm not very good with
115 % math font family... I'm no mathematician after all).
116 \def\super#1{\raise.3em\hbox{\supmainfont#1}}
117 \font\footnotefont=cmss8 at 7pt
118 \mainfont
119 \frenchspacing
120
121 % Font for maths.
122 \font\mathfont=cmss12 at 16pt
123 \font\scriptmathfont=cmss12 at 10pt
124 \font\scriptscriptmathfont=cmss12 at 8pt
125 \textfont0=\mathfont
126 \scriptfont0=\scriptmathfont
127 \scriptscriptfont0=\scriptscriptmathfont
128 \font\mathfont=cmss12 at 16pt
129 \font\scriptmathfont=cmss12 at 12pt
130 \font\scriptscriptmathfont=cmss12 at 8pt
131 \textfont1=\mathfont
132 \scriptfont1=\scriptmathfont
133 \scriptscriptfont1=\scriptscriptmathfont
134 \font\Tensy=cmsy10 at 18pt
135 \font\scriptTensy=cmsy10 at 10pt
136 \font\scriptscriptTensy=cmsy10 at 8pt
137 \textfont2=\Tensy
138 \scriptfont2=\scriptTensy
139 \scriptscriptfont2=\scriptscriptTensy
140 \font\Tenex=cmex10 at 18pt
141 \font\scriptTenex=cmex10 at 12pt
142 \font\scriptscriptTenex=cmex10 at 8pt
143 \textfont3=\Tenex
144 \scriptfont3=\scriptTenex
145 \scriptscriptfont3=\scriptscriptTenex
146
147
148
149 % \endinput
150 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
151 % %
152 % UNCOMMENT THE PREVIOUS LINE TO USE THIS FILE AS A TEMPLATE, %
153 % OR REMOVE EVERYTHING BELOW. %
154 % %
155 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
156
157
158
159
160 \slide[A simple assumption]
161
162 \mathstep A B {{a\over b}=\sqrt2}
163 \mathstep B C {({a\over b})^2=2}
164 \mathstep C D {{a^2\over b^2}=2}
165 \mathstep D {} {a^2=2b^2}
166
167 \step Some say the square root of 2 isn't rational.
168 \step Suppose it were.
169
170 \step[A] Then we could write it as this, where a and b are
171 integers without a common factor.%
172 \footnote{%
173 Suppose c/d is a rational number. If c and d have no common
174 factor, then a=b and b=d. If they have a common factor,
175 divide both by their greatest common divisor. The result
176 is a/b, with no common factor.}
177
178 \step[B] But then we can also write this.
179 \step[C] And this.
180 \step[D] And finally this.
181 \step Which means that a\super2 is even.
182
183 \endslide
184
185
186
187 \slide[Its consequences]
188
189 \Mathstep A {a^2=2b^2}
190 \mathstep A B {(2k)^2=2b^2}
191 \mathstep B C {4k^2=2b^2}
192 \mathstep C D {2k^2=b^2}
193
194 \step[visible=true] So what?
195 \step So a is even. Because only even numbers produce even squares.%
196 \footnote{%
197 An even number, by definition, is expressible
198 in the form 2k, where k is any integer.
199 On the other hand, an odd number is expressible
200 by 2k+1. Thus the square of an odd number is
201 (2k+1)\super2, i.e. 4k\super2+4k+1, i.e.
202 2x2(k\super2+k)+1, which is of the form 2k+1,
203 with 2(k\super2+k) as k.
204 Hence, an odd number produces an odd square,
205 and thus if a square is even its root is even too.}
206
207 \step[A] Being even means being expressible in the form 2k, where k is
208 any integer.
209 \step[B] And (2k)\super2 square gives 4k\super2.
210
211 \step[C] Let's simplify.
212 \step Thus b\super2 is even.
213 \step And b is too.
214
215 \endslide
216
217
218
219 \slide[The problem]
220
221 \Mathstep A {{a\over b}=\sqrt2}
222 \mathstep A {} {\rlap\cross{a\over b}=\sqrt2}
223
224 \step[visible=true] And but so we said a and b have no common factor.
225
226 \step If both are even they do have a common factor: 2.
227 \step Which is absurd.
228
229 \step Thus, our basic assumption is false.
230 \step[A] There are no such a and b.
231
232 \step The square root of 2 is irrational.
233
234 \endslide
235
236 \bye