source: palm/trunk/TUTORIAL/SOURCE/handoutWithNotes.sty @ 915

Last change on this file since 915 was 915, checked in by maronga, 12 years ago

added first LaTeX source code for the new tutorial

File size: 12.8 KB
Line 
1% Copyright 2009 by Guido Diepen <guido@guidodiepen.nl>
2%       Parts provided by Edson Valle
3%
4% This file may be distributed and/or modified
5%
6% 1. under the LaTeX Project Public License and/or
7% 2. under the GNU Public License.
8%
9% Changelog
10%       20091202 - Added "1 on 1 with notes" layout, provided by Harald Welte
11%       20091108 - Added "2 on 1 with notes landscape" layout, provided by Edson Valle
12%       20091104 - Added "3 on 1 with notes" layout
13%       20091104 - Added "2 on 1 with notes" layout
14%       20091104 - Added "1 on 1 with notes landscape" layout, provided by Edson Valle
15%   20090101 - Initial Version
16
17\RequirePackage{pgfpages}
18 \pgfpagesdeclarelayout{1 on 1 with notes landscape} {
19    \edef\pgfpageoptionheight{\the\paperwidth}
20    \edef\pgfpageoptionwidth{\the\paperheight}
21    \edef\pgfpageoptionborder{0pt}
22 }
23 {
24    \setkeys{pgfpagesuselayoutoption}{landscape}
25    \pgfpagesphysicalpageoptions
26    {%
27      logical pages=2,%
28      physical height=\pgfpageoptionheight,%
29      physical width=\pgfpageoptionwidth,%
30%      last logical shipout=3%
31      last logical shipout=1%
32    }
33   
34        \pgfpageslogicalpageoptions{1}
35        {%
36                scale=1.2,
37                center=\pgfpoint{.3\pgfphysicalwidth}{.5\pgfphysicalheight}%
38        }%
39
40       
41       
42        \pgfpageslogicalpageoptions{2}
43    {%
44      border shrink=\pgfpageoptionborder,%
45      resized width=.45\pgfphysicalwidth,%
46      resized height=.45\pgfphysicalheight,%
47      center=\pgfpoint{.78\pgfphysicalwidth}{.6\pgfphysicalheight},%
48      copy from=2
49    }%   
50
51    \AtBeginDocument{
52      \newbox\notesbox
53      \setbox\notesbox=\vbox{
54        \hsize=\paperwidth
55        \vskip-1in\hskip-1in\vbox{
56          \vskip1cm
57        Notes\vskip1cm
58        \hrule width\paperwidth\vskip1cm
59        \hrule width\paperwidth\vskip1cm
60        \hrule width\paperwidth\vskip1cm
61        \hrule width\paperwidth\vskip1cm
62        \hrule width\paperwidth\vskip1cm
63        \hrule width\paperwidth\vskip1cm
64        \hrule width\paperwidth\vskip1cm
65        \hrule width\paperwidth\vskip1cm
66        \hrule width\paperwidth\vskip1cm
67        \hrule width\paperwidth\vskip1cm
68        \hrule width\paperwidth\vskip1cm
69        \hrule width\paperwidth}
70      }
71      \pgfpagesshipoutlogicalpage{2}\copy\notesbox
72   
73     
74    }
75 }
76 
77 \pgfpagesdeclarelayout{4 on 1 with notes} {
78    \edef\pgfpageoptionheight{\the\paperheight}
79    \edef\pgfpageoptionwidth{\the\paperwidth}
80    \edef\pgfpageoptionborder{0pt}
81 }
82 {
83    \pgfpagesphysicalpageoptions
84    {%
85      logical pages=8,%
86      physical height=\pgfpageoptionheight,%
87      physical width=\pgfpageoptionwidth,%
88%      last logical shipout=3%
89      last logical shipout=4%
90    }
91   
92        \pgfpageslogicalpageoptions{1}
93        {%
94                scale=.70,
95                center=\pgfpoint{.25\pgfphysicalwidth}{.875\pgfphysicalheight}%
96        }%
97        \pgfpageslogicalpageoptions{2}
98        {%
99                scale=.70,
100                center=\pgfpoint{.25\pgfphysicalwidth}{.625\pgfphysicalheight}%
101        }%
102
103        \pgfpageslogicalpageoptions{3}
104        {%
105                scale=.70,
106                center=\pgfpoint{.25\pgfphysicalwidth}{.375\pgfphysicalheight}%
107        }%
108
109        \pgfpageslogicalpageoptions{4}
110        {%
111                scale=.70,
112                center=\pgfpoint{.25\pgfphysicalwidth}{.125\pgfphysicalheight}%
113        }%
114       
115       
116       
117       
118       
119       
120       
121       
122        \pgfpageslogicalpageoptions{5}
123    {%
124      border shrink=\pgfpageoptionborder,%
125      resized width=.5\pgfphysicalwidth,%
126      resized height=.3333\pgfphysicalheight,%
127      center=\pgfpoint{.75\pgfphysicalwidth}{.875\pgfphysicalheight},%
128      copy from=5
129    }%
130    \pgfpageslogicalpageoptions{6}
131    {%
132      border shrink=\pgfpageoptionborder,%
133      resized width=.5\pgfphysicalwidth,%
134      resized height=.3333\pgfphysicalheight,%
135      center=\pgfpoint{.75\pgfphysicalwidth}{.625\pgfphysicalheight},%
136      copy from=6
137    }%
138    \pgfpageslogicalpageoptions{7}
139    {%
140      border shrink=\pgfpageoptionborder,%
141      resized width=.5\pgfphysicalwidth,%
142      resized height=.3333\pgfphysicalheight,%
143      center=\pgfpoint{.75\pgfphysicalwidth}{.375\pgfphysicalheight},%
144      copy from=7
145    }%
146    \pgfpageslogicalpageoptions{8}
147    {%
148      border shrink=\pgfpageoptionborder,%
149      resized width=.5\pgfphysicalwidth,%
150      resized height=.3333\pgfphysicalheight,%
151      center=\pgfpoint{.75\pgfphysicalwidth}{.125\pgfphysicalheight},%
152      copy from=8
153    }%
154    \AtBeginDocument{
155      \newbox\notesbox
156      \setbox\notesbox=\vbox{
157        \hsize=\paperwidth
158        \vskip-1in\hskip-1in\vbox{
159          \vskip1cm
160        Notes\vskip1cm
161        \hrule width\paperwidth\vskip1cm
162        \hrule width\paperwidth\vskip1cm
163        \hrule width\paperwidth\vskip1cm
164        \hrule width\paperwidth\vskip1cm
165        \hrule width\paperwidth\vskip1cm
166        \hrule width\paperwidth\vskip1cm
167        \hrule width\paperwidth}
168      }
169      \pgfpagesshipoutlogicalpage{5}\copy\notesbox
170      \pgfpagesshipoutlogicalpage{6}\copy\notesbox
171      \pgfpagesshipoutlogicalpage{7}\copy\notesbox
172      \pgfpagesshipoutlogicalpage{8}\copy\notesbox
173    }
174 }
175
176
177
178 \pgfpagesdeclarelayout{2 on 1 with notes} {
179    \edef\pgfpageoptionheight{\the\paperheight}
180    \edef\pgfpageoptionwidth{\the\paperwidth}
181    \edef\pgfpageoptionborder{0pt}
182 }
183 {
184    \pgfpagesphysicalpageoptions
185    {%
186      logical pages=4,%
187      physical height=\pgfpageoptionheight,%
188      physical width=\pgfpageoptionwidth,%
189%      last logical shipout=3%
190      last logical shipout=2%
191    }
192   
193        \pgfpageslogicalpageoptions{1}
194        {%
195                scale=.70,
196                center=\pgfpoint{.25\pgfphysicalwidth}{.67\pgfphysicalheight}%
197        }%
198        \pgfpageslogicalpageoptions{2}
199        {%
200                scale=.70,
201                center=\pgfpoint{.25\pgfphysicalwidth}{.33\pgfphysicalheight}%
202        }%
203
204       
205        \pgfpageslogicalpageoptions{3}
206    {%
207      border shrink=\pgfpageoptionborder,%
208      resized width=.5\pgfphysicalwidth,%
209      resized height=.5\pgfphysicalheight,%
210      center=\pgfpoint{.75\pgfphysicalwidth}{.67\pgfphysicalheight},%
211      copy from=3
212    }%
213    \pgfpageslogicalpageoptions{4}
214    {%
215      border shrink=\pgfpageoptionborder,%
216      resized width=.5\pgfphysicalwidth,%
217      resized height=.5\pgfphysicalheight,%
218      center=\pgfpoint{.75\pgfphysicalwidth}{.33\pgfphysicalheight},%
219      copy from=4
220    }%
221   
222        \AtBeginDocument{
223      \newbox\notesbox
224      \setbox\notesbox=\vbox{
225        \hsize=\paperwidth
226        \vskip-1in\hskip-1in\vbox{
227          \vskip1cm
228        Notes\vskip1cm
229        \hrule width\paperwidth\vskip1cm
230        \hrule width\paperwidth\vskip1cm
231        \hrule width\paperwidth\vskip1cm
232        \hrule width\paperwidth\vskip1cm
233        \hrule width\paperwidth\vskip1cm
234        \hrule width\paperwidth\vskip1cm
235        \hrule width\paperwidth}
236      }
237      \pgfpagesshipoutlogicalpage{3}\copy\notesbox
238      \pgfpagesshipoutlogicalpage{4}\copy\notesbox
239    }
240 }
241
242
243 \pgfpagesdeclarelayout{3 on 1 with notes} {
244    \edef\pgfpageoptionheight{\the\paperheight}
245    \edef\pgfpageoptionwidth{\the\paperwidth}
246    \edef\pgfpageoptionborder{0pt}
247 }
248 {
249    \pgfpagesphysicalpageoptions
250    {%
251      logical pages=6,%
252      physical height=\pgfpageoptionheight,%
253      physical width=\pgfpageoptionwidth,%
254%      last logical shipout=3%
255      last logical shipout=3%
256    }
257   
258        \pgfpageslogicalpageoptions{1}
259        {%
260                scale=.70,
261                center=\pgfpoint{.25\pgfphysicalwidth}{.82\pgfphysicalheight}%
262        }%
263        \pgfpageslogicalpageoptions{2}
264        {%
265                scale=.70,
266                center=\pgfpoint{.25\pgfphysicalwidth}{.50\pgfphysicalheight}%
267        }%
268        \pgfpageslogicalpageoptions{3}
269        {%
270                scale=.70,
271                center=\pgfpoint{.25\pgfphysicalwidth}{.18\pgfphysicalheight}%
272        }%
273
274       
275        \pgfpageslogicalpageoptions{4}
276    {%
277      border shrink=\pgfpageoptionborder,%
278      resized width=.5\pgfphysicalwidth,%
279      resized height=.5\pgfphysicalheight,%
280      center=\pgfpoint{.75\pgfphysicalwidth}{.82\pgfphysicalheight},%
281      copy from=4
282    }%
283    \pgfpageslogicalpageoptions{5}
284    {%
285      border shrink=\pgfpageoptionborder,%
286      resized width=.5\pgfphysicalwidth,%
287      resized height=.5\pgfphysicalheight,%
288      center=\pgfpoint{.75\pgfphysicalwidth}{.50\pgfphysicalheight},%
289      copy from=5
290    }%
291    \pgfpageslogicalpageoptions{6}
292    {%
293      border shrink=\pgfpageoptionborder,%
294      resized width=.5\pgfphysicalwidth,%
295      resized height=.5\pgfphysicalheight,%
296      center=\pgfpoint{.75\pgfphysicalwidth}{.18\pgfphysicalheight},%
297      copy from=6
298    }%
299   
300        \AtBeginDocument{
301      \newbox\notesbox
302      \setbox\notesbox=\vbox{
303        \hsize=\paperwidth
304        \vskip-1in\hskip-1in\vbox{
305          \vskip1cm
306        Notes\vskip1cm
307        \hrule width\paperwidth\vskip1cm
308        \hrule width\paperwidth\vskip1cm
309        \hrule width\paperwidth\vskip1cm
310        \hrule width\paperwidth\vskip1cm
311        \hrule width\paperwidth\vskip1cm
312        \hrule width\paperwidth\vskip1cm
313        \hrule width\paperwidth}
314      }
315      \pgfpagesshipoutlogicalpage{4}\copy\notesbox
316      \pgfpagesshipoutlogicalpage{5}\copy\notesbox
317      \pgfpagesshipoutlogicalpage{6}\copy\notesbox
318    }
319 }
320
321
322
323
324
325 \pgfpagesdeclarelayout{2 on 1 with notes landscape} {
326    \edef\pgfpageoptionheight{\the\paperheight}
327    \edef\pgfpageoptionwidth{\the\paperwidth}
328    \edef\pgfpageoptionborder{0pt}
329 }
330 {
331    \setkeys{pgfpagesuselayoutoption}{landscape}
332    \pgfpagesphysicalpageoptions
333    {%
334      logical pages=4,%
335      physical height=\pgfpageoptionheight,%
336      physical width=\pgfpageoptionwidth,%
337%      last logical shipout=3%
338      last logical shipout=2%
339    }
340   
341        \pgfpageslogicalpageoptions{1}
342        {%
343                scale=1,
344                                center=\pgfpoint{.3\pgfphysicalwidth}{.75\pgfphysicalheight}%
345        }%
346        \pgfpageslogicalpageoptions{2}
347        {%
348                scale=1,
349                                center=\pgfpoint{.3\pgfphysicalwidth}{.25\pgfphysicalheight}%
350        }%
351
352   
353   
354    \pgfpageslogicalpageoptions{3}
355    {%
356      border shrink=\pgfpageoptionborder,%
357      resized width=.7\pgfphysicalwidth,%
358      resized height=.4\pgfphysicalheight,%
359      center=\pgfpoint{.75\pgfphysicalwidth}{.3\pgfphysicalheight},%
360      copy from=3
361    }%   
362   
363    \pgfpageslogicalpageoptions{4}
364    {%
365      border shrink=\pgfpageoptionborder,%
366      resized width=.7\pgfphysicalwidth,%
367      resized height=.4\pgfphysicalheight,%
368      center=\pgfpoint{.75\pgfphysicalwidth}{.8\pgfphysicalheight},%
369      copy from=4
370    }%
371
372    \AtBeginDocument{
373      \newbox\notesbox
374      \setbox\notesbox=\vbox{
375        \hsize=\paperwidth
376        \vskip-1in\hskip-1in\vbox{
377          \vskip1cm
378        Notes\vskip1cm
379        \hrule width\paperwidth\vskip1cm
380        \hrule width\paperwidth\vskip1cm
381        \hrule width\paperwidth\vskip1cm
382        \hrule width\paperwidth\vskip1cm
383        \hrule width\paperwidth\vskip1cm
384        \hrule width\paperwidth\vskip1cm
385    %\hrule width\paperwidth\vskip1cm
386    %\hrule width\paperwidth\vskip1cm
387        \hrule width\paperwidth\vskip1cm
388    \hrule width\paperwidth\vskip1cm
389    \hrule width\paperwidth\vskip1cm
390        \hrule width\paperwidth}
391      }
392                \pgfpagesshipoutlogicalpage{3}\copy\notesbox
393                \pgfpagesshipoutlogicalpage{4}\copy\notesbox
394 
395   
396    }
397 }
398
399
400
401  \pgfpagesdeclarelayout{1 on 1 with notes} {
402    \edef\pgfpageoptionheight{\the\paperwidth}
403    \edef\pgfpageoptionwidth{\the\paperheight}
404    \edef\pgfpageoptionborder{0pt}
405 }
406 {
407    \setkeys{pgfpagesuselayoutoption}{portrait}
408    \pgfpagesphysicalpageoptions
409    {%
410      logical pages=2,%
411      physical height=\pgfpageoptionheight,%
412      physical width=\pgfpageoptionwidth,%
413%      last logical shipout=3%
414      last logical shipout=1%
415    }
416   
417        \pgfpageslogicalpageoptions{1}
418        {%
419                scale=1.5,
420                center=\pgfpoint{.5\pgfphysicalwidth}{.73\pgfphysicalheight}%
421        }%
422
423       
424       
425        \pgfpageslogicalpageoptions{2}
426    {%
427      border shrink=\pgfpageoptionborder,%
428      resized width=\pgfphysicalwidth,%
429      resized height=\pgfphysicalheight,%
430      center=\pgfpoint{.5\pgfphysicalwidth}{.25\pgfphysicalheight},%
431      copy from=2
432    }%   
433
434    \AtBeginDocument{
435      \newbox\notesbox
436      \setbox\notesbox=\vbox{
437        \hsize=.85\paperwidth
438        \vskip-1in\hskip-1in\vbox{
439          \vskip1cm
440        Notes\vskip5mm
441        \hrule width\paperwidth\vskip5mm
442        \hrule width\paperwidth\vskip5mm
443        \hrule width\paperwidth\vskip5mm
444        \hrule width\paperwidth\vskip5mm
445        \hrule width\paperwidth\vskip5mm
446        \hrule width\paperwidth\vskip5mm
447        \hrule width\paperwidth\vskip5mm
448        \hrule width\paperwidth\vskip5mm
449        \hrule width\paperwidth\vskip5mm
450        \hrule width\paperwidth\vskip5mm
451        \hrule width\paperwidth\vskip5mm
452        \hrule width\paperwidth\vskip5mm
453        \hrule width\paperwidth\vskip5mm
454        \hrule width\paperwidth\vskip5mm
455        \hrule width\paperwidth}
456      }
457      \pgfpagesshipoutlogicalpage{2}\copy\notesbox
458   
459     
460    }
461 }
462
463
464
465
466
Note: See TracBrowser for help on using the repository browser.