summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ppt-slides/ppt-slides.dtx
blob: 54abab106f50c08f01c559df1d69c6830753288e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
% \iffalse meta-comment
% (The MIT License)
%
% Copyright (c) 2021-2023 Yegor Bugayenko
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the 'Software'), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
%
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
% \fi

% \CheckSum{0}
%
% \CharacterTable
%  {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
%   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
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}

% \GetFileInfo{ppt-slides.dtx}
% \DoNotIndex{\endgroup,\begingroup,\let,\else,\s,\n,\r,\\,\1,\fi}

% \iffalse
%<*driver>
\ProvidesFile{ppt-slides.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{ppt-slides}
%<*package>
[2023-11-08 0.3.0 Slide Decks a la Power Point]
%</package>
%<*driver>
\documentclass{ltxdoc}
\usepackage[T1]{fontenc}
\usepackage[tt=false, type1=true]{libertine}
\usepackage{microtype}
\AddToHook{env/verbatim/begin}{\microtypesetup{protrusion=false}}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage[runs=2,dtx,margin=0,small]{docshots}
\usepackage{href-ul}
\PageIndex
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
  \DocInput{ppt-slides.dtx}
  \PrintChanges
  \PrintIndex
\end{document}
%</driver>
% \fi

% \title{|ppt-slides|: \LaTeX{} Package for \\ Slide Decks \`{a} la Power Point\thanks{The sources are in GitHub at \href{https://github.com/yegor256/ppt-slides}{yegor256/ppt-slides}}}
% \author{Yegor Bugayenko \\ \texttt{yegor256@gmail.com}}
% \date{\filedate, \fileversion}
%
% \maketitle
%
% \section{Introduction}
%
% This package helps you render slide decks in PowerPoint\texttrademark{} style:
% \begin{docshot}
% \documentclass{article}
% \usepackage[template,scheme=dark]{ppt-slides}
% \begin{document}
% \begin{pptMiddle}
% \pptTitle{Hello, world!}{How are you?}
% \end{pptMiddle}
% \end{document}
% \end{docshot}

% It is recommended to use this package together with
% \href{https://github.com/yegor256/clicks}{clicks}:
% \begin{docshot}
% \documentclass{article}
% \usepackage[template,scheme=dark]{ppt-slides}
% \usepackage[static]{clicks}
% \begin{document}
% We help you make slide decks in \LaTeX:
% \plick{\pptBanner{Making Slides Is Easy}}
% \plick{Just use this package...}
% \plush{together with 'clicks' package.}
% They will look similar to what PowerPoint can
% make, but with the precision of \LaTeX. We
% recommend using us together with ``clicks.''
% \end{document}
% \end{docshot}

% \section{Layout}

% \DescribeMacro{\pptToc}
% \DescribeMacro{\pptChapter}
% First, split your story into chapters:
%\iffalse
%<*verb>
%\fi
\begin{verbatim}
\documentclass{article}
\usepackage{clicks}
\usepackage[template,scheme=light]{ppt-slides}
\begin{document}
\pptToc
\plush{\pptChapter{About Me}}
...
\plush{\pptChapter[Idea]{My Idea Is Novel}}
...
\plush{\pptChapter[FAQ]{Discussion \& Questions}}
...
\end{document}
\end{verbatim}
%\iffalse
%</verb>
%\fi
% |\pptToc| will render the table of contents in an interactive ``clickable'' format.
% Thanks to the use of \href{https://github.com/yegor256/crumbs}{crumbs}, there will
% be a navigation at the top left corner.

% \DescribeMacro{\pptSection}
% Then, put sections inside chapters:
%\iffalse
%<*verb>
%\fi
\begin{verbatim}
\begin{document}
\pptToc
\plush{\pptChapter{About Me}}
\plush{\pptSection[Student]{I'm a Student}}
...
\plush{\pptSection[Athlete]{Also, I'm an Athlete}}
...
\plush{\pptChapter[Idea]{My Idea Is Novel}}
\plush{\pptSection{Novelty}}
\plush{\pptSection{Impact}}
\end{document}
\end{verbatim}
%\iffalse
%</verb>
%\fi
% The |\pptChapter| and |\pptSection| commands used together will render
% nice two-level nagivation menu at the top left corner.

% \DescribeMacro{\pptLeft}
% \DescribeMacro{\pptRight}
% You can place the title of the presentation and your name at the bottom
% of each slide, on the left and on the right respectively:
%\iffalse
%<*verb>
%\fi
\begin{verbatim}
\documentclass{article}
\usepackage{clicks}
\usepackage[template,scheme=light]{ppt-slides}
\pptLeft{How Did I Spend Last Summer}
\pptRight{Yegor Bugayenko}
\begin{document}
...
\end{document}
\end{verbatim}
%\iffalse
%</verb>
%\fi
% If you don't use the |\pptLeft| or |\pptRight| commands, nothing will
% be printed at the bottom.

% \section{Commands}

% \DescribeMacro{\pptPic}
% You can add an image to the slide (the first argument is the width
% of the image in relation to |\textwidth|,
% while the second one is the path of it):
% \begin{docshot}
% \documentclass{article}
% \usepackage[template,scheme=dark]{ppt-slides}
% \begin{document}
% \pptPic{0.2}{socrates.jpg} \\
% This is Socrates, a Greek philosopher.
% \end{document}
% \end{docshot}

% \DescribeMacro{\pptHeader}
% You can add a piece of code to the slide (we recommend using \href{https://github.com/yegor256/ffcode}{ffcode}):
% \begin{docshot}
% \documentclass{article}
% \usepackage[template,scheme=dark]{ppt-slides}
% \usepackage{ffcode}
% \begin{document}
% \pptHeader{This is How You Print to Console:}
% \begin{ffcode}
% void main(char** args) {
%   printf("Hello, world!");
% }
% \end{ffcode}
% \end{document}
% \end{docshot}
% Don't use |\plick| or |\plush|, they won't work with code snippets.
% The |\pptHeader| command prints a header similar to what the |\pptSection| command prints, but
% doesn't start a new section.

% \DescribeMacro{\pptQuote}
% \DescribeMacro{\pptBanner}
% You can put a quote next to the image, by using the |\pptQuote| command:
% \begin{docshot}
% \documentclass{article}
% \usepackage[template,scheme=dark]{ppt-slides}
% \begin{document}
% \pptBanner{My Favorite Quote}
% \pptQuote{socrates.jpg}{The only true wisdom
% is in knowing you know nothing}{Socrates}
% \end{document}
% \end{docshot}

% \DescribeMacro{\pptThought}
% For an interesting thought in the middle of the slide, use |\pptThought|:
% \begin{docshot}
% \documentclass{article}
% \usepackage[template,scheme=dark]{ppt-slides}
% \begin{document}
% \pptThought{Socrates said that the only true
% wisdom is in knowing you know nothing. Was he
% a wise man?...}
% \end{document}
% \end{docshot}

% \DescribeMacro{pptMiddle}
% You can put your content vertically in the middle of the page, using the |pptMiddle| environment:
% \begin{docshot}
% \documentclass{article}
% \usepackage[template,scheme=dark]{ppt-slides}
% \begin{document}
% \begin{pptMiddle}
% ``Your time is limited, so don't waste it
% living someone else's life.'' --- Steve Jobs
% \end{pptMiddle}
% \end{document}
% \end{docshot}

% \DescribeMacro{\pptQR}
% Sometimes it's convenient to show a QR code to your audience instead of
% a URL, since it's easier to use --- they can scan it:
% \begin{docshot}
% \documentclass{article}
% \usepackage[template,scheme=dark]{ppt-slides}
% \begin{document}
% Check my blog post by this link: \\
% \pptQR{https://www.yegor256.com}
% \end{document}
% \end{docshot}
% The code will look like this, thanks to \href{https://ctan.org/pkg/qrcode}{qrcode} package that
% we use behind the scene.

% \DescribeMacro{pptWide}
% \DescribeMacro{pptWideOne}
% Sometimes you need your slide content to take all visible horizontal space:
% \begin{docshot}
% \documentclass{article}
% \usepackage[template,scheme=dark]{ppt-slides}
% \begin{document}
% \begin{pptWideOne}
% This paragraph is too long for some reasons,
% that's why must take all visible horizontal
% space, while normally the content has a wide
% margin on the left side of the page.
% \end{pptWideOne}
% \end{document}
% \end{docshot}
% You can also use |\begin{pptWide}{X}|,
% where |X| is the number of columns to render.

% \section{Package Options}

% \DescribeMacro{template}
% You start with a template for your slide deck:
%\iffalse
%<*verb>
%\fi
\begin{verbatim}
\documentclass{article}
\usepackage[template=9x6]{ppt-slides}
\begin{document}
...
\end{document}
\end{verbatim}
%\iffalse
%</verb>
%\fi
% There is only one template, which is used by default: |9x6|. If you don't
% specify the name, it will be used. If you don't use the |template| option at all,
% the default |article| will be rendered, which is not what you want.

% \DescribeMacro{scheme}
% You can choose a color scheme for your slides, using the |scheme| option
% of the package:
%\iffalse
%<*verb>
%\fi
\begin{verbatim}
\usepackage[template,scheme=light]{ppt-slides}
\end{verbatim}
%\iffalse
%</verb>
%\fi
% There are a few out-of-the-box schemes available: |light|, |dark|,
% |light-mono|, and |dark-mono|. You can design your own, using
% |ppt-light.tex| file as an example:
%\iffalse
%<*verb>
%\fi
\begin{verbatim}
\usepackage[template,scheme=/usr/local/my-colors.tex]{ppt-slides}
\end{verbatim}
%\iffalse
%</verb>
%\fi

% \DescribeMacro{directory}
% You can change the location of the templates and schemes by means of the |directory| package option:
%\iffalse
%<*verb>
%\fi
\begin{verbatim}
\usepackage[directory=/tmp,template=foo]{ppt-slides}
\end{verbatim}
%\iffalse
%</verb>
%\fi

% \DescribeMacro{nominutes}
% By default, if you render your slide deck in non-static mode (the |static| option for the ``clicks'' package),
% there will be minutes tracking in the right top corner of each slide. You can turn this off
% by using the |nominutes| option of the package:
%\iffalse
%<*verb>
%\fi
\begin{verbatim}
\usepackage[nominutes]{ppt-slides}
\end{verbatim}
%\iffalse
%</verb>
%\fi

% \StopEventually{}

% \section{Implementation}
% \changes{0.0.1}{2022/09/11}{First draft.}
% \changes{0.1.4}{2022/09/15}{The \texttt{nominutes} package option added.}
% \changes{0.1.5}{2022/09/19}{The default directory fixed.}
% \changes{0.2.0}{2022/12/03}{We migrated to the \texttt{ltxdoc} format and \texttt{.dtx} file.}

% First, we parse the package options:
%    \begin{macrocode}
\RequirePackage{pgfopts}
\makeatletter
\pgfkeys{
  /ppt-slides/.is family,
  /ppt-slides,
  template/.estore in = \ppt@template,
  template/.default = 9x6,
  scheme/.estore in = \ppt@scheme,
  directory/.estore in = \ppt@directory,
  directory/.default = ,
  nominutes/.estore in = \ppt@nominutes,
  directory
}
\ProcessPgfPackageOptions{/ppt-slides}
\makeatother
%    \end{macrocode}

% Then, we include the template:
%    \begin{macrocode}
\makeatletter\ifdefined\ppt@template
  \input{\ppt@directory ppt-templates/ppt-\ppt@template.tex}
\else
  \message{^^Jppt: No template is loaded, because
    the 'template' option is not specified}
\fi\makeatother
%    \end{macrocode}

% Then, we include the scheme:
%    \begin{macrocode}
\makeatletter\ifdefined\ppt@scheme
  \RequirePackage{xcolor}
  \input{\ppt@directory ppt-schemes/ppt-\ppt@scheme.tex}
\else
  \message{^^Jppt: No color scheme is loaded, because
    the 'scheme' option is not specified}
\fi\makeatother
%    \end{macrocode}

% Then, we include a few packages:
%    \begin{macrocode}
\RequirePackage{ifthen} % for if/then/else in LaTeX
\RequirePackage{href-ul} % for nice hyperlinks
\RequirePackage{pagecolor} % to change page color
\RequirePackage{varwidth} % for pptWide
\RequirePackage{qrcode} % to print QR codes
\RequirePackage{tikz} % for drawings in TOC
  \usetikzlibrary{calc} % for positioning of pinned boxes
\RequirePackage{tikzpagenodes} % for pptPin
\RequirePackage[inline]{enumitem} % for lists in crumbs
\RequirePackage{crumbs} % for crumbs
%    \end{macrocode}

% \begin{macro}{\pptMiddle}
% \changes{0.2.1}{2022/12/04}{The \texttt{\char`\\pptMiddle} command turned into \texttt{pptMiddle} environment.}
% Then, we define the |pptMiddle| environment:
%    \begin{macrocode}
\newenvironment{pptMiddle}
  {\vspace*{\fill}}
  {\vspace*{\fill}}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptBanner}
% Then, we define the |\pptBanner| command:
%    \begin{macrocode}
\newcommand\pptBanner[2][green]{%
  \par%
  {\setlength{\fboxsep}{6pt}%
    \colorbox{#1}{\color{\thepagecolor}\large #2}}%
  \par%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptChapter}
% Then, we define the |\pptChapter| command:
%    \begin{macrocode}
\newcommand\pptChapter[2][]{%
  \crumbection[#1]{#2}%
  \begin{pptMiddle}%
    {\large\ttfamily Chapter \#\the\value{section}:}%
    \newline%
    \rotatebox{1}{\pptBanner[blue]{\LARGE#2}}%
  \end{pptMiddle}%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptSection}
% Then, we define the |\pptSection| command:
%    \begin{macrocode}
\newcommand\pptSection[2][]{%
  \subcrumbection[#1]{#2}%
  \pptHeader{#2}%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptHeader}
% Then, we define the |\pptHeader| command:
%    \begin{macrocode}
\newcommand\pptHeader[1]{%
  \vspace*{-0.75in}\hspace*{-0.5in}%
  \rotatebox{1}{\pptBanner[orange]{\Large #1}}\vspace*{0.15in}%
  \par%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptTitle}
% Then, we define the |\pptTitle| command, which prints the |title| and |subtitle| on the
% first page. The first argument is the title, the second is the subtitle. If the second
% argument is empty, it won't be printed:
%    \begin{macrocode}
\newcommand\pptTitle[2]{%
  {\pptBanner{\Huge #1}}%
  \def\param{#2}%
  \ifx\param\empty\else%
    {\pptBanner{\large #2}}%
  \fi%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptToc}
% Then, we define the |\pptToc| command:
%    \begin{macrocode}
\newcommand*\pptTOC{}
\newcommand\pptToc[1][]{%
  \renewcommand*\pptTOC{}%
  \print{%
    \def\param{#1}%
    \ifx\param\empty\else%
      \pptBanner{#1}%
    \fi%
    \tikz{%
      \node (z) {%
        \begin{varwidth}{\textwidth}%
          \ifx\pptTOC\empty\else%
            \begin{itemize}[label={}]
              \pptTOC
            \end{itemize}
          \fi%
        \end{varwidth}%
      };%
      \path [draw=blue,line width=4pt] (z.north west) -- (z.south west);%
    }%
  }%
  \begin{@empty}%
    \renewcommand\crumb[2]{%
      \ifx\pptTOC\empty\else\ifdefined\click\click[0]\fi\fi
      \gappto\pptTOC{\item ##2}
    }
    \crumbs
  \end{@empty}%
  \ifdefined\flush\flush[1]\fi%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptQuote}
% Then, we define the |\pptQuote| command, with one optional and three mandatory arguments:
% \changes{0.3.0}{2023/11/08}{The \texttt{\char`\\pptQuote} command has got an optional parameter, where the name of the person on the photo can be specified.}
%    \begin{macrocode}
\RequirePackage{tabularx}
\newcommand\pptQuote[4][]{%
  \begin{tabularx}{\columnwidth}{c>{\raggedright\arraybackslash}X}%
    \raisebox{\dimexpr-\height+\ht\strutbox}{
      \parbox{0.25\textwidth+2pt}{%
        \raggedright%
        \pptPic{0.25}{#2}%
        \def\person{#1}%
        \ifx\person\empty\else%
          \par%
          \small%
          \person%
        \fi%
      }%
    }%
    &%
    ``#3''%
    \def\param{#4}%
    \ifx\param\empty\else%
      \newline\newline%
      \small%
      --- \param%
    \fi%
    \\%
  \end{tabularx}%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptPic}
% Then, we define the |\pptPic| command:
%    \begin{macrocode}
\newcommand\pptPic[2]{%
  {%
    \setlength{\fboxsep}{0pt}%
    \setlength{\fboxrule}{1pt}%
    \fcolorbox{gray}{white}{%
      \includegraphics[width=#1\columnwidth]{#2}%
    }%
  }%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptPin}
% Then, we define the |\pptPin| command:
%    \begin{macrocode}
\newcommand\pptPin[2][right]{%
  \begin{tikzpicture}[remember picture,overlay]%
    \ifthenelse{\equal{#1}{left}}%
    {%
      \node[anchor=north east] at
        ($(current page text area.north west) - (24pt, 18pt)$) {%
        \begin{minipage}{0.25\textwidth}%
          \raggedleft #2%
        \end{minipage}%
      };%
    }%
    {%
      \node[anchor=north east] at (current page text area.north east) {%
        \begin{minipage}{0.25\textwidth}%
          \raggedright #2%
        \end{minipage}%
      };%
    }%
  \end{tikzpicture}%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptThought}
% \changes{0.3.0}{2023/09/19}{The \texttt{\char`\\pptThought} command aligns text to the left.}
% Then, we define the |\pptThought| command:
%    \begin{macrocode}
\newcommand\pptThought[1]{%
  \begin{pptMiddle}%
    \tikz{%
      \node [inner sep=18pt] (z) {%
        \begin{varwidth}{0.8\textwidth}%
          \raggedright\Large #1%
        \end{varwidth}%
      };
      \path [draw=green,line width=8pt] (z.north west) -- (z.south west);
    }%
  \end{pptMiddle}%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptSnippet}
% Then, we define the |\pptSnippet| command:
%    \begin{macrocode}
\newcommand\pptSnippet[2][\small]{%
  \begin{samepage}%
    #1\verbatiminput{#2}%
  \end{samepage}%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptQR}
% Then, we define the |\pptQR| command:
%    \begin{macrocode}
\newcommand\pptQR[2][2in]{%
  \tikz{%
    \node[draw=white]{%
      \href{#2}{%
        \qrcode[height=#1]{#2}%
      }%
    }%
  }%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\pptPinQR}
% Then, we define the |\pptPinQR| command:
%    \begin{macrocode}
\RequirePackage{seqsplit}
\newcommand\pptPinQR[2][right]{%
  \pptPin[#1]{%
    \begin{minipage}{1.4in}%
      \raggedleft%
      \pptQR[1in]{#2}%
      \\[3pt]
      \ttfamily\fontsize{8pt}{10pt}\selectfont%
      \seqsplit{#2} \href{#2}{$\rightarrow$}%
      \\
    \end{minipage}%
  }%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{pptWide}
% Finally, we define the |pptWide| and |pptWideOne| environments:
%    \begin{macrocode}
\newenvironment{pptWideOne}
  {\begin{adjustwidth}{-2in}{-1in}}
  {\end{adjustwidth}}
\newenvironment{pptWide}[1]
  {\begin{pptWideOne}\begin{multicols}{#1}}
  {\end{multicols}\end{pptWideOne}}
%    \end{macrocode}
% \end{macro}

\endinput

% \Finale

% \clearpage
% \printbibliography
% \clearpage

% \PrintChanges
% \clearpage
% \PrintIndex