Debian Codegraph @

texmf-dist/tex/latex/beamerswitch/beamerswitch.cls

raw
1 %%
2 %% This is file `beamerswitch.cls',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% beamerswitch.dtx (with options: `class')
8 %% ----------------------------------------------------------------
9 %% beamerswitch --- Convenient mode selection in Beamer documents
10 %% Author: Alex Ball
11 %% E-mail: [email protected]
12 %% License: Released under the LaTeX Project Public License v1.3c or later
13 %% See: http://www.latex-project.org/lppl.txt
14 %% ----------------------------------------------------------------
15 %%
16 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
17 \ProvidesClass{beamerswitch}
18 [2022/08/20 v1.9 Convenient mode selection in Beamer documents]
19 \RequirePackage{xkeyval,xkvltxp,etoolbox,xstring,shellesc,iftex,expl3}
20 \define@boolkey[DC]{beamerswitch}{beamer}[true]{%
21 \ifbool{DC@beamerswitch@beamer}{%
22 \setkeys[DC]{beamerswitch}{trans=false}
23 \setkeys[DC]{beamerswitch}{handout=false}
24 \setkeys[DC]{beamerswitch}{article=false}
25 }{}%
26 }
27 \define@boolkey[DC]{beamerswitch}{trans}[true]{%
28 \ifbool{DC@beamerswitch@trans}{%
29 \setkeys[DC]{beamerswitch}{beamer=false}
30 \setkeys[DC]{beamerswitch}{handout=false}
31 \setkeys[DC]{beamerswitch}{article=false}
32 }{}%
33 }
34 \define@boolkey[DC]{beamerswitch}{handout}[true]{%
35 \ifbool{DC@beamerswitch@handout}{%
36 \setkeys[DC]{beamerswitch}{beamer=false}
37 \setkeys[DC]{beamerswitch}{trans=false}
38 \setkeys[DC]{beamerswitch}{article=false}
39 }{}%
40 }
41 \define@boolkey[DC]{beamerswitch}{article}[true]{%
42 \ifbool{DC@beamerswitch@article}{%
43 \setkeys[DC]{beamerswitch}{beamer=false}
44 \setkeys[DC]{beamerswitch}{trans=false}
45 \setkeys[DC]{beamerswitch}{handout=false}
46 }{}%
47 }
48 \define@boolkey[DC]{beamerswitch}{alsobeamer}[true]{}
49 \define@boolkey[DC]{beamerswitch}{alsotrans}[true]{}
50 \define@boolkey[DC]{beamerswitch}{alsohandout}[true]{}
51 \define@boolkey[DC]{beamerswitch}{alsoarticle}[true]{}
52 \newcommand{\beamerswitch@SetAlso}[1]{%
53 \key@ifundefined[DC]{beamerswitch}{also#1}{%
54 \ClassWarning{beamerswitch}{`#1' is not a valid value for option `also'}%
55 }{%
56 \setkeys[DC]{beamerswitch}{also#1}%
57 }%
58 }
59 \define@key[DC]{beamerswitch}{also}{%
60 \forcsvlist{\beamerswitch@SetAlso}{#1}%
61 }
62 \define@cmdkey[DC]{beamerswitch}{beameroptions}[ignorenonframetext]{}
63 \define@cmdkey[DC]{beamerswitch}{articleclass}[article]{}
64 \define@cmdkey[DC]{beamerswitch}{articleoptions}[]{}
65 \define@boolkey[DC]{beamerswitch}{nohyperref}[true]{}
66 \define@boolkey[DC]{beamerswitch}{textinst}[true]{}
67 \setkeys[DC]{beamerswitch}{beamer=true,alsobeamer=false,alsotrans=false,%
68 alsohandout=false,alsoarticle=false,beameroptions,articleclass,%
69 articleoptions}
70 \ProcessOptionsX[DC]<beamerswitch>
71 \ExplSyntaxOn
72 \tl_replace_all:Nnn \cmdDC@beamerswitch@articleoptions { ,~ } { , }
73 \tl_replace_all:Nnn \cmdDC@beamerswitch@beameroptions { ,~ } { , }
74 \ExplSyntaxOff
75 \providecommand*{\BeamerSuffix}{-slides}
76 \providecommand*{\TransSuffix}{-trans}
77 \providecommand*{\HandoutSuffix}{-handout}
78 \providecommand*{\ArticleSuffix}{-article}
79 \providecommand{\SpawnedCompiler}{latexmk -silent -synctex=1 -interaction=batchmode }
80 \providecommand{\SpawnedTeX}{\SpawnedCompiler}
81 \providecommand{\SpawnedPDFTeX}{\SpawnedCompiler -pdf }
82 \providecommand{\SpawnedLuaTeX}{\SpawnedCompiler -pdflua }
83 \providecommand{\SpawnedXeTeX}{\SpawnedCompiler -pdfxe }
84 \providecommand{\BeamerswitchSpawn}[1]{%
85 \ifbool{PDFTeX}{%
86 \ShellEscape{\SpawnedPDFTeX -jobname=\jobname#1 \jobname}
87 }{%
88 \ifbool{LuaTeX}{%
89 \ShellEscape{\SpawnedLuaTeX -jobname=\jobname#1 \jobname}
90 }{%
91 \ifbool{XeTeX}{%
92 \ShellEscape{\SpawnedXeTeX -jobname=\jobname#1 \jobname}
93 }{%
94 \ShellEscape{\SpawnedTeX -jobname=\jobname#1 \jobname}
95 }%
96 }%
97 }%
98 }
99 \IfBeginWith*{\jobname}{"}{%
100 \IfEndWith*{\jobname}{"}{%
101 \StrGobbleLeft{\jobname}{1}[\JobName]%
102 \StrGobbleRight{\JobName}{1}[\JobName]%
103 }{\let\JobName\jobname}%
104 }{\let\JobName\jobname}
105 \IfEndWith*{\JobName}{\BeamerSuffix}{%
106 \setkeys[DC]{beamerswitch}{beamer=true}
107 }{%
108 \IfEndWith*{\JobName}{\TransSuffix}{%
109 \setkeys[DC]{beamerswitch}{trans=true}
110 }{%
111 \IfEndWith*{\JobName}{\HandoutSuffix}{%
112 \setkeys[DC]{beamerswitch}{handout=true}
113 }{%
114 \IfEndWith*{\JobName}{\ArticleSuffix}{%
115 \setkeys[DC]{beamerswitch}{article=true}
116 }{%
117 \ifbool{DC@beamerswitch@alsobeamer}{%
118 \BeamerswitchSpawn{\BeamerSuffix}%
119 }{}
120 \ifbool{DC@beamerswitch@alsotrans}{%
121 \BeamerswitchSpawn{\TransSuffix}%
122 }{}
123 \ifbool{DC@beamerswitch@alsohandout}{%
124 \BeamerswitchSpawn{\HandoutSuffix}%
125 }{}
126 \ifbool{DC@beamerswitch@alsoarticle}{%
127 \BeamerswitchSpawn{\ArticleSuffix}%
128 }{}
129 }%
130 }%
131 }%
132 }%
133 \ifbool{DC@beamerswitch@article}{%
134 \PassOptionsToClass{\cmdDC@beamerswitch@articleoptions}{%
135 \cmdDC@beamerswitch@articleclass}
136 \LoadClass{\cmdDC@beamerswitch@articleclass}
137 \RequirePackage{beamerarticle}
138 \def\beamer@insttitle#1{\textsuperscript{#1}}
139 \def\beamer@andtitle{\quad}
140 \def\beamer@instinst#1{\textsuperscript{#1}\ignorespaces}
141 \def\beamer@andinst{\linebreak}
142 \ifbool{DC@beamerswitch@nohyperref}{}{%
143 \RequirePackage[bookmarks=true,%
144 bookmarksopen=true,%
145 pdfborder={0 0 0},%
146 pdfhighlight={/N},%
147 linkbordercolor={.5 .5 .5}]{hyperref}%
148 }
149 \AtBeginDocument{%
150 \@ifpackageloaded{hyperref}{%
151 \pdfstringdefDisableCommands{\def\\<#1>#2{ - #2}}
152 \begingroup
153 \hypersetup{pdftitle={\@title}}%
154 \def\and{\unskip, }%
155 \let\thanks=\@gobble
156 \let\inst=\@gobble
157 \hypersetup{pdfauthor={\@author}}%
158 \endgroup
159 }{}%
160 }
161 }{%
162 \ifbool{DC@beamerswitch@handout}{%
163 \PassOptionsToClass{\cmdDC@beamerswitch@beameroptions}{beamer}
164 \LoadClass[handout]{beamer}
165 \RequirePackage{pgfpages}
166 }{%
167 \ifbool{DC@beamerswitch@trans}{%
168 \PassOptionsToClass{\cmdDC@beamerswitch@beameroptions}{beamer}
169 \LoadClass[trans]{beamer}
170 }{%
171 \PassOptionsToClass{\cmdDC@beamerswitch@beameroptions}{beamer}
172 \LoadClass{beamer}
173 }%
174 }
175 }
176 \ifbool{DC@beamerswitch@textinst}{%
177 \def\beamer@insttitle#1{\textsuperscript{#1}}
178 \def\beamer@instinst#1{\textsuperscript{#1}\ignorespaces}
179 }{}
180 \def\beamerswitch@handoutpaper{a4paper}
181 \define@key[HL]{beamerswitch}{paper}{%
182 \def\beamerswitch@handoutpaper{#1}%
183 }
184 \newcounter{beamerswitch@nupcase}
185 \setcounter{beamerswitch@nupcase}{7}
186 \define@choicekey+[HL]{beamerswitch}{nup}[\val\nr]{1, 1plus, 2, 3, 3plus, 4, 4plus, 6, 8}{%
187 \setcounter{beamerswitch@nupcase}{\nr}
188 }{%
189 \ClassWarning{beamerswitch}{Value of `nup' not recognized.
190 Allowed values are 1, 1plus, 2, 3, 3plus, 4, 4plus, 6, and 8.}%
191 }
192 \newcommand*{\beamerswitch@Border}{\relax}
193 \define@key[HL]{beamerswitch}{border}[0.4pt]{%
194 \RequirePackage{pgf}%
195 \ifdimcomp{#1}{>}{0pt}{%
196 \renewcommand*{\beamerswitch@Border}{%
197 \ifnumcomp{(\value{handoutpno} * \beamerswitch@nup) + \the\pgf@cpn}%
198 {>}{\beamer@endpageofdocument}{%
199 \relax
200 }{%
201 \pgfsetlinewidth{#1}\pgfstroke
202 }%
203 }%
204 }{%
205 \renewcommand*{\beamerswitch@Border}{\relax}%
206 }%
207 }
208 \newlength{\beamerswitch@margin}
209 \setlength{\beamerswitch@margin}{5mm}
210 \define@key[HL]{beamerswitch}{margin}[0pt]{%
211 \setlength{\beamerswitch@margin}{#1}%
212 }
213 \define@boolkey[HL]{beamerswitch}{align}[true]{}
214 \newlength{\handoutpnobaseline}
215 \setlength{\handoutpnobaseline}{5mm}
216 \newcounter{handoutpno}
217 \define@boolkey[HL]{beamerswitch}{pnos}[true]{}
218 \def\beamerswitch@footer{}
219 \patchcmd{\pgfpages@buildshipoutbox}{%
220 \pgfsys@endpicture
221 }{%
222 \beamerswitch@footer\pgfsys@endpicture
223 }{}{}
224 \newlength{\beamerswitch@pnoadjust}
225 \newcommand*{\handoutlayout}[1]{%
226 \only<handout>{%
227 \setlength{\beamerswitch@pnoadjust}{1em}%
228 \setkeys[HL]{beamerswitch}{#1}%
229 \ifbool{HL@beamerswitch@pnos}{%
230 \def\beamerswitch@footer{%
231 \stepcounter{handoutpno}%
232 \setbox0\vbox{\makebox[0pt][c]{\arabic{handoutpno}}}%
233 \pgfsys@beginscope
234 \pgflowlevel{\pgftransformshift{%
235 \pgfpoint{.5\pgfphysicalwidth}{\handoutpnobaseline}}}%
236 \wd0=0pt%
237 \dp0=-\ht0%
238 \pgfsys@hbox0%
239 \pgfsys@endscope
240 }%
241 \ifbool{HL@beamerswitch@align}{%
242 \ifcase\value{beamerswitch@nupcase}\relax
243 \relax
244 \or
245 \addtolength{\beamerswitch@pnoadjust}{-0.333\beamerswitch@margin}%
246 \or
247 \addtolength{\beamerswitch@pnoadjust}{-0.333\beamerswitch@margin}%
248 \or
249 \addtolength{\beamerswitch@pnoadjust}{-0.5\beamerswitch@margin}%
250 \or
251 \addtolength{\beamerswitch@pnoadjust}{-0.5\beamerswitch@margin}%
252 \or
253 \addtolength{\beamerswitch@pnoadjust}{-0.333\beamerswitch@margin}%
254 \or
255 \addtolength{\beamerswitch@pnoadjust}{-0.6\beamerswitch@margin}%
256 \or
257 \addtolength{\beamerswitch@pnoadjust}{-0.5\beamerswitch@margin}%
258 \or
259 \addtolength{\beamerswitch@pnoadjust}{-0.6\beamerswitch@margin}%
260 \fi
261 }{}%
262 \ifdimcomp{\beamerswitch@margin}{<}%
263 {\handoutpnobaseline + \beamerswitch@pnoadjust}{%
264 \setlength{\beamerswitch@margin}%
265 {\the\dimexpr\handoutpnobaseline + \beamerswitch@pnoadjust\relax}%
266 }{}%
267 }{%
268 \def\beamerswitch@footer{\stepcounter{handoutpno}}%
269 }%
270 \ifcase\value{beamerswitch@nupcase}\relax
271 \def\beamerswitch@nup{1}%
272 \pgfpagesuselayout{1 by 1}[\beamerswitch@handoutpaper,%
273 landscape,border shrink=\the\beamerswitch@margin]%
274 \or
275 \def\beamerswitch@nup{1}%
276 \pgfpagesuselayout{1 by 1 narrow}[\beamerswitch@handoutpaper,%
277 border shrink=\the\beamerswitch@margin]%
278 \or
279 \def\beamerswitch@nup{2}%
280 \pgfpagesuselayout{1 by 2}[\beamerswitch@handoutpaper,%
281 border shrink=\the\beamerswitch@margin]%
282 \or
283 \def\beamerswitch@nup{3}%
284 \pgfpagesuselayout{1 by 3}[\beamerswitch@handoutpaper,%
285 border shrink=\the\beamerswitch@margin]%
286 \or
287 \def\beamerswitch@nup{3}%
288 \pgfpagesuselayout{1 by 3 narrow}[\beamerswitch@handoutpaper,%
289 border shrink=\the\beamerswitch@margin]%
290 \or
291 \def\beamerswitch@nup{4}%
292 \pgfpagesuselayout{2 by 2}[\beamerswitch@handoutpaper,%
293 landscape,border shrink=\the\beamerswitch@margin]%
294 \or
295 \def\beamerswitch@nup{4}%
296 \pgfpagesuselayout{1 by 4 narrow}[\beamerswitch@handoutpaper,%
297 border shrink=\the\beamerswitch@margin]%
298 \or
299 \def\beamerswitch@nup{6}%
300 \pgfpagesuselayout{2 by 3}[\beamerswitch@handoutpaper,%
301 border shrink=\the\beamerswitch@margin]%
302 \or
303 \def\beamerswitch@nup{8}%
304 \pgfpagesuselayout{2 by 4}[\beamerswitch@handoutpaper,%
305 border shrink=\the\beamerswitch@margin]%
306 \fi
307 }%
308 }
309 \AtEndPreamble{%
310 \ifdef{\beamerswitch@nup}{}{%
311 \handoutlayout{}%
312 }%
313 }
314 \mode<handout>{%
315 \pgfpagesdeclarelayout{1 by 1}
316 {
317 \edef\pgfpageoptionheight{\the\paperheight}
318 \edef\pgfpageoptionwidth{\the\paperwidth}
319 \edef\pgfpageoptionborder{0pt}
320 \def\pgfpageoptionfirstshipout{1}
321 }
322 {
323 \pgfpagesphysicalpageoptions
324 {%
325 logical pages=1,%
326 physical height=\pgfpageoptionheight,%
327 physical width=\pgfpageoptionwidth,%
328 current logical shipout=\pgfpageoptionfirstshipout%
329 }
330 \pgfpageslogicalpageoptions{1}
331 {%
332 border shrink=\pgfpageoptionborder,%
333 border code=\beamerswitch@Border,%
334 resized width=\pgfphysicalwidth,%
335 resized height=\pgfphysicalheight,%
336 center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%
337 }%
338 }%
339 \pgfpagesdeclarelayout{1 by 1 narrow}
340 {
341 \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
342 \edef\pgfpageoptionwidth{\the\paperheight}
343 \def\pgfpageoptionborder{0pt}
344 \def\pgfpageoptionfirstshipout{1}
345 }
346 {
347 \pgfpagesphysicalpageoptions
348 {%
349 logical pages=1,%
350 physical height=\pgfpageoptionheight,%
351 physical width=\pgfpageoptionwidth,%
352 current logical shipout=\pgfpageoptionfirstshipout%
353 }
354 \ifdim\paperheight>\paperwidth\relax
355 % put side-by-side
356 \pgfpageslogicalpageoptions{1}
357 {%
358 border shrink=\pgfpageoptionborder,%
359 border code=\beamerswitch@Border,%
360 resized width=.5\pgfphysicalwidth,%
361 resized height=\pgfphysicalheight,%
362 center=\ifbool{HL@beamerswitch@align}{%
363 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}{.5\pgfphysicalheight}%
364 }{%
365 \pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}%
366 }%
367 }%
368 \else
369 % stack on top of one another
370 \pgfpageslogicalpageoptions{1}
371 {%
372 border shrink=\pgfpageoptionborder,%
373 border code=\beamerswitch@Border,%
374 resized width=\pgfphysicalwidth,%
375 resized height=.5\pgfphysicalheight,%
376 center=\ifbool{HL@beamerswitch@align}{%
377 \pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
378 }{%
379 \pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight}%
380 }%
381 }%
382 \fi
383 }
384 \pgfpagesdeclarelayout{1 by 2}
385 {
386 \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
387 \edef\pgfpageoptionwidth{\the\paperheight}
388 \def\pgfpageoptionborder{0pt}
389 \def\pgfpageoptionfirstshipout{1}
390 }
391 {
392 \pgfpagesphysicalpageoptions
393 {%
394 logical pages=2,%
395 physical height=\pgfpageoptionheight,%
396 physical width=\pgfpageoptionwidth,%
397 current logical shipout=\pgfpageoptionfirstshipout%
398 }
399 \ifdim\paperheight>\paperwidth\relax
400 % put side-by-side
401 \pgfpageslogicalpageoptions{1}
402 {%
403 border shrink=\pgfpageoptionborder,%
404 border code=\beamerswitch@Border,%
405 resized width=.5\pgfphysicalwidth,%
406 resized height=\pgfphysicalheight,%
407 center=\ifbool{HL@beamerswitch@align}{%
408 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}{.5\pgfphysicalheight}%
409 }{%
410 \pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}%
411 }%
412 }%
413 \pgfpageslogicalpageoptions{2}
414 {%
415 border shrink=\pgfpageoptionborder,%
416 border code=\beamerswitch@Border,%
417 resized width=.5\pgfphysicalwidth,%
418 resized height=\pgfphysicalheight,%
419 center=\ifbool{HL@beamerswitch@align}{%
420 \pgfpoint{.75\pgfphysicalwidth - 0.333\beamerswitch@margin}{.5\pgfphysicalheight}%
421 }{%
422 \pgfpoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight}%
423 }%
424 }%
425 \else
426 % stack on top of one another
427 \pgfpageslogicalpageoptions{1}
428 {%
429 border shrink=\pgfpageoptionborder,%
430 border code=\beamerswitch@Border,%
431 resized width=\pgfphysicalwidth,%
432 resized height=.5\pgfphysicalheight,%
433 center=\ifbool{HL@beamerswitch@align}{%
434 \pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
435 }{%
436 \pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight}%
437 }%
438 }%
439 \pgfpageslogicalpageoptions{2}
440 {%
441 border shrink=\pgfpageoptionborder,%
442 border code=\beamerswitch@Border,%
443 resized width=\pgfphysicalwidth,%
444 resized height=.5\pgfphysicalheight,%
445 center=\ifbool{HL@beamerswitch@align}{%
446 \pgfpoint{.5\pgfphysicalwidth}{.25\pgfphysicalheight + 0.333\beamerswitch@margin}%
447 }{%
448 \pgfpoint{.5\pgfphysicalwidth}{.25\pgfphysicalheight}%
449 }%
450 }%
451 \fi
452 }
453 \pgfpagesdeclarelayout{1 by 3}
454 {
455 \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
456 \edef\pgfpageoptionwidth{\the\paperheight}
457 \def\pgfpageoptionborder{0pt}
458 \def\pgfpageoptionfirstshipout{1}
459 }
460 {
461 \pgfpagesphysicalpageoptions
462 {%
463 logical pages=3,%
464 physical height=\pgfpageoptionheight,%
465 physical width=\pgfpageoptionwidth,%
466 current logical shipout=\pgfpageoptionfirstshipout%
467 }
468 \ifdim\paperheight>\paperwidth\relax
469 % put side-by-side
470 \pgfpageslogicalpageoptions{1}
471 {%
472 border shrink=\pgfpageoptionborder,%
473 border code=\beamerswitch@Border,%
474 resized width=.333\pgfphysicalwidth,%
475 resized height=\pgfphysicalheight,%
476 center=\ifbool{HL@beamerswitch@align}{%
477 \pgfpoint{.167\pgfphysicalwidth + 0.5\beamerswitch@margin}{.5\pgfphysicalheight}%
478 }{%
479 \pgfpoint{.167\pgfphysicalwidth}{.5\pgfphysicalheight}%
480 }%
481 }%
482 \pgfpageslogicalpageoptions{2}
483 {%
484 border shrink=\pgfpageoptionborder,%
485 border code=\beamerswitch@Border,%
486 resized width=.333\pgfphysicalwidth,%
487 resized height=\pgfphysicalheight,%
488 center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%
489 }%
490 \pgfpageslogicalpageoptions{3}
491 {%
492 border shrink=\pgfpageoptionborder,%
493 border code=\beamerswitch@Border,%
494 resized width=.333\pgfphysicalwidth,%
495 resized height=\pgfphysicalheight,%
496 center=\ifbool{HL@beamerswitch@align}{%
497 \pgfpoint{.833\pgfphysicalwidth - 0.5\beamerswitch@margin}{.5\pgfphysicalheight}%
498 }{%
499 \pgfpoint{.833\pgfphysicalwidth}{.5\pgfphysicalheight}%
500 }%
501 }%
502 \else
503 % stack on top of one another
504 \pgfpageslogicalpageoptions{1}
505 {%
506 border shrink=\pgfpageoptionborder,%
507 border code=\beamerswitch@Border,%
508 resized width=\pgfphysicalwidth,%
509 resized height=.333\pgfphysicalheight,%
510 center=\ifbool{HL@beamerswitch@align}{%
511 \pgfpoint{.5\pgfphysicalwidth}{.833\pgfphysicalheight - 0.5\beamerswitch@margin}%
512 }{%
513 \pgfpoint{.5\pgfphysicalwidth}{.833\pgfphysicalheight}%
514 }%
515 }%
516 \pgfpageslogicalpageoptions{2}
517 {%
518 border shrink=\pgfpageoptionborder,%
519 border code=\beamerswitch@Border,%
520 resized width=\pgfphysicalwidth,%
521 resized height=.333\pgfphysicalheight,%
522 center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%
523 }%
524 \pgfpageslogicalpageoptions{3}
525 {%
526 border shrink=\pgfpageoptionborder,%
527 border code=\beamerswitch@Border,%
528 resized width=\pgfphysicalwidth,%
529 resized height=.333\pgfphysicalheight,%
530 center=\ifbool{HL@beamerswitch@align}{%
531 \pgfpoint{.5\pgfphysicalwidth}{.167\pgfphysicalheight + 0.5\beamerswitch@margin}%
532 }{%
533 \pgfpoint{.5\pgfphysicalwidth}{.167\pgfphysicalheight}%
534 }%
535 }%
536 \fi
537 }
538 \pgfpagesdeclarelayout{1 by 3 narrow}
539 {
540 \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
541 \edef\pgfpageoptionwidth{\the\paperheight}
542 \def\pgfpageoptionborder{0pt}
543 \def\pgfpageoptionfirstshipout{1}
544 }
545 {
546 \pgfpagesphysicalpageoptions
547 {%
548 logical pages=3,%
549 physical height=\pgfpageoptionheight,%
550 physical width=\pgfpageoptionwidth,%
551 current logical shipout=\pgfpageoptionfirstshipout%
552 }
553 \ifdim\paperheight>\paperwidth\relax
554 % put side-by-side
555 \pgfpageslogicalpageoptions{1}
556 {%
557 border shrink=\pgfpageoptionborder,%
558 border code=\beamerswitch@Border,%
559 resized width=.333\pgfphysicalwidth,%
560 resized height=.5\pgfphysicalheight,%
561 center=\ifbool{HL@beamerswitch@align}{%
562 \pgfpoint{.167\pgfphysicalwidth + 0.5\beamerswitch@margin}%
563 {.75\pgfphysicalheight - 0.5\beamerswitch@margin}%
564 }{%
565 \pgfpoint{.167\pgfphysicalwidth}{.75\pgfphysicalheight}%
566 }%
567 }%
568 \pgfpageslogicalpageoptions{2}
569 {%
570 border shrink=\pgfpageoptionborder,%
571 border code=\beamerswitch@Border,%
572 resized width=.333\pgfphysicalwidth,%
573 resized height=.5\pgfphysicalheight,%
574 center=\ifbool{HL@beamerswitch@align}{%
575 \pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight - 0.5\beamerswitch@margin}%
576 }{%
577 \pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight}%
578 }%
579 }%
580 \pgfpageslogicalpageoptions{3}
581 {%
582 border shrink=\pgfpageoptionborder,%
583 border code=\beamerswitch@Border,%
584 resized width=.333\pgfphysicalwidth,%
585 resized height=.5\pgfphysicalheight,%
586 center=\ifbool{HL@beamerswitch@align}{%
587 \pgfpoint{.833\pgfphysicalwidth - 0.5\beamerswitch@margin}%
588 {.75\pgfphysicalheight - 0.5\beamerswitch@margin}%
589 }{%
590 \pgfpoint{.833\pgfphysicalwidth}{.75\pgfphysicalheight}%
591 }%
592 }%
593 \else
594 % stack on top of one another
595 \pgfpageslogicalpageoptions{1}
596 {%
597 border shrink=\pgfpageoptionborder,%
598 border code=\beamerswitch@Border,%
599 resized width=.5\pgfphysicalwidth,%
600 resized height=.333\pgfphysicalheight,%
601 center=\ifbool{HL@beamerswitch@align}{%
602 \pgfpoint{.25\pgfphysicalwidth + 0.5\beamerswitch@margin}%
603 {.833\pgfphysicalheight - 0.5\beamerswitch@margin}%
604 }{%
605 \pgfpoint{.25\pgfphysicalwidth}{.833\pgfphysicalheight}%
606 }%
607 }%
608 \pgfpageslogicalpageoptions{2}
609 {%
610 border shrink=\pgfpageoptionborder,%
611 border code=\beamerswitch@Border,%
612 resized width=.5\pgfphysicalwidth,%
613 resized height=.333\pgfphysicalheight,%
614 center=\ifbool{HL@beamerswitch@align}{%
615 \pgfpoint{.25\pgfphysicalwidth + 0.5\beamerswitch@margin}{.5\pgfphysicalheight}%
616 }{%
617 \pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}%
618 }%
619 }%
620 \pgfpageslogicalpageoptions{3}
621 {%
622 border shrink=\pgfpageoptionborder,%
623 border code=\beamerswitch@Border,%
624 resized width=.5\pgfphysicalwidth,%
625 resized height=.333\pgfphysicalheight,%
626 center=\ifbool{HL@beamerswitch@align}{%
627 \pgfpoint{.25\pgfphysicalwidth + 0.5\beamerswitch@margin}%
628 {.167\pgfphysicalheight + 0.5\beamerswitch@margin}%
629 }{%
630 \pgfpoint{.25\pgfphysicalwidth}{.167\pgfphysicalheight}%
631 }%
632 }%
633 \fi
634 }
635 \pgfpagesdeclarelayout{2 by 2}
636 {
637 \edef\pgfpageoptionheight{\the\paperheight}
638 \edef\pgfpageoptionwidth{\the\paperwidth}
639 \edef\pgfpageoptionborder{0pt}
640 }
641 {
642 \pgfpagesphysicalpageoptions
643 {%
644 logical pages=4,%
645 physical height=\pgfpageoptionheight,%
646 physical width=\pgfpageoptionwidth%
647 }
648 \pgfpageslogicalpageoptions{1}
649 {%
650 border shrink=\pgfpageoptionborder,%
651 border code=\beamerswitch@Border,%
652 resized width=.5\pgfphysicalwidth,%
653 resized height=.5\pgfphysicalheight,%
654 center=\ifbool{HL@beamerswitch@align}{%
655 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
656 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
657 }{%
658 \pgfpoint{.25\pgfphysicalwidth}{.75\pgfphysicalheight}%
659 }%
660 }%
661 \pgfpageslogicalpageoptions{2}
662 {%
663 border shrink=\pgfpageoptionborder,%
664 border code=\beamerswitch@Border,%
665 resized width=.5\pgfphysicalwidth,%
666 resized height=.5\pgfphysicalheight,%
667 center=\ifbool{HL@beamerswitch@align}{%
668 \pgfpoint{.75\pgfphysicalwidth - 0.333\beamerswitch@margin}%
669 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
670 }{%
671 \pgfpoint{.75\pgfphysicalwidth}{.75\pgfphysicalheight}%
672 }%
673 }%
674 \pgfpageslogicalpageoptions{3}
675 {%
676 border shrink=\pgfpageoptionborder,%
677 border code=\beamerswitch@Border,%
678 resized width=.5\pgfphysicalwidth,%
679 resized height=.5\pgfphysicalheight,%
680 center=\ifbool{HL@beamerswitch@align}{%
681 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
682 {.25\pgfphysicalheight + 0.333\beamerswitch@margin}%
683 }{%
684 \pgfpoint{.25\pgfphysicalwidth}{.25\pgfphysicalheight}%
685 }%
686 }%
687 \pgfpageslogicalpageoptions{4}
688 {%
689 border shrink=\pgfpageoptionborder,%
690 border code=\beamerswitch@Border,%
691 resized width=.5\pgfphysicalwidth,%
692 resized height=.5\pgfphysicalheight,%
693 center=\ifbool{HL@beamerswitch@align}{%
694 \pgfpoint{.75\pgfphysicalwidth - 0.333\beamerswitch@margin}%
695 {.25\pgfphysicalheight + 0.333\beamerswitch@margin}%
696 }{%
697 \pgfpoint{.75\pgfphysicalwidth}{.25\pgfphysicalheight}%
698 }%
699 }%
700 }
701 \pgfpagesdeclarelayout{1 by 4 narrow}
702 {
703 \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
704 \edef\pgfpageoptionwidth{\the\paperheight}
705 \def\pgfpageoptionborder{0pt}
706 \def\pgfpageoptionfirstshipout{1}
707 }
708 {
709 \pgfpagesphysicalpageoptions
710 {%
711 logical pages=4,%
712 physical height=\pgfpageoptionheight,%
713 physical width=\pgfpageoptionwidth,%
714 current logical shipout=\pgfpageoptionfirstshipout%
715 }
716 \ifdim\paperheight>\paperwidth\relax
717 % put side-by-side
718 \pgfpageslogicalpageoptions{1}
719 {%
720 border shrink=\pgfpageoptionborder,%
721 border code=\beamerswitch@Border,%
722 resized width=.25\pgfphysicalwidth,%
723 resized height=.5\pgfphysicalheight,%
724 center=\ifbool{HL@beamerswitch@align}{%
725 \pgfpoint{.125\pgfphysicalwidth + 0.6\beamerswitch@margin}%
726 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
727 }{%
728 \pgfpoint{.125\pgfphysicalwidth}{.75\pgfphysicalheight}%
729 }%
730 }%
731 \pgfpageslogicalpageoptions{2}
732 {%
733 border shrink=\pgfpageoptionborder,%
734 border code=\beamerswitch@Border,%
735 resized width=.25\pgfphysicalwidth,%
736 resized height=.5\pgfphysicalheight,%
737 center=\ifbool{HL@beamerswitch@align}{%
738 \pgfpoint{.375\pgfphysicalwidth + 0.2\beamerswitch@margin}%
739 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
740 }{%
741 \pgfpoint{.375\pgfphysicalwidth}{.75\pgfphysicalheight}%
742 }%
743 }%
744 \pgfpageslogicalpageoptions{3}
745 {%
746 border shrink=\pgfpageoptionborder,%
747 border code=\beamerswitch@Border,%
748 resized width=.25\pgfphysicalwidth,%
749 resized height=.5\pgfphysicalheight,%
750 center=\ifbool{HL@beamerswitch@align}{%
751 \pgfpoint{.625\pgfphysicalwidth - 0.2\beamerswitch@margin}%
752 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
753 }{%
754 \pgfpoint{.625\pgfphysicalwidth}{.75\pgfphysicalheight}%
755 }%
756 }%
757 \pgfpageslogicalpageoptions{4}
758 {%
759 border shrink=\pgfpageoptionborder,%
760 border code=\beamerswitch@Border,%
761 resized width=.25\pgfphysicalwidth,%
762 resized height=.5\pgfphysicalheight,%
763 center=\ifbool{HL@beamerswitch@align}{%
764 \pgfpoint{.875\pgfphysicalwidth - 0.6\beamerswitch@margin}%
765 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
766 }{%
767 \pgfpoint{.875\pgfphysicalwidth}{.75\pgfphysicalheight}%
768 }%
769 }%
770 \else
771 % stack on top of one another
772 \pgfpageslogicalpageoptions{1}
773 {%
774 border shrink=\pgfpageoptionborder,%
775 border code=\beamerswitch@Border,%
776 resized width=.5\pgfphysicalwidth,%
777 resized height=.25\pgfphysicalheight,%
778 center=\ifbool{HL@beamerswitch@align}{%
779 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
780 {.875\pgfphysicalheight - 0.6\beamerswitch@margin}%
781 }{%
782 \pgfpoint{.25\pgfphysicalwidth}{.875\pgfphysicalheight}%
783 }%
784 }%
785 \pgfpageslogicalpageoptions{2}
786 {%
787 border shrink=\pgfpageoptionborder,%
788 border code=\beamerswitch@Border,%
789 resized width=.5\pgfphysicalwidth,%
790 resized height=.25\pgfphysicalheight,%
791 center=\ifbool{HL@beamerswitch@align}{%
792 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
793 {.625\pgfphysicalheight - 0.2\beamerswitch@margin}%
794 }{%
795 \pgfpoint{.25\pgfphysicalwidth}{.625\pgfphysicalheight}%
796 }%
797 }%
798 \pgfpageslogicalpageoptions{3}
799 {%
800 border shrink=\pgfpageoptionborder,%
801 border code=\beamerswitch@Border,%
802 resized width=.5\pgfphysicalwidth,%
803 resized height=.25 \pgfphysicalheight,%
804 center=\ifbool{HL@beamerswitch@align}{%
805 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
806 {.375\pgfphysicalheight + 0.2\beamerswitch@margin}%
807 }{%
808 \pgfpoint{.25\pgfphysicalwidth}{.375\pgfphysicalheight}%
809 }%
810 }%
811 \pgfpageslogicalpageoptions{4}
812 {%
813 border shrink=\pgfpageoptionborder,%
814 border code=\beamerswitch@Border,%
815 resized width=.5\pgfphysicalwidth,%
816 resized height=.25 \pgfphysicalheight,%
817 center=\ifbool{HL@beamerswitch@align}{%
818 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
819 {.125\pgfphysicalheight + 0.6\beamerswitch@margin}%
820 }{%
821 \pgfpoint{.25\pgfphysicalwidth}{.125\pgfphysicalheight}%
822 }%
823 }%
824 \fi
825 }
826 \pgfpagesdeclarelayout{2 by 3}
827 {
828 \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
829 \edef\pgfpageoptionwidth{\the\paperheight}
830 \def\pgfpageoptionborder{0pt}
831 \def\pgfpageoptionfirstshipout{1}
832 }
833 {
834 \pgfpagesphysicalpageoptions
835 {%
836 logical pages=6,%
837 physical height=\pgfpageoptionheight,%
838 physical width=\pgfpageoptionwidth,%
839 current logical shipout=\pgfpageoptionfirstshipout%
840 }
841 \ifdim\paperheight>\paperwidth\relax
842 % put side-by-side
843 \pgfpageslogicalpageoptions{1}
844 {%
845 border shrink=\pgfpageoptionborder,%
846 border code=\beamerswitch@Border,%
847 resized width=.333\pgfphysicalwidth,%
848 resized height=.5\pgfphysicalheight,%
849 center=\ifbool{HL@beamerswitch@align}{%
850 \pgfpoint{.167\pgfphysicalwidth + 0.5\beamerswitch@margin}%
851 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
852 }{%
853 \pgfpoint{.167\pgfphysicalwidth}{.75\pgfphysicalheight}%
854 }%
855 }%
856 \pgfpageslogicalpageoptions{2}
857 {%
858 border shrink=\pgfpageoptionborder,%
859 border code=\beamerswitch@Border,%
860 resized width=.333\pgfphysicalwidth,%
861 resized height=.5\pgfphysicalheight,%
862 center=\ifbool{HL@beamerswitch@align}{%
863 \pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheigh - 0.333\beamerswitch@margint}%
864 }{%
865 \pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight}%
866 }%
867 }%
868 \pgfpageslogicalpageoptions{3}
869 {%
870 border shrink=\pgfpageoptionborder,%
871 border code=\beamerswitch@Border,%
872 resized width=.333\pgfphysicalwidth,%
873 resized height=.5\pgfphysicalheight,%
874 center=\ifbool{HL@beamerswitch@align}{%
875 \pgfpoint{.833\pgfphysicalwidth - 0.5\beamerswitch@margin}%
876 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
877 }{%
878 \pgfpoint{.833\pgfphysicalwidth}{.75\pgfphysicalheight}%
879 }%
880 }%
881 \pgfpageslogicalpageoptions{4}
882 {%
883 border shrink=\pgfpageoptionborder,%
884 border code=\beamerswitch@Border,%
885 resized width=.333\pgfphysicalwidth,%
886 resized height=.5\pgfphysicalheight,%
887 center=\ifbool{HL@beamerswitch@align}{%
888 \pgfpoint{.167\pgfphysicalwidth + 0.5\beamerswitch@margin}%
889 {.25\pgfphysicalheight + 0.333\beamerswitch@margin}%
890 }{%
891 \pgfpoint{.167\pgfphysicalwidth}{.25\pgfphysicalheight}%
892 }%
893 }%
894 \pgfpageslogicalpageoptions{5}
895 {%
896 border shrink=\pgfpageoptionborder,%
897 border code=\beamerswitch@Border,%
898 resized width=.333\pgfphysicalwidth,%
899 resized height=.5\pgfphysicalheight,%
900 center=\ifbool{HL@beamerswitch@align}{%
901 \pgfpoint{.5\pgfphysicalwidth}{.25\pgfphysicalheight + 0.333\beamerswitch@margin}%
902 }{%
903 \pgfpoint{.5\pgfphysicalwidth}{.25\pgfphysicalheight}%
904 }%
905 }%
906 \pgfpageslogicalpageoptions{6}
907 {%
908 border shrink=\pgfpageoptionborder,%
909 border code=\beamerswitch@Border,%
910 resized width=.333\pgfphysicalwidth,%
911 resized height=.5\pgfphysicalheight,%
912 center=\ifbool{HL@beamerswitch@align}{%
913 \pgfpoint{.833\pgfphysicalwidth - 0.5\beamerswitch@margin}%
914 {.25\pgfphysicalheight + 0.333\beamerswitch@margin}%
915 }{%
916 \pgfpoint{.833\pgfphysicalwidth}{.25\pgfphysicalheight}%
917 }%
918 }%
919 \else
920 % stack on top of one another
921 \pgfpageslogicalpageoptions{1}
922 {%
923 border shrink=\pgfpageoptionborder,%
924 border code=\beamerswitch@Border,%
925 resized width=.5\pgfphysicalwidth,%
926 resized height=.333\pgfphysicalheight,%
927 center=\ifbool{HL@beamerswitch@align}{%
928 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
929 {.833\pgfphysicalheight - 0.5\beamerswitch@margin}%
930 }{%
931 \pgfpoint{.25\pgfphysicalwidth}{.833\pgfphysicalheight}%
932 }%
933 }%
934 \pgfpageslogicalpageoptions{2}
935 {%
936 border shrink=\pgfpageoptionborder,%
937 border code=\beamerswitch@Border,%
938 resized width=.5\pgfphysicalwidth,%
939 resized height=.333\pgfphysicalheight,%
940 center=\ifbool{HL@beamerswitch@align}{%
941 \pgfpoint{.75\pgfphysicalwidth - 0.333\beamerswitch@margin}%
942 {.833\pgfphysicalheight - 0.5\beamerswitch@margin}%
943 }{%
944 \pgfpoint{.75\pgfphysicalwidth}{.833\pgfphysicalheight}%
945 }%
946 }%
947 \pgfpageslogicalpageoptions{3}
948 {%
949 border shrink=\pgfpageoptionborder,%
950 border code=\beamerswitch@Border,%
951 resized width=.5\pgfphysicalwidth,%
952 resized height=.333\pgfphysicalheight,%
953 center=\ifbool{HL@beamerswitch@align}{%
954 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}{.5\pgfphysicalheight}%
955 }{%
956 \pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}%
957 }%
958 }%
959 \pgfpageslogicalpageoptions{4}
960 {%
961 border shrink=\pgfpageoptionborder,%
962 border code=\beamerswitch@Border,%
963 resized width=.5\pgfphysicalwidth,%
964 resized height=.333\pgfphysicalheight,%
965 center=\ifbool{HL@beamerswitch@align}{%
966 \pgfpoint{.75\pgfphysicalwidth - 0.333\beamerswitch@margin}{.5\pgfphysicalheight}%
967 }{%
968 \pgfpoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight}%
969 }%
970 }%
971 \pgfpageslogicalpageoptions{5}
972 {%
973 border shrink=\pgfpageoptionborder,%
974 border code=\beamerswitch@Border,%
975 resized width=.5\pgfphysicalwidth,%
976 resized height=.333\pgfphysicalheight,%
977 center=\ifbool{HL@beamerswitch@align}{%
978 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
979 {.167\pgfphysicalheight + 0.5\beamerswitch@margin}%
980 }{%
981 \pgfpoint{.25\pgfphysicalwidth}{.167\pgfphysicalheight}%
982 }%
983 }%
984 \pgfpageslogicalpageoptions{6}
985 {%
986 border shrink=\pgfpageoptionborder,%
987 border code=\beamerswitch@Border,%
988 resized width=.5\pgfphysicalwidth,%
989 resized height=.333\pgfphysicalheight,%
990 center=\ifbool{HL@beamerswitch@align}{%
991 \pgfpoint{.75\pgfphysicalwidth - 0.333\beamerswitch@margin}%
992 {.167\pgfphysicalheight + 0.5\beamerswitch@margin}%
993 }{%
994 \pgfpoint{.75\pgfphysicalwidth}{.167\pgfphysicalheight}%
995 }%
996 }%
997 \fi
998 }
999 \pgfpagesdeclarelayout{2 by 4}
1000 {
1001 \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
1002 \edef\pgfpageoptionwidth{\the\paperheight}
1003 \def\pgfpageoptionborder{0pt}
1004 \def\pgfpageoptionfirstshipout{1}
1005 }
1006 {
1007 \pgfpagesphysicalpageoptions
1008 {%
1009 logical pages=8,%
1010 physical height=\pgfpageoptionheight,%
1011 physical width=\pgfpageoptionwidth,%
1012 current logical shipout=\pgfpageoptionfirstshipout%
1013 }
1014 \ifdim\paperheight>\paperwidth\relax
1015 % put side-by-side
1016 \pgfpageslogicalpageoptions{1}
1017 {%
1018 border shrink=\pgfpageoptionborder,%
1019 border code=\beamerswitch@Border,%
1020 resized width=.25\pgfphysicalwidth,%
1021 resized height=.5\pgfphysicalheight,%
1022 center=\ifbool{HL@beamerswitch@align}{%
1023 \pgfpoint{.125\pgfphysicalwidth + 0.6\beamerswitch@margin}%
1024 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
1025 }{%
1026 \pgfpoint{.125\pgfphysicalwidth}{.75\pgfphysicalheight}%
1027 }%
1028 }%
1029 \pgfpageslogicalpageoptions{2}
1030 {%
1031 border shrink=\pgfpageoptionborder,%
1032 border code=\beamerswitch@Border,%
1033 resized width=.25\pgfphysicalwidth,%
1034 resized height=.5\pgfphysicalheight,%
1035 center=\ifbool{HL@beamerswitch@align}{%
1036 \pgfpoint{.375\pgfphysicalwidth + 0.2\beamerswitch@margin}%
1037 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
1038 }{%
1039 \pgfpoint{.375\pgfphysicalwidth}{.75\pgfphysicalheight}%
1040 }%
1041 }%
1042 \pgfpageslogicalpageoptions{3}
1043 {%
1044 border shrink=\pgfpageoptionborder,%
1045 border code=\beamerswitch@Border,%
1046 resized width=.25\pgfphysicalwidth,%
1047 resized height=.5\pgfphysicalheight,%
1048 center=\ifbool{HL@beamerswitch@align}{%
1049 \pgfpoint{.625\pgfphysicalwidth - 0.2\beamerswitch@margin}%
1050 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
1051 }{%
1052 \pgfpoint{.625\pgfphysicalwidth}{.75\pgfphysicalheight}%
1053 }%
1054 }%
1055 \pgfpageslogicalpageoptions{4}
1056 {%
1057 border shrink=\pgfpageoptionborder,%
1058 border code=\beamerswitch@Border,%
1059 resized width=.25\pgfphysicalwidth,%
1060 resized height=.5\pgfphysicalheight,%
1061 center=\ifbool{HL@beamerswitch@align}{%
1062 \pgfpoint{.875\pgfphysicalwidth - 0.6\beamerswitch@margin}%
1063 {.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
1064 }{%
1065 \pgfpoint{.875\pgfphysicalwidth}{.75\pgfphysicalheight}%
1066 }%
1067 }%
1068 \pgfpageslogicalpageoptions{5}
1069 {%
1070 border shrink=\pgfpageoptionborder,%
1071 border code=\beamerswitch@Border,%
1072 resized width=.25\pgfphysicalwidth,%
1073 resized height=.5\pgfphysicalheight,%
1074 center=\ifbool{HL@beamerswitch@align}{%
1075 \pgfpoint{.125\pgfphysicalwidth + 0.6\beamerswitch@margin}%
1076 {.25\pgfphysicalheight + 0.333\beamerswitch@margin}%
1077 }{%
1078 \pgfpoint{.125\pgfphysicalwidth}{.25\pgfphysicalheight}%
1079 }%
1080 }%
1081 \pgfpageslogicalpageoptions{6}
1082 {%
1083 border shrink=\pgfpageoptionborder,%
1084 border code=\beamerswitch@Border,%
1085 resized width=.25\pgfphysicalwidth,%
1086 resized height=.5\pgfphysicalheight,%
1087 center=\ifbool{HL@beamerswitch@align}{%
1088 \pgfpoint{.375\pgfphysicalwidth + 0.2\beamerswitch@margin}%
1089 {.25\pgfphysicalheight + 0.333\beamerswitch@margin}%
1090 }{%
1091 \pgfpoint{.375\pgfphysicalwidth}{.25\pgfphysicalheight}%
1092 }%
1093 }%
1094 \pgfpageslogicalpageoptions{7}
1095 {%
1096 border shrink=\pgfpageoptionborder,%
1097 border code=\beamerswitch@Border,%
1098 resized width=.25\pgfphysicalwidth,%
1099 resized height=.5\pgfphysicalheight,%
1100 center=\ifbool{HL@beamerswitch@align}{%
1101 \pgfpoint{.625\pgfphysicalwidth - 0.2\beamerswitch@margin}%
1102 {.25\pgfphysicalheight + 0.333\beamerswitch@margin}%
1103 }{%
1104 \pgfpoint{.625\pgfphysicalwidth}{.25\pgfphysicalheight}%
1105 }%
1106 }%
1107 \pgfpageslogicalpageoptions{8}
1108 {%
1109 border shrink=\pgfpageoptionborder,%
1110 border code=\beamerswitch@Border,%
1111 resized width=.25\pgfphysicalwidth,%
1112 resized height=.5\pgfphysicalheight,%
1113 center=\ifbool{HL@beamerswitch@align}{%
1114 \pgfpoint{.875\pgfphysicalwidth - 0.6\beamerswitch@margin}%
1115 {.25\pgfphysicalheight + 0.333\beamerswitch@margin}%
1116 }{%
1117 \pgfpoint{.875\pgfphysicalwidth}{.25\pgfphysicalheight}%
1118 }%
1119 }%
1120 \else
1121 % stack on top of one another
1122 \pgfpageslogicalpageoptions{1}
1123 {%
1124 border shrink=\pgfpageoptionborder,%
1125 border code=\beamerswitch@Border,%
1126 resized width=.5\pgfphysicalwidth,%
1127 resized height=.25\pgfphysicalheight,%
1128 center=\ifbool{HL@beamerswitch@align}{%
1129 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
1130 {.875\pgfphysicalheight - 0.6\beamerswitch@margin}%
1131 }{%
1132 \pgfpoint{.25\pgfphysicalwidth}{.875\pgfphysicalheight}%
1133 }%
1134 }%
1135 \pgfpageslogicalpageoptions{2}
1136 {%
1137 border shrink=\pgfpageoptionborder,%
1138 border code=\beamerswitch@Border,%
1139 resized width=.5\pgfphysicalwidth,%
1140 resized height=.25\pgfphysicalheight,%
1141 center=\ifbool{HL@beamerswitch@align}{%
1142 \pgfpoint{.75\pgfphysicalwidth - 0.333\beamerswitch@margin}%
1143 {.875\pgfphysicalheight - 0.6\beamerswitch@margin}%
1144 }{%
1145 \pgfpoint{.75\pgfphysicalwidth}{.875\pgfphysicalheight}%
1146 }%
1147 }%
1148 \pgfpageslogicalpageoptions{3}
1149 {%
1150 border shrink=\pgfpageoptionborder,%
1151 border code=\beamerswitch@Border,%
1152 resized width=.5\pgfphysicalwidth,%
1153 resized height=.25\pgfphysicalheight,%
1154 center=\ifbool{HL@beamerswitch@align}{%
1155 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
1156 {.625\pgfphysicalheight - 0.2\beamerswitch@margin}%
1157 }{%
1158 \pgfpoint{.25\pgfphysicalwidth}{.625\pgfphysicalheight}%
1159 }%
1160 }%
1161 \pgfpageslogicalpageoptions{4}
1162 {%
1163 border shrink=\pgfpageoptionborder,%
1164 border code=\beamerswitch@Border,%
1165 resized width=.5\pgfphysicalwidth,%
1166 resized height=.25\pgfphysicalheight,%
1167 center=\ifbool{HL@beamerswitch@align}{%
1168 \pgfpoint{.75\pgfphysicalwidth - 0.333\beamerswitch@margin}%
1169 {.625\pgfphysicalheight - 0.2\beamerswitch@margin}%
1170 }{%
1171 \pgfpoint{.75\pgfphysicalwidth}{.625\pgfphysicalheight}%
1172 }%
1173 }%
1174 \pgfpageslogicalpageoptions{5}
1175 {%
1176 border shrink=\pgfpageoptionborder,%
1177 border code=\beamerswitch@Border,%
1178 resized width=.5\pgfphysicalwidth,%
1179 resized height=.25 \pgfphysicalheight,%
1180 center=\ifbool{HL@beamerswitch@align}{%
1181 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
1182 {.375\pgfphysicalheight + 0.2\beamerswitch@margin}%
1183 }{%
1184 \pgfpoint{.25\pgfphysicalwidth}{.375\pgfphysicalheight}%
1185 }%
1186 }%
1187 \pgfpageslogicalpageoptions{6}
1188 {%
1189 border shrink=\pgfpageoptionborder,%
1190 border code=\beamerswitch@Border,%
1191 resized width=.5\pgfphysicalwidth,%
1192 resized height=.25 \pgfphysicalheight,%
1193 center=\ifbool{HL@beamerswitch@align}{%
1194 \pgfpoint{.75\pgfphysicalwidth - 0.333\beamerswitch@margin}%
1195 {.375\pgfphysicalheight + 0.2\beamerswitch@margin}%
1196 }{%
1197 \pgfpoint{.75\pgfphysicalwidth}{.375\pgfphysicalheight}%
1198 }%
1199 }%
1200 \pgfpageslogicalpageoptions{7}
1201 {%
1202 border shrink=\pgfpageoptionborder,%
1203 border code=\beamerswitch@Border,%
1204 resized width=.5\pgfphysicalwidth,%
1205 resized height=.25 \pgfphysicalheight,%
1206 center=\ifbool{HL@beamerswitch@align}{%
1207 \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}%
1208 {.125\pgfphysicalheight + 0.6\beamerswitch@margin}%
1209 }{%
1210 \pgfpoint{.25\pgfphysicalwidth}{.125\pgfphysicalheight}%
1211 }%
1212 }%
1213 \pgfpageslogicalpageoptions{8}
1214 {%
1215 border shrink=\pgfpageoptionborder,%
1216 border code=\beamerswitch@Border,%
1217 resized width=.5\pgfphysicalwidth,%
1218 resized height=.25 \pgfphysicalheight,%
1219 center=\ifbool{HL@beamerswitch@align}{%
1220 \pgfpoint{.75\pgfphysicalwidth - 0.333\beamerswitch@margin}%
1221 {.125\pgfphysicalheight + 0.6\beamerswitch@margin}%
1222 }{%
1223 \pgfpoint{.75\pgfphysicalwidth}{.125\pgfphysicalheight}%
1224 }%
1225 }%
1226 \fi
1227 }
1228 }
1229 \define@boolkey[AL]{beamerswitch}{maketitle}[true]{}
1230 \newtoggle{titlepunct}
1231 \IfFileExists{xparse.sty}{\@tempswatrue}{\@tempswafalse}
1232 \if@tempswa
1233 \RequirePackage{xparse}
1234 \ExplSyntaxOn
1235 \NewDocumentCommand{\bsw@punct@test}{m}{\l_bsw_punct_test:n {#1}}
1236 \cs_new_protected:Nn \l_bsw_punct_test:n
1237 {
1238 \str_case_e:nnTF { \str_item:nn {#1} {-1} }
1239 {
1240 { , } { }
1241 { ; } { }
1242 { : } { }
1243 { . } { }
1244 { ! } { }
1245 { ? } { }
1246 }
1247 { \global\toggletrue{titlepunct} }
1248 { \global\togglefalse{titlepunct} }
1249 }
1250 \ExplSyntaxOff
1251 \mode<article>{%
1252 \renewcommand{\title}[2][]{\beamer@origtitle{#2}\bsw@punct@test{#2}}
1253 }
1254 \mode<presentation>{%
1255 \long\def\beamer@title[#1]#2{%
1256 \def\inserttitle{#2}%
1257 \def\beamer@shorttitle{#1}%
1258 \bsw@punct@test{#2}%
1259 }
1260 }
1261 \else
1262 \wlog{Beamerswitch: Auto-detection of title punctuation not available.}
1263 \fi
1264 \define@choicekey+[AL]{beamerswitch}{frametitles}{para, margin, none}{%
1265 \def\beamerswitch@articleframetitles{#1}%
1266 }{%
1267 \ClassWarning{beamerswitch}{Value of `frametitles' not recognized.
1268 Allowed values are para, margin, and none.}%
1269 }
1270 \let\beamerswitch@andinst\beamer@andinst
1271 \define@key[AL]{beamerswitch}{instbreak}{%
1272 \def\beamerswitch@andinst{#1}%
1273 }
1274 \newcommand{\articlelayout}[1]{%
1275 \setkeys[AL]{beamerswitch}{#1}%
1276 \mode<article>{%
1277 \ifcsstring{beamerswitch@articleframetitles}{margin}{%
1278 \setbeamertemplate{frametitle}{%
1279 \marginpar[%
1280 \raggedleft\noindent\itshape\textbf{\insertframetitle}\par
1281 \noindent\insertframesubtitle\par
1282 ]{%
1283 \raggedright\noindent\itshape\textbf{\insertframetitle}\par
1284 \noindent\insertframesubtitle\par
1285 }%
1286 }
1287 }{%
1288 \ifcsstring{beamerswitch@articleframetitles}{none}{%
1289 \setbeamertemplate{frametitle}{}
1290 }{%
1291 \ifcsstring{beamerswitch@articleframetitles}{para}{%
1292 \setbeamertemplate{frametitle}[default]
1293 }{}%
1294 }%
1295 }
1296 \let\beamer@andinst\beamerswitch@andinst
1297 \ifbool{AL@beamerswitch@maketitle}{%
1298 \renewcommand{\subtitle}[2][]{%
1299 \def\insertsubtitle{##2}\gappto\@title{\iftoggle{titlepunct}{}{:} ##2}%
1300 }
1301 \ifundef{\beamer@originstitute}{%
1302 \renewcommand{\institute}[2][]{%
1303 \def\insertinstitute{\def\inst{\beamer@instinst}\def\and{\beamer@andinst}##2}}%
1304 }{%
1305 \renewcommand{\institute}[2][]{%
1306 \def\insertinstitute{\def\inst{\beamer@instinst}\def\and{\beamer@andinst}##2}%
1307 \beamer@originstitute{##2}}%
1308 }%
1309 \def\@maketitle{%
1310 \newpage
1311 \null
1312 \begin{center}%
1313 \let\footnote\thanks
1314 {\LARGE \@title \par}%
1315 \vskip 1.5em%
1316 {%
1317 \large\lineskip .5em%
1318 \begin{tabular}[t]{c}%
1319 \def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}%
1320 \@author
1321 \end{tabular}\par
1322 }%
1323 \ifdefvoid{\insertinstitute}{}{%
1324 {%
1325 \normalsize\lineskip .5em%
1326 \insertinstitute\par
1327 }%
1328 }%
1329 \vskip 1em%
1330 {\large \@date}%
1331 \end{center}%
1332 \par\vskip 1.5em%
1333 }%
1334 }{}%
1335 }%
1336 \mode<presentation>{%
1337 \ifbool{AL@beamerswitch@maketitle}{%
1338 \ifbool{beamer@autopdfinfo}{%
1339 \patchcmd{\beamer@firstminutepatches}{%
1340 \inserttitle\ifx\insertsubtitle\@empty\else\ - \insertsubtitle\fi
1341 }{%
1342 \inserttitle\ifx\insertsubtitle\@empty\else\iftoggle{titlepunct}{}{:} \insertsubtitle\fi
1343 }{}{}%
1344 }{}%
1345 }{}%
1346 }%
1347 }
1348 %%
1349 %% Copyright (C) 2016-2022 by Alex Ball <[email protected]>
1350 %%
1351 %% End of file `beamerswitch.cls'.