Debian Codegraph @

texmf-dist/source/latex/handoutwithnotes/handoutWithNotes.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2009–2018 by Guido Diepen <[email protected]>
4 % Parts provided by Edson Valle
5 % Copyright (C) 2021–2022 Marei Peischl <[email protected]>
6 % ---------------------------------------------------------------------------
7 % This work may be distributed and/or modified under the
8 % conditions of the LaTeX Project Public License, either version 1.3c
9 % of this license or (at your option) any later version.
10 % The latest version of this license is in
11 % http://www.latex-project.org/lppl.txt
12 % and version 1.3c or later is part of all distributions of LaTeX
13 % version 2008/05/04 or later.
14 %
15 % This work has the LPPL maintenance status `maintained'.
16 %
17 % The Current Maintainers of this work are
18 % Marei Peischl <[email protected]>
19 % Guido Diepen <[email protected]>
20 %
21 % The development respository can be found at
22 % https://github.com/gdiepen/latexbeamer-handoutWithNotes
23 % Please use the issue tracker for feedback!
24 %
25 % This work consists of the files handoutWithNotes.dtx and handoutWithNotes.ins
26 % and the derived filebase handoutWithNotes.sty.
27 %
28 % \fi
29 %
30 % \iffalse
31 %<*driver>
32 \ProvidesFile{handoutWithNotes.dtx}
33 %</driver>
34 %<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
35 %<package>\ProvidesPackage{handoutWithNotes}
36 %<*package>
37 [2022/02/22 v1.3 pgfpages layouts to print beamer slides with notes]
38 %</package>
39 %
40 %<*driver>
41 \documentclass{l3doc}
42 \usepackage{tikz}
43 \usepackage{handoutWithNotes}
44 \EnableCrossrefs
45 \CodelineIndex
46 \RecordChanges
47 \DisableImplementation
48
49 \begin{document}
50 \ExplSyntaxOn
51 \begingroup
52 \def\pgfpageoptionwidth{16cm}
53 \def\pgfpageoptionheight{9cm}
54 \def\pgfpageoptionborder{5mm}
55 \def\paperwidth{\pgfpageoptionwidth}
56 \cs_set:Nn \__handoutWithNotes_pageheight: {\pgfpageoptionheight}
57 \use:c {__handoutWithNotes@initNotesBox} {0}
58 \hbox_gset_to_wd:Nnn \g_handoutWithNotes_notes_box {\box_wd:N \g_handoutWithNotes_notes_box} {\hspace*{1in-\parindent}\vbox{\unvbox\g_handoutWithNotes_notes_box}\hss}
59 \endgroup
60 \ExplSyntaxOff
61 \DocInput{handoutWithNotes.dtx}
62 \PrintChanges
63 \end{document}
64 %</driver>
65 % \fi
66 %
67 % \CheckSum{592}
68 %
69 % \CharacterTable
70 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
71 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
72 % Digits \0\1\2\3\4\5\6\7\8\9
73 % Exclamation \! Double quote \" Hash (number) \#
74 % Dollar \$ Percent \% Ampersand \&
75 % Acute accent \' Left paren \( Right paren \)
76 % Asterisk \* Plus \+ Comma \,
77 % Minus \- Point \. Solidus \/
78 % Colon \: Semicolon \; Less than \<
79 % Equals \= Greater than \> Question mark \?
80 % Commercial at \@ Left bracket \[ Backslash \\
81 % Right bracket \] Circumflex \^ Underscore \_
82 % Grave accent \` Left brace \{ Vertical bar \|
83 % Right brace \} Tilde \~}
84 %
85 %
86 % \changes{1.1}{2021/11/07}{Converted to use l3build}
87 % \changes{1.1}{2021/11/07}{Add PDF documentation}
88 %
89 % \providecommand*{\url}{\texttt}
90 % \providecommand*\hook[1]{\texttt{#1}}
91 % \GetFileInfo{handoutWithNotes.dtx}
92 % \title{The \textsf{handoutWithNotes} package}
93 % \author{Guido Diepen <[email protected]> \and Marei Peischl <[email protected]>}
94 % \date{\fileversion (\filedate)}
95 %
96 % \maketitle
97 % \begin{documentation}
98 % \begin{abstract}
99 % This package provides page layouts based on \pkg{pagepages} to allow users to create printable handouts with note pages for their \pkg{beamer} presentation.
100 %
101 % It allows to place ruled note pages for handwritten notes or include beamers note pages directly.
102 % \end{abstract}
103 % \section{Quickstart}
104 % \label{sec:quickstart}
105 % \pkg{handoutWithNotes} only defines pgfpages layout. The users have to activate it afterwards.
106 % A minimal example to use the package would like the following listing:
107 % \begin{verbatim}
108 % \documentclass{beamer}
109 % \usepackage{handoutWithNotes}% load the package
110 % \pgfpagesuselayout{3 on 1 with notes}% select the layout
111 % \begin{document}
112 % Place your beamer content in here
113 % \end{document}
114 % \end{verbatim}
115 % Without additional options the paper size will stay the same in contrast to the document without using \pkg{handoutWithNotes}.
116 % In most cases a printable layout might be more usefull and some margin might also be nice.
117 % This can be achieved by using \pkg{pgfpages} options:
118 % \begin{verbatim}
119 % \pgfpagesuselayout{3 on 1 with notes}[a4paper,border shrink=5mm]
120 % \end{verbatim}
121 % To see all available options have a look at the \pkg{pgfpages} part of the pgf manual \cite{pgfpages}.
122 %
123 % \section{Package options}
124 % \pkg{handoutWithNotes} support package options to modify the note boxes.
125 % There are some general options but also others which depend on the setting to use handwritten or beamer notes.
126 %
127 % \DescribeOption{slide-frame}
128 % \DescribeOption{note-frame}
129 % By default the scaled pages are not framed. Depending on the beamer layout it might be usefull to add a frame around the slides. This can be done by the two booleans options \cs{slide-frame} and \cs{note-frame}.
130 %
131 % \subsection{Handwritten notes}
132 % By default the note box consists of 8 lines for handwritten notes.
133 % Beamer notes are ignored.
134 %
135 % \DescribeOption{lines} The \cs{lines} option accepts an integer value. It can be zero. The space between the lines will be filled. The size of the box will not change.
136 %
137 % \changes{1.1}{2021/11/07}{Add support for graph ruled paper}
138 % \DescribeOption{graph} The \cs{graph} option allows to switch from the ruled boxes to a graph ruled box layout. Here the scaling is done differently, because it might be usefull to select the size of the resulting grid manually. In case a boolean value is used for this opton it will simply switch between ruled and graph ruled paper layouts. The default grid size is 5mm. To change this size \cs{graph} also can accept dimen values like \cs{graph=1cm}. This size will be the resulting size. Conversion and scaling is done automatically.
139 %
140 % \DescribeOption{rule} The \cs{rule} option can be used to adjust the thickness of drawing for graph ruled paper. Please pay attention that this value depends on the scaling.
141 %
142 % \subsection{Beamer notes}
143 % \DescribeOption{beamer-notes} The \cs{beamer-notes} option allows to use \pkg{beamer}s note pages directly.
144 % It's a boolean option which uses “true” if no value is given.
145 % Have a look at the \pkg{beamer} documentation for guidance on how to use it \cite{beameruserguide}.
146 % The template for these slides will be set to plain automatically to leave as much as space as possible for the notes.
147 % This option will also set beamers mode to handout to ensure the order of the note pages and the slides will match.
148 % Scaling will be identical to the content slide.
149 %
150 % \section{Customization}
151 % \subsection{Title}
152 % The package useds the translator package \cite{translator} (as it's beamer's default) to translate the title of the notes box.
153 % By default \pkg{handoutWithNotes} supports English, German and French.
154 % Additional languages can be added by using a similar structure.
155 % \begin{verbatim}
156 % \providetranslation[to=English]{Notes}{Notes}
157 % \providetranslation[to=German]{Notes}{Notizen}
158 % \providetranslation[to=French]{Notes}{Notes}
159 % \end{verbatim}
160 %
161 % \subsection{Hooks}
162 % \pkg{handoutWithNotes} provides hooks to add \LaTeX-Code to be executed in specific positions while creating the notes box.
163 % These hooks only are available with the ruled or graph ruled boxes. To modify the layout of the layout of the beamer note pages use beamer templates \cite{beameruserguide}.
164 % The implementation is based on the kernels hook management for details have a look at the corresponding documentation \cite{lthooks-doc}.
165 %
166 % \begin{description}
167 % \item[\hook{handoutWithNotes/notesbox}]
168 % This hook will be executed at the beginning of each notsbox. One can use it to change color or add font modifications.
169 % \item[\hook{handoutWithNotes/notesbox/title}]
170 % This hook will be used right before the title of the notes box is typeset. It's inside a group including only the title. This will (except if global changes are enforced) not affect the box content.
171 % \item[\hook{handoutWithNotes/notesbox/content}]
172 % This hook is added after the Title. It can be used to add text or additional layout options. It's executed in inner vertical mode. For horizontal content there might be some adjustments necessary.
173 % \end{description}
174 %
175 % \section{Layouts provided by this package}
176 % This section shows scaled drafts of the layouts provided by \pkg{handoutsWithNotes}.
177 % The illustration is using a4paper a 16:9 aspect ration for the slides and a border shrink of 5mm as described in \ref{sec:quickstart}.
178 % \begin{itemize}
179 % \item 1 on 1 with notes landscape\par\nopagebreak
180 % \ExplSyntaxOn
181 % \box_resize_to_wd:Nn \g_handoutWithNotes_notes_box {\dimexpr.5\paperheight-1cm}
182 % \cs_new:Nn \print_demo_slide_and_layout:nnn {
183 % \node[anchor=west,fill=blue!15,inner~sep=0pt,minimum~height=\dim_eval:n {\box_ht:N \g_handoutWithNotes_notes_box},minimum~width=\dim_eval:n {\box_wd:N \g_handoutWithNotes_notes_box}] at (.5,#1) {\Huge Slide~#2};
184 % \node[anchor=east,inner~sep=5mm] at (#3,#1) {\box_use:N \g_handoutWithNotes_notes_box};
185 % }
186 % \noindent\resizebox{\linewidth}{!}{%
187 % \begin{tikzpicture}
188 % \draw(0,-.5\paperwidth)rectangle(\paperheight,.5\paperwidth);
189 % \print_demo_slide_and_layout:nnn {0} {} {\paperheight}
190 % \end{tikzpicture}
191 % }
192 % \ExplSyntaxOff
193 % \item 2 on 1 with notes landscape\par\nopagebreak
194 % \ExplSyntaxOn
195 % \resizebox{\linewidth}{!}{%
196 % \begin{tikzpicture}
197 % \draw(0,-.5\paperwidth)rectangle(\paperheight,.5\paperwidth);
198 % \print_demo_slide_and_layout:nnn {.25\paperwidth} {1} {\paperheight}
199 % \print_demo_slide_and_layout:nnn {-.25\paperwidth} {2} {\paperheight}
200 % \end{tikzpicture}
201 % }
202 % \ExplSyntaxOff
203 % \item 1 on 1 with notes\par\nopagebreak
204 % \ExplSyntaxOn
205 % \box_resize_to_wd:Nn \g_handoutWithNotes_notes_box {\dimexpr\paperwidth-1cm}
206 % \centerline{
207 % \resizebox{.5\linewidth}{!}{%
208 % \begin{tikzpicture}
209 % \draw(0,-.5\paperheight)rectangle(\paperwidth,.5\paperheight);
210 % \node[anchor=west,fill=blue!15,inner~sep=0pt,minimum~height=\dim_eval:n {\box_ht:N \g_handoutWithNotes_notes_box},minimum~width=\dim_eval:n {\box_wd:N \g_handoutWithNotes_notes_box}] at (.5,.25\paperheight) {\Huge Slide};
211 % \node[anchor=east,inner~sep=5mm] at (\paperwidth,-.25\paperheight) {\box_use:N \g_handoutWithNotes_notes_box};
212 % \end{tikzpicture}
213 % }
214 % }
215 % \ExplSyntaxOff
216 % \item 2 on 1 with notes\par\nopagebreak
217 % \ExplSyntaxOn
218 % \box_resize_to_wd:Nn \g_handoutWithNotes_notes_box {\dimexpr.5\paperwidth-1cm}
219 % \centerline{
220 % \noindent\resizebox{.5\linewidth}{!}{%
221 % \begin{tikzpicture}
222 % \draw(0,-.5\paperheight)rectangle(\paperwidth,.5\paperheight);
223 % \print_demo_slide_and_layout:nnn {.25\paperheight} {1} {\paperwidth}
224 % \print_demo_slide_and_layout:nnn {-.25\paperheight} {2} {\paperwidth}
225 % \end{tikzpicture}
226 % }
227 % }
228 % \ExplSyntaxOff
229 % \item 3 on 1 with notes\par\nopagebreak
230 % \ExplSyntaxOn
231 % \centerline{
232 % \noindent\resizebox{.5\linewidth}{!}{%
233 % \begin{tikzpicture}
234 % \draw(0,-.5\paperheight)rectangle(\paperwidth,.5\paperheight);
235 % \print_demo_slide_and_layout:nnn {.33\paperheight} {1} {\paperwidth}
236 % \print_demo_slide_and_layout:nnn {0} {2} {\paperwidth}
237 % \print_demo_slide_and_layout:nnn {-.33\paperheight} {3} {\paperwidth}
238 % \end{tikzpicture}
239 % }
240 % }
241 % \ExplSyntaxOff
242 % \item 4 on 1 with notes\par\nopagebreak
243 % \ExplSyntaxOn
244 % \centerline{
245 % \box_resize_to_wd:Nn \g_handoutWithNotes_notes_box {\dimexpr.5\paperwidth-1cm}
246 % \noindent\resizebox{.5\linewidth}{!}{%
247 % \begin{tikzpicture}
248 % \draw(0,-.5\paperheight)rectangle(\paperwidth,.5\paperheight);
249 % \print_demo_slide_and_layout:nnn {.375\paperheight} {1} {\paperwidth}
250 % \print_demo_slide_and_layout:nnn {.125\paperheight} {2} {\paperwidth}
251 % \print_demo_slide_and_layout:nnn {-.125\paperheight} {3} {\paperwidth}
252 % \print_demo_slide_and_layout:nnn {-.375\paperheight} {4} {\paperwidth}
253 % \end{tikzpicture}
254 % }
255 % }
256 % \ExplSyntaxOff
257 % \end{itemize}
258 %
259 % \begin{thebibliography}{1}
260 % \bibitem{pgfpages} Till Tantau. TikZ \& PGF, Manual for Version 3.1.9a. 2021-05-15. \url{http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf}
261 % \bibitem{beameruserguide} Till Tantau, Joseph Wright, Vedran Miletić. The beamer class, User Guide for version 3.64. 2021-10-19. \url{http://mirrors.ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf}
262 % \bibitem{translator} Joseph Wright. translator – Easy translation of strings in \LaTeX, v1.12d. 2021-05-31. \url{http://mirrors.ctan.org/macros/latex/contrib/translator/translator.pdf}
263 % \bibitem{lthooks-doc} Franz Mittelbach. The lthooks package, v1.0n. 2021-06-15. \url{http://mirrors.ctan.org/macros/latex/base/lthooks-doc.pdf}
264 % \end{thebibliography}
265 %
266 % \end{documentation}
267 % \begin{implementation}
268 % \section{Implementation}
269 % \begin{macrocode}
270 %<*package>
271 % \end{macrocode}
272 %
273 % \begin{macrocode}
274 %<@@=handoutWithNotes>
275 % \end{macrocode}
276 % \begin{macrocode}
277 \ProvidesPackage{handoutWithNotes}[2022/02/02 v1.2
278 pgfpages layouts to print beamer slides with notes]
279 \RequirePackage{l3keys2e}
280 \ExplSyntaxOn
281 \dim_new:N \g_handoutWithNotes_gridsize_dim
282 \dim_gset:Nn \g_handoutWithNotes_gridsize_dim {5mm}
283 \keys_define:nn {handoutWithNotes} {
284 slide-frame .bool_gset:N = \g_handoutWithNotes_print_slide_frame_bool,
285 slide-frame .initial:n = false,
286 slide-frame .default:n = true,
287 note-frame .bool_gset:N = \g_handoutWithNotes_print_note_frame_bool,
288 note-frame .initial:n = false,
289 note-frame .default:n = true,
290 beamer-notes .bool_gset:N = \g_handoutWithNotes_beamer_notes_bool,
291 beamer-notes .initial:n = false,
292 beamer-notes .default:n = true,
293 lines .int_gset:N = \g_handoutWithNotes_lines_int,
294 lines .initial:n = 8,
295 rule .dim_gset:N = \g_handoutWithNotes_rule_dim,
296 rule .initial:n = \fboxrule,
297 graph .bool_gset:N = \g_handoutWithNotes_graph_bool,
298 graph .default:n = true,
299 graph .initial:n = false,
300 graph / unknown .code:n = \bool_gset:N \g_handoutWithNotes_graph_bool
301 \dim_gset:Nn \g_handoutWithNotes_gridsize_dim {#1},
302 }
303 \ProcessKeysOptions{handoutWithNotes}
304 % \end{macrocode}
305 %
306 % \begin{macro}{\handoutWithNotes@@@@conditionalFrame}
307 % \begin{macrocode}
308 \newcommand*{\handoutWithNotes@@@@conditionalFrame}[1]{
309 \bool_if:cT {g_handoutWithNotes_print_#1_frame_bool} {\pgfusepath{stroke}}
310 }
311 % \end{macrocode}
312 % \end{macro}
313 %
314 % \begin{macrocode}
315 \ExplSyntaxOff
316 \RequirePackage{pgfpages}
317 \RequirePackage{translator}
318 \providetranslation[to=English]{Notes}{Notes}
319 \providetranslation[to=German]{Notes}{Notizen}
320 \providetranslation[to=French]{Notes}{Notes}
321 \ExplSyntaxOn
322 % \end{macrocode}
323 % \changes{1.2}{2022/02/02}{Add support for dvipspdf workflows}
324 % \begin{macrocode}
325 \sys_if_output_dvi:TF {
326 \cs_set:Nn \@@_pageheight: {\paperheight}
327 }{
328 \cs_if_exist:NTF \pageheight {
329 \cs_set:Nn \@@_pageheight: {\pageheight}
330 } {
331 \cs_set:Nn \@@_pageheight: {\pdfpageheight}
332 }
333 }
334 \box_new:N \g_handoutWithNotes_notes_box
335 \tl_new:N \l_handoutWithNotes_title_tl
336 \hook_new:n {handoutWithNotes/notesbox}
337 \hook_new:n {handoutWithNotes/notesbox/title}
338 \hook_new:n {handoutWithNotes/notesbox/content}
339 \dim_new:N \l_handoutWithNotes_notes_dim
340 \dim_new:N \l_handoutWithNotes_scaled_gridsize_dim
341 % \end{macrocode}
342 %
343 % \begin{macro}{\@@@initNotesBox}
344 % \begin{macrocode}
345 \newcommand{\@@@initNotesBox}[1]{
346 \bool_if:NTF \g_handoutWithNotes_beamer_notes_bool {
347 \beamer@twoscreensnotestrue
348 \setbeameroption{show~notes}
349 \gdef\beamer@currentmode{handout}
350 \setbeamertemplate{note~page}[plain]
351 \let\beamer@outsideframenote
352 \@@@beamer@outsideframenote
353 \msg_new:nnn {handoutWithNotes} {patch-beamer@outsideframenote}
354 {I~am~patching~the~note~mechanism~to~be~able~to~place
355 ~multiple~note~pages~on~one~physical~page.}
356 \msg_info:nn {handoutWithNotes} {patch-beamer@outsideframenote}
357 }{
358 \dim_set:Nn \l_tmpa_dim {\pgfpageoptionwidth}
359 \dim_set:Nn \l_tmpb_dim {\pgfpageoptionborder}
360 \dim_set:Nn \l_handoutWithNotes_scaled_gridsize_dim {
361 \g_handoutWithNotes_gridsize_dim
362 * \dim_ratio:nn {\paperwidth}{.5\l_tmpa_dim - 2\l_tmpb_dim}
363 }
364 \vbox_gset:Nn \g_handoutWithNotes_notes_box {
365 \hsize=\paperwidth
366 \translatelet{\l_handoutWithNotes_title_tl}{Notes}%
367 \hook_use:n {handoutWithNotes/notesbox}
368 \tl_if_empty:NF \l_handoutWithNotes_title_tl {
369 \noindent\hook_use:n {handoutWithNotes/notesbox/title}
370 \l_handoutWithNotes_title_tl
371 }
372 }
373 \dim_set:Nn \l_handoutWithNotes_notes_dim {
374 \@@_pageheight:
375 -\box_ht:N \g_handoutWithNotes_notes_box
376 -\box_dp:N \g_handoutWithNotes_notes_box
377 -\topskip
378 -\medskipamount
379 }
380 \vbox_gset:Nn \g_handoutWithNotes_notes_box {
381 \vbox_to_ht:nn {\@@_pageheight:} {
382 \hsize=\paperwidth
383 \skip_vertical:n {-1in}
384 \skip_horizontal:n {-1in}
385 \vbox_to_ht:nn {\@@_pageheight:} {
386 \skip_vertical:n {\topskip}
387 \hook_use:n {handoutWithNotes/notesbox}
388 \vbox_unpack_drop:N \g_handoutWithNotes_notes_box
389 \skip_vertical:n {\fill}
390 \hook_use:n {handoutWithNotes/notesbox/content}
391 \skip_vertical:n {\fill}
392 \bool_if:NTF \g_handoutWithNotes_graph_bool {
393 \vbox_to_ht:nn {\l_handoutWithNotes_notes_dim} {
394 \smash{
395 \rule[-\l_handoutWithNotes_notes_dim]
396 {\g_handoutWithNotes_rule_dim}
397 {\l_handoutWithNotes_notes_dim}
398 \dim_step_inline:nnnn
399 {
400 \l_handoutWithNotes_scaled_gridsize_dim
401 +\g_handoutWithNotes_rule_dim
402 }
403 {\l_handoutWithNotes_scaled_gridsize_dim+1sp}
404 {\paperwidth}
405 {
406 \skip_horizontal:n {
407 \l_handoutWithNotes_scaled_gridsize_dim
408 -\g_handoutWithNotes_rule_dim
409 }
410 \rule[-\l_handoutWithNotes_notes_dim]
411 {\g_handoutWithNotes_rule_dim}
412 {\l_handoutWithNotes_notes_dim}
413 }
414 }
415 \par\nointerlineskip
416 \rule{\paperwidth}{\g_handoutWithNotes_rule_dim}\par
417 \dim_step_inline:nnnn
418 {
419 \g_handoutWithNotes_rule_dim
420 +\l_handoutWithNotes_scaled_gridsize_dim
421 +1sp
422 }
423 {\l_handoutWithNotes_scaled_gridsize_dim+1sp}
424 {\l_handoutWithNotes_notes_dim}
425 {
426 \nointerlineskip
427 \skip_vertical:n {
428 \l_handoutWithNotes_scaled_gridsize_dim
429 -\g_handoutWithNotes_rule_dim
430 }
431 \rule{\paperwidth}{\g_handoutWithNotes_rule_dim}
432 \par\nointerlineskip
433 }
434 \skip_vertical:n {\fill}
435 }
436 }{
437 \int_step_inline:nn {\g_handoutWithNotes_lines_int} {
438 \hrule width\paperwidth\skip_vertical:n {\fill}
439 }
440 }
441 }
442 }
443 }
444 \int_step_inline:nnn {#1+1} {2*#1} {
445 \pgfpagesshipoutlogicalpage{##1}
446 \box_use:N \g_handoutWithNotes_notes_box
447 }
448 }
449 }
450 % \end{macrocode}
451 % \end{macro}
452 %
453 %backwards compatibility
454 % \begin{macrocode}
455 \let\notesbox\g_handoutWithNotes_notes_box
456 \ExplSyntaxOff
457 % \end{macrocode}
458 % 1 on 1 with notes landscape
459 % \begin{macrocode}
460 \pgfpagesdeclarelayout{1 on 1 with notes landscape} {
461 \edef\pgfpageoptionheight{\the\paperwidth}
462 \edef\pgfpageoptionwidth{\the\paperheight}
463 \edef\pgfpageoptionborder{0pt}
464 }
465 {
466 \setkeys{pgfpagesuselayoutoption}{landscape}
467 \pgfpagesphysicalpageoptions
468 {%
469 logical pages=2,%
470 physical height=\pgfpageoptionheight,%
471 physical width=\pgfpageoptionwidth,%
472 last logical shipout=1%
473 }
474 \pgfpageslogicalpageoptions{1}
475 {%
476 border shrink=\pgfpageoptionborder,%
477 resized width=.5\pgfphysicalwidth,%
478 resized height=.5\pgfphysicalheight,%
479 center=\pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight},%
480 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
481 }%
482 \pgfpageslogicalpageoptions{2}
483 {%
484 border shrink=\pgfpageoptionborder,%
485 resized width=.5\pgfphysicalwidth,%
486 resized height=.5\pgfphysicalheight,%
487 center=\pgfpoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight},%
488 copy from=2,%
489 border code=\handoutWithNotes@@@@conditionalFrame{note},%
490 }%
491 \AtBeginDocument{
492 \@@@initNotesBox{1}
493 }
494 }
495 % \end{macrocode}
496 % 4 on 1 with notes
497 % \begin{macrocode}
498 \pgfpagesdeclarelayout{4 on 1 with notes} {
499 \edef\pgfpageoptionheight{\the\paperheight}
500 \edef\pgfpageoptionwidth{\the\paperwidth}
501 \edef\pgfpageoptionborder{0pt}
502 }
503 {
504 \pgfpagesphysicalpageoptions
505 {%
506 logical pages=8,%
507 physical height=\pgfpageoptionheight,%
508 physical width=\pgfpageoptionwidth,%
509 last logical shipout=4%
510 }
511
512 \pgfpageslogicalpageoptions{1}
513 {%
514 border shrink=\pgfpageoptionborder,%
515 resized width=.5\pgfphysicalwidth,%
516 resized height=.25\pgfphysicalheight,%
517 center=\pgfpoint{.25\pgfphysicalwidth}{.875\pgfphysicalheight},%
518 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
519 }%
520 \pgfpageslogicalpageoptions{2}
521 {%
522 border shrink=\pgfpageoptionborder,%
523 resized width=.5\pgfphysicalwidth,%
524 resized height=.25\pgfphysicalheight,%
525 center=\pgfpoint{.25\pgfphysicalwidth}{.625\pgfphysicalheight},%
526 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
527 }%
528 \pgfpageslogicalpageoptions{3}
529 {%
530 border shrink=\pgfpageoptionborder,%
531 resized width=.5\pgfphysicalwidth,%
532 resized height=.25\pgfphysicalheight,%
533 center=\pgfpoint{.25\pgfphysicalwidth}{.375\pgfphysicalheight},%
534 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
535 }%
536 \pgfpageslogicalpageoptions{4}
537 {%
538 border shrink=\pgfpageoptionborder,%
539 resized width=.5\pgfphysicalwidth,%
540 resized height=.25\pgfphysicalheight,%
541 center=\pgfpoint{.25\pgfphysicalwidth}{.125\pgfphysicalheight},%
542 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
543 }%
544
545 \pgfpageslogicalpageoptions{5}
546 {%
547 border shrink=\pgfpageoptionborder,%
548 resized width=.5\pgfphysicalwidth,%
549 resized height=.25\pgfphysicalheight,%
550 center=\pgfpoint{.75\pgfphysicalwidth}{.875\pgfphysicalheight},%
551 copy from=5,%
552 border code=\handoutWithNotes@@@@conditionalFrame{note},%
553 }%
554 \pgfpageslogicalpageoptions{6}
555 {%
556 border shrink=\pgfpageoptionborder,%
557 resized width=.5\pgfphysicalwidth,%
558 resized height=.25\pgfphysicalheight,%
559 center=\pgfpoint{.75\pgfphysicalwidth}{.625\pgfphysicalheight},%
560 copy from=6,%
561 border code=\handoutWithNotes@@@@conditionalFrame{note},%
562 }%
563 \pgfpageslogicalpageoptions{7}
564 {%
565 border shrink=\pgfpageoptionborder,%
566 resized width=.5\pgfphysicalwidth,%
567 resized height=.25\pgfphysicalheight,%
568 center=\pgfpoint{.75\pgfphysicalwidth}{.375\pgfphysicalheight},%
569 copy from=7,%
570 border code=\handoutWithNotes@@@@conditionalFrame{note},%
571 }%
572 \pgfpageslogicalpageoptions{8}
573 {%
574 border shrink=\pgfpageoptionborder,%
575 resized width=.5\pgfphysicalwidth,%
576 resized height=.25\pgfphysicalheight,%
577 center=\pgfpoint{.75\pgfphysicalwidth}{.125\pgfphysicalheight},%
578 copy from=8,%
579 border code=\handoutWithNotes@@@@conditionalFrame{note},%
580 }%
581
582 \AtBeginDocument{
583 \csname @@@initNotesBox\endcsname{4}
584 }
585 }
586 % \end{macrocode}
587 % 2 on 1 with notes
588 % \begin{macrocode}
589 \pgfpagesdeclarelayout{2 on 1 with notes} {
590 \edef\pgfpageoptionheight{\the\paperheight}
591 \edef\pgfpageoptionwidth{\the\paperwidth}
592 \edef\pgfpageoptionborder{0pt}
593 }
594 {
595 \pgfpagesphysicalpageoptions
596 {%
597 logical pages=4,%
598 physical height=\pgfpageoptionheight,%
599 physical width=\pgfpageoptionwidth,%
600 last logical shipout=2%
601 }
602
603 \pgfpageslogicalpageoptions{1}
604 {%
605 border shrink=\pgfpageoptionborder,%
606 resized width=.5\pgfphysicalwidth,%
607 resized height=.5\pgfphysicalheight,%
608 center=\pgfpoint{.25\pgfphysicalwidth}{.75\pgfphysicalheight},%
609 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
610 }%
611
612 \pgfpageslogicalpageoptions{2}
613 {%
614 border shrink=\pgfpageoptionborder,%
615 resized width=.5\pgfphysicalwidth,%
616 resized height=.5\pgfphysicalheight,%
617 center=\pgfpoint{.25\pgfphysicalwidth}{.25\pgfphysicalheight},%
618 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
619 }%
620
621 \pgfpageslogicalpageoptions{3}
622 {%
623 border shrink=\pgfpageoptionborder,%
624 resized width=.5\pgfphysicalwidth,%
625 resized height=.5\pgfphysicalheight,%
626 center=\pgfpoint{.75\pgfphysicalwidth}{.75\pgfphysicalheight},%
627 copy from=3,%
628 border code=\handoutWithNotes@@@@conditionalFrame{note},%
629 }%
630
631 \pgfpageslogicalpageoptions{4}
632 {%
633 border shrink=\pgfpageoptionborder,%
634 resized width=.5\pgfphysicalwidth,%
635 resized height=.5\pgfphysicalheight,%
636 center=\pgfpoint{.75\pgfphysicalwidth}{.25\pgfphysicalheight},%
637 copy from=4,%
638 border code=\handoutWithNotes@@@@conditionalFrame{note},%
639 }%
640
641 \AtBeginDocument{
642 \csname @@@initNotesBox\endcsname{2}
643 }
644 }
645 % \end{macrocode}
646 % 3 on 1 with notes
647 % \begin{macrocode}
648 \pgfpagesdeclarelayout{3 on 1 with notes} {
649 \edef\pgfpageoptionheight{\the\paperheight}
650 \edef\pgfpageoptionwidth{\the\paperwidth}
651 \edef\pgfpageoptionborder{0pt}
652 }
653 {
654 \pgfpagesphysicalpageoptions
655 {%
656 logical pages=6,%
657 physical height=\pgfpageoptionheight,%
658 physical width=\pgfpageoptionwidth,%
659 last logical shipout=3%
660 }
661
662 \pgfpageslogicalpageoptions{1}
663 {%
664 border shrink=\pgfpageoptionborder,%
665 resized width=.5\pgfphysicalwidth,%
666 resized height=.33\pgfphysicalheight,%
667 center=\pgfpoint{.25\pgfphysicalwidth}{.83\pgfphysicalheight},%
668 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
669 }%
670
671 \pgfpageslogicalpageoptions{2}
672 {%
673 border shrink=\pgfpageoptionborder,%
674 resized width=.5\pgfphysicalwidth,%
675 resized height=.33\pgfphysicalheight,%
676 center=\pgfpoint{.25\pgfphysicalwidth}{.50\pgfphysicalheight},%
677 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
678 }%
679
680 \pgfpageslogicalpageoptions{3}
681 {%
682 border shrink=\pgfpageoptionborder,%
683 resized width=.5\pgfphysicalwidth,%
684 resized height=.33\pgfphysicalheight,%
685 center=\pgfpoint{.25\pgfphysicalwidth}{.17\pgfphysicalheight},%
686 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
687 }%
688
689 \pgfpageslogicalpageoptions{4}
690 {%
691 border shrink=\pgfpageoptionborder,%
692 resized width=.5\pgfphysicalwidth,%
693 resized height=.33\pgfphysicalheight,%
694 center=\pgfpoint{.75\pgfphysicalwidth}{.83\pgfphysicalheight},%
695 copy from=4,%
696 border code=\handoutWithNotes@@@@conditionalFrame{note},%
697 }%
698
699 \pgfpageslogicalpageoptions{5}
700 {%
701 border shrink=\pgfpageoptionborder,%
702 resized width=.5\pgfphysicalwidth,%
703 resized height=.33\pgfphysicalheight,%
704 center=\pgfpoint{.75\pgfphysicalwidth}{.50\pgfphysicalheight},%
705 copy from=5,%
706 border code=\handoutWithNotes@@@@conditionalFrame{note},%
707 }%
708
709 \pgfpageslogicalpageoptions{6}
710 {%
711 border shrink=\pgfpageoptionborder,%
712 resized width=.5\pgfphysicalwidth,%
713 resized height=.33\pgfphysicalheight,%
714 center=\pgfpoint{.75\pgfphysicalwidth}{.17\pgfphysicalheight},%
715 copy from=6,%
716 border code=\handoutWithNotes@@@@conditionalFrame{note},%
717 }%
718
719 \AtBeginDocument{
720 \csname @@@initNotesBox\endcsname{3}
721 }
722 }
723 % \end{macrocode}
724 % 2 on 1 with notes landscape
725 % \begin{macrocode}
726 \pgfpagesdeclarelayout{2 on 1 with notes landscape} {
727 \edef\pgfpageoptionheight{\the\paperheight}
728 \edef\pgfpageoptionwidth{\the\paperwidth}
729 \edef\pgfpageoptionborder{0pt}
730 }
731 {
732 \setkeys{pgfpagesuselayoutoption}{landscape}
733
734 \pgfpagesphysicalpageoptions
735 {%
736 logical pages=4,%
737 physical height=\pgfpageoptionheight,%
738 physical width=\pgfpageoptionwidth,%
739 last logical shipout=2%
740 }
741
742 \pgfpageslogicalpageoptions{1}
743 {%
744 border shrink=\pgfpageoptionborder,%
745 resized width=.5\pgfphysicalwidth,%
746 resized height=.5\pgfphysicalheight,%
747 center=\pgfpoint{.25\pgfphysicalwidth}{.75\pgfphysicalheight},%
748 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
749 }%
750
751 \pgfpageslogicalpageoptions{2}
752 {%
753 border shrink=\pgfpageoptionborder,%
754 resized width=.5\pgfphysicalwidth,%
755 resized height=.5\pgfphysicalheight,%
756 center=\pgfpoint{.25\pgfphysicalwidth}{.25\pgfphysicalheight},%
757 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
758 }%
759
760 \pgfpageslogicalpageoptions{3}
761 {%
762 border shrink=\pgfpageoptionborder,%
763 resized width=.5\pgfphysicalwidth,%
764 resized height=.5\pgfphysicalheight,%
765 center=\pgfpoint{.75\pgfphysicalwidth}{.75\pgfphysicalheight},%
766 copy from=3,%
767 border code=\handoutWithNotes@@@@conditionalFrame{note},%
768 }%
769
770 \pgfpageslogicalpageoptions{4}
771 {%
772 border shrink=\pgfpageoptionborder,%
773 resized width=.5\pgfphysicalwidth,%
774 resized height=.5\pgfphysicalheight,%
775 center=\pgfpoint{.75\pgfphysicalwidth}{.25\pgfphysicalheight},%
776 copy from=4,%
777 border code=\handoutWithNotes@@@@conditionalFrame{note},%
778 }%
779 \AtBeginDocument{
780 \csname @@@initNotesBox\endcsname{2}
781 }
782 }
783 % \end{macrocode}
784 % 1 on 1 with notes
785 % \begin{macrocode}
786 \pgfpagesdeclarelayout{1 on 1 with notes} {
787 \edef\pgfpageoptionheight{\the\paperwidth}
788 \edef\pgfpageoptionwidth{\the\paperheight}
789 \edef\pgfpageoptionborder{0pt}
790 }
791 {
792 \pgfpagesphysicalpageoptions
793 {%
794 logical pages=2,%
795 physical height=\pgfpageoptionheight,%
796 physical width=\pgfpageoptionwidth,%
797 last logical shipout=1%
798 }
799
800 \pgfpageslogicalpageoptions{1}
801 {%
802 border shrink=\pgfpageoptionborder,%
803 resized width=\pgfphysicalwidth,%
804 resized height=.5\pgfphysicalheight,%
805 center=\pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight},%
806 border code=\handoutWithNotes@@@@conditionalFrame{slide},%
807 }%
808
809 \pgfpageslogicalpageoptions{2}
810 {%
811 border shrink=\pgfpageoptionborder,%
812 resized width=\pgfphysicalwidth,%
813 resized height=.5\pgfphysicalheight,%
814 center=\pgfpoint{.5\pgfphysicalwidth}{.25\pgfphysicalheight},%
815 copy from=2,%
816 border code=\handoutWithNotes@@@@conditionalFrame{note},%
817 }%
818
819 \AtBeginDocument{
820 \csname @@@initNotesBox\endcsname{1}
821 }
822 }
823 % \end{macrocode}
824 % if print-beamer-notes is enable the note frame has to be patched
825 % \begin{macrocode}
826 \ExplSyntaxOn
827 \int_new:N \g_handoutWithNotes_last_shipout_int
828 \int_new:N \g_handoutWithNotes_current_note_page_int
829 % \end{macrocode}
830 %
831 % \begin{macro}{\@@@beamer@outsideframenote}
832 %Modified variant of beamer@outsideframenote
833 %the patch allows multi page layouts with pgfpages
834 %based on the definition in beamerbasenotes.sty
835 % Copyright 2003--2007 by Till Tantau
836 % Copyright 2010 by Vedran Mileti\'c
837 % Copyright 2012,2015 by Vedran Mileti\'c, Joseph Wright
838 % Copyright 2017,2018 by Louis Stuart, Joseph Wright
839 % \begin{macrocode}
840 \newcommand\@@@beamer@outsideframenote[2][]{%
841 \beamer@savemode%
842 \ifbeamer@inlecture%
843 \def\beamer@noteenvstart{}%
844 \def\beamer@noteenvend{}%
845 \setkeys{beamernotes}{#1}%
846 \ifbeamer@notes
847 \begingroup
848 \setbeamertemplate{itemize~item}{\textbullet}
849 \setbeamertemplate{itemize~subitem}{--}
850 \setbeamertemplate{enumerate~item}{\insertenumlabel.}
851 \setbeamertemplate{enumerate~subitem}{\insertenumlabel.\insertsubenumlabel}
852 \def\@oddhead{}
853 \def\@oddfoot{}
854 \let\@evenhead\@oddhead
855 \let\@evenfoot\@oddfoot
856 \def\beamer@backgroundtemplate{}%
857 \setbeamercolor{item}{fg=black,bg=white}
858 \color{black}%
859 \nointerlineskip
860 \hbox{\hskip-\Gm@lmargin\hskip1cm\vbox to\textheight{%
861 %pretend to have ``standard'' margins
862 \edef\beamer@origlmargin{\Gm@lmargin}%
863 \edef\beamer@origrmargin{\Gm@rmargin}%
864 \def\Gm@lmargin{1cm}%
865 \def\Gm@rmargin{1cm}%
866 \textwidth=\dimexpr\paperwidth-\Gm@lmargin-\Gm@rmargin\relax%
867 \hsize=\textwidth%
868 \@arrayparboxrestore%
869 \vskip-\headheight%
870 \def\insertnote{\vbox{}%
871 \beamer@noteenvstart#2\beamer@noteenvend%
872 }%
873 \usebeamertemplate*{note~page}%
874 \vfil%
875 \vskip-4pt% foot separator
876 \vskip-\footheight}\hskip-\Gm@lmargin\hskip1cm}%
877 \ifbeamer@twoscreensnotes%
878 \int_compare:nF
879 {\the\pgf@currentshipout = \g_handoutWithNotes_last_shipout_int}
880 {
881 \int_gset:Nn \g_handoutWithNotes_last_shipout_int
882 {\the\pgf@currentshipout}
883 \int_compare:nTF
884 {\g_handoutWithNotes_current_note_page_int=\the\pgf@lastshipout}
885 {
886 % \end{macrocode}
887 % \changes{1.2}{2022/02/22}{Clear leftover beamer Notes when starting a new page}
888 % \begin{macrocode}
889 \int_step_variable:nNn {\pgf@lastshipout} \l_tmpa_int {
890 \box_gclear:c { pgfpages@box@ \int_eval:n {\l_tmpa_int + \the\pgf@lastshipout}}
891 }
892 \int_gset:Nn \g_handoutWithNotes_current_note_page_int {1}
893 } {
894 \int_gincr:N \g_handoutWithNotes_current_note_page_int
895 }
896 }
897 \pgfpagescurrentpagewillbelogicalpage
898 {\int_eval:n {
899 \g_handoutWithNotes_current_note_page_int
900 +\the\pgf@lastshipout
901 }}
902 \advance\c@page by-1\relax%
903 \fi%
904 \clearpage
905 \endgroup
906 \fi%
907 \fi%
908 \beamer@resumemode
909 }
910 \ExplSyntaxOff
911 \endinput
912 % \end{macrocode}
913 % \end{macro}
914 %
915
916 %
917 % \iffalse
918 %</package>
919 % \fi
920 %
921 % \end{implementation}