| 1 |
% \iffalse meta-comment |
| 2 |
% SPDX-FileCopyrightText: Copyright (c) 2022-2026 Yegor Bugayenko |
| 3 |
% SPDX-License-Identifier: MIT |
| 4 |
% \fi |
| 5 |
|
| 6 |
% \CheckSum{0} |
| 7 |
% |
| 8 |
% \CharacterTable |
| 9 |
% {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 |
| 10 |
% 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 |
| 11 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 12 |
% Exclamation \! Double quote \" Hash (number) \# |
| 13 |
% Dollar \$ Percent \% Ampersand \& |
| 14 |
% Acute accent \' Left paren \( Right paren \) |
| 15 |
% Asterisk \* Plus \+ Comma \, |
| 16 |
% Minus \- Point \. Solidus \/ |
| 17 |
% Colon \: Semicolon \; Less than \< |
| 18 |
% Equals \= Greater than \> Question mark \? |
| 19 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 20 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 21 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 22 |
% Right brace \} Tilde \~} |
| 23 |
|
| 24 |
% \GetFileInfo{ppt-slides.dtx} |
| 25 |
% \DoNotIndex{\endgroup,\begingroup,\let,\else,\s,\n,\r,\\,\1,\fi} |
| 26 |
|
| 27 |
% \iffalse |
| 28 |
%<*driver> |
| 29 |
\ProvidesFile{ppt-slides.dtx} |
| 30 |
%</driver> |
| 31 |
%<package>\NeedsTeXFormat{LaTeX2e} |
| 32 |
%<package>\ProvidesPackage{ppt-slides} |
| 33 |
%<*package> |
| 34 |
[2026-05-19 0.7.0 Slide Decks a la Power Point] |
| 35 |
%</package> |
| 36 |
%<*driver> |
| 37 |
\documentclass{ltxdoc} |
| 38 |
\usepackage[T1]{fontenc} |
| 39 |
\usepackage{lmodern} |
| 40 |
\usepackage{microtype} |
| 41 |
\AddToHook{env/verbatim/begin}{\microtypesetup{protrusion=false}} |
| 42 |
\usepackage{graphicx} |
| 43 |
\usepackage{xcolor} |
| 44 |
\usepackage[runs=2,dtx,margin=0,small]{docshots} |
| 45 |
\usepackage{href-ul} |
| 46 |
\PageIndex |
| 47 |
\EnableCrossrefs |
| 48 |
\CodelineIndex |
| 49 |
\RecordChanges |
| 50 |
\begin{document} |
| 51 |
\DocInput{ppt-slides.dtx} |
| 52 |
\PrintChanges |
| 53 |
\PrintIndex |
| 54 |
\end{document} |
| 55 |
%</driver> |
| 56 |
% \fi |
| 57 |
|
| 58 |
% \title{|ppt-slides|: \LaTeX{} Package for \\ Slide Decks \`{a} la PowerPoint\thanks{The sources are in GitHub at \href{https://github.com/yegor256/ppt-slides}{yegor256/ppt-slides}}} |
| 59 |
% \author{Yegor Bugayenko \\ \texttt{[email protected]}} |
| 60 |
% \date{\filedate, \fileversion} |
| 61 |
% |
| 62 |
% \maketitle |
| 63 |
% |
| 64 |
% \section{Introduction} |
| 65 |
% |
| 66 |
% This package renders slide decks in the PowerPoint\texttrademark{} style: |
| 67 |
% \begin{docshot} |
| 68 |
% \documentclass{article} |
| 69 |
% \usepackage[template,scheme=dark]{ppt-slides} |
| 70 |
% \begin{document} |
| 71 |
% \begin{pptMiddle} |
| 72 |
% \pptTitle{Hello, world!}{How are you?} |
| 73 |
% \end{pptMiddle} |
| 74 |
% \end{document} |
| 75 |
% \end{docshot} |
| 76 |
|
| 77 |
% It is recommended that this package be employed in conjunction with |
| 78 |
% \href{https://github.com/yegor256/clicks}{clicks}: |
| 79 |
% \begin{docshot} |
| 80 |
% \documentclass{article} |
| 81 |
% \usepackage[template,scheme=dark]{ppt-slides} |
| 82 |
% \usepackage[static]{clicks} |
| 83 |
% \begin{document} |
| 84 |
% Slide decks may be composed in \LaTeX: |
| 85 |
% \plick{\pptBanner{Making Slides Is Easy}} |
| 86 |
% \plick{Simply employ this package\ldots} |
| 87 |
% \plush{together with the 'clicks' package.} |
| 88 |
% The result resembles what PowerPoint |
| 89 |
% produces, yet with the precision of \LaTeX. |
| 90 |
% Use in concert with ``clicks'' is recommended. |
| 91 |
% \end{document} |
| 92 |
% \end{docshot} |
| 93 |
|
| 94 |
% \section{Layout} |
| 95 |
|
| 96 |
% \DescribeMacro{\pptToc} |
| 97 |
% \DescribeMacro{\pptChapter} |
| 98 |
% First, the narrative is divided into chapters: |
| 99 |
%\iffalse |
| 100 |
%<*verb> |
| 101 |
%\fi |
| 102 |
\begin{verbatim} |
| 103 |
\documentclass{article} |
| 104 |
\usepackage{clicks} |
| 105 |
\usepackage[template,scheme=light]{ppt-slides} |
| 106 |
\begin{document} |
| 107 |
\pptToc |
| 108 |
\plush{\pptChapter{About Me}} |
| 109 |
... |
| 110 |
\plush{\pptChapter[Idea]{My Idea Is Novel}} |
| 111 |
... |
| 112 |
\plush{\pptChapter[FAQ]{Discussion \& Questions}} |
| 113 |
... |
| 114 |
\end{document} |
| 115 |
\end{verbatim} |
| 116 |
%\iffalse |
| 117 |
%</verb> |
| 118 |
%\fi |
| 119 |
% |\pptToc| renders the table of contents in an interactive ``clickable'' format. |
| 120 |
% Through the use of \href{https://github.com/yegor256/crumbs}{crumbs}, a navigation |
| 121 |
% appears at the upper left corner. |
| 122 |
|
| 123 |
% \DescribeMacro{\pptSection} |
| 124 |
% Sections are then placed within chapters: |
| 125 |
%\iffalse |
| 126 |
%<*verb> |
| 127 |
%\fi |
| 128 |
\begin{verbatim} |
| 129 |
\begin{document} |
| 130 |
\pptToc |
| 131 |
\plush{\pptChapter{About Me}} |
| 132 |
\plush{\pptSection[Student]{I'm a Student}} |
| 133 |
... |
| 134 |
\plush{\pptSection[Athlete]{Also, I'm an Athlete}} |
| 135 |
... |
| 136 |
\plush{\pptChapter[Idea]{My Idea Is Novel}} |
| 137 |
\plush{\pptSection{Novelty}} |
| 138 |
\plush{\pptSection{Impact}} |
| 139 |
\end{document} |
| 140 |
\end{verbatim} |
| 141 |
%\iffalse |
| 142 |
%</verb> |
| 143 |
%\fi |
| 144 |
% The |\pptChapter| and |\pptSection| commands employed in tandem render |
| 145 |
% an elegant two-level navigation menu at the upper left corner. |
| 146 |
|
| 147 |
% \DescribeMacro{\pptLeft} |
| 148 |
% \DescribeMacro{\pptRight} |
| 149 |
% The title of the presentation and the author's name may be placed at the foot |
| 150 |
% of each slide, on the left and on the right respectively: |
| 151 |
%\iffalse |
| 152 |
%<*verb> |
| 153 |
%\fi |
| 154 |
\begin{verbatim} |
| 155 |
\documentclass{article} |
| 156 |
\usepackage{clicks} |
| 157 |
\usepackage[template,scheme=light]{ppt-slides} |
| 158 |
\pptLeft{How Did I Spend Last Summer} |
| 159 |
\pptRight{Yegor Bugayenko} |
| 160 |
\begin{document} |
| 161 |
... |
| 162 |
\end{document} |
| 163 |
\end{verbatim} |
| 164 |
%\iffalse |
| 165 |
%</verb> |
| 166 |
%\fi |
| 167 |
% Should neither the |\pptLeft| nor the |\pptRight| command be used, nothing |
| 168 |
% is printed at the foot. |
| 169 |
|
| 170 |
% \section{Commands} |
| 171 |
|
| 172 |
% \DescribeMacro{\pptPic} |
| 173 |
% An image may be added to a slide (the first argument denotes the width |
| 174 |
% of the image relative to |\textwidth|, while the second supplies its path): |
| 175 |
% \begin{docshot} |
| 176 |
% \documentclass{article} |
| 177 |
% \usepackage[template,scheme=dark]{ppt-slides} |
| 178 |
% \begin{document} |
| 179 |
% \pptPic{0.2}{socrates.jpg} \\ |
| 180 |
% This is Socrates, a Greek philosopher. |
| 181 |
% \end{document} |
| 182 |
% \end{docshot} |
| 183 |
|
| 184 |
% \DescribeMacro{\pptHeader} |
| 185 |
% A code fragment may be added to a slide (the use of \href{https://github.com/yegor256/ffcode}{ffcode} is recommended): |
| 186 |
% \begin{docshot} |
| 187 |
% \documentclass{article} |
| 188 |
% \usepackage[template,scheme=dark]{ppt-slides} |
| 189 |
% \usepackage{ffcode} |
| 190 |
% \begin{document} |
| 191 |
% \pptHeader{This is How You Print to Console:} |
| 192 |
% \begin{ffcode} |
| 193 |
% void main(char** args) { |
| 194 |
% printf("Hello, world!"); |
| 195 |
% } |
| 196 |
% \end{ffcode} |
| 197 |
% \end{document} |
| 198 |
% \end{docshot} |
| 199 |
% |\plick| or |\plush| should not be used here, as they do not function with code snippets. |
| 200 |
% The |\pptHeader| command prints a header similar to that produced by the |\pptSection| command, |
| 201 |
% yet without commencing a new section. |
| 202 |
|
| 203 |
% \DescribeMacro{\pptQuote} |
| 204 |
% \DescribeMacro{\pptBanner} |
| 205 |
% A quotation may be placed beside an image by means of the |\pptQuote| command: |
| 206 |
% \begin{docshot} |
| 207 |
% \documentclass{article} |
| 208 |
% \usepackage[template,scheme=dark]{ppt-slides} |
| 209 |
% \begin{document} |
| 210 |
% \pptBanner{A Cherished Quote} |
| 211 |
% \pptQuote{socrates.jpg}{The only true wisdom |
| 212 |
% lies in knowing that one knows nothing}{Socrates} |
| 213 |
% \end{document} |
| 214 |
% \end{docshot} |
| 215 |
|
| 216 |
% \DescribeMacro{\pptThought} |
| 217 |
% For a noteworthy thought to be placed at the centre of the slide, |\pptThought| is employed: |
| 218 |
% \begin{docshot} |
| 219 |
% \documentclass{article} |
| 220 |
% \usepackage[template,scheme=dark]{ppt-slides} |
| 221 |
% \begin{document} |
| 222 |
% \pptThought{Socrates said that the only true |
| 223 |
% wisdom lies in knowing that one knows nothing. |
| 224 |
% Was he a wise man?...} |
| 225 |
% \end{document} |
| 226 |
% \end{docshot} |
| 227 |
|
| 228 |
% \DescribeMacro{pptMiddle} |
| 229 |
% Content may be positioned vertically at the centre of the page by means of the |pptMiddle| environment: |
| 230 |
% \begin{docshot} |
| 231 |
% \documentclass{article} |
| 232 |
% \usepackage[template,scheme=dark]{ppt-slides} |
| 233 |
% \begin{document} |
| 234 |
% \begin{pptMiddle} |
| 235 |
% ``One's time is limited; it ought not be |
| 236 |
% wasted living someone else's life.'' --- Steve Jobs |
| 237 |
% \end{pptMiddle} |
| 238 |
% \end{document} |
| 239 |
% \end{docshot} |
| 240 |
|
| 241 |
% \DescribeMacro{\pptQR} |
| 242 |
% On occasion, it is more convenient to present a QR code to the audience in lieu of |
| 243 |
% a URL, since the former is more readily consulted---it may simply be scanned: |
| 244 |
% \begin{docshot} |
| 245 |
% \documentclass{article} |
| 246 |
% \usepackage[template,scheme=dark]{ppt-slides} |
| 247 |
% \begin{document} |
| 248 |
% The blog post may be consulted at: \\ |
| 249 |
% \pptQR{https://www.yegor256.com} |
| 250 |
% \end{document} |
| 251 |
% \end{docshot} |
| 252 |
% The code is rendered thus by virtue of the \href{https://ctan.org/pkg/qrcode}{qrcode} package |
| 253 |
% employed internally. |
| 254 |
|
| 255 |
% \DescribeMacro{pptWide} |
| 256 |
% \DescribeMacro{pptWideOne} |
| 257 |
% Slide content occasionally needs to occupy the entire visible horizontal width: |
| 258 |
% \begin{docshot} |
| 259 |
% \documentclass{article} |
| 260 |
% \usepackage[template,scheme=dark]{ppt-slides} |
| 261 |
% \begin{document} |
| 262 |
% \begin{pptWideOne} |
| 263 |
% This paragraph happens to be unusually long, |
| 264 |
% and must therefore occupy the entire visible |
| 265 |
% horizontal width, although the content |
| 266 |
% ordinarily bears a generous left margin. |
| 267 |
% \end{pptWideOne} |
| 268 |
% \end{document} |
| 269 |
% \end{docshot} |
| 270 |
% The form |\begin{pptWide}{X}| is likewise admissible, |
| 271 |
% where |X| denotes the number of columns to be rendered. |
| 272 |
|
| 273 |
% \section{Package Options} |
| 274 |
|
| 275 |
% \DescribeMacro{template} |
| 276 |
% Each slide deck begins with a template: |
| 277 |
%\iffalse |
| 278 |
%<*verb> |
| 279 |
%\fi |
| 280 |
\begin{verbatim} |
| 281 |
\documentclass{article} |
| 282 |
\usepackage[template=9x6]{ppt-slides} |
| 283 |
\begin{document} |
| 284 |
... |
| 285 |
\end{document} |
| 286 |
\end{verbatim} |
| 287 |
%\iffalse |
| 288 |
%</verb> |
| 289 |
%\fi |
| 290 |
% Only one template is supplied and is used by default: |9x6|. Should the |
| 291 |
% name be omitted, this template is selected. Should the |template| option |
| 292 |
% itself be omitted entirely, the default |article| is rendered, which is |
| 293 |
% rarely the desired outcome. |
| 294 |
|
| 295 |
% \DescribeMacro{scheme} |
| 296 |
% A colour scheme for the slides may be selected by means of the |scheme| option |
| 297 |
% of the package: |
| 298 |
%\iffalse |
| 299 |
%<*verb> |
| 300 |
%\fi |
| 301 |
\begin{verbatim} |
| 302 |
\usepackage[template,scheme=light]{ppt-slides} |
| 303 |
\end{verbatim} |
| 304 |
%\iffalse |
| 305 |
%</verb> |
| 306 |
%\fi |
| 307 |
% Several schemes are available out of the box: |light|, |dark|, |
| 308 |
% |light-mono|, and |dark-mono|. A bespoke scheme may also be devised, taking |
| 309 |
% the |ppt-light.tex| file as a model: |
| 310 |
%\iffalse |
| 311 |
%<*verb> |
| 312 |
%\fi |
| 313 |
\begin{verbatim} |
| 314 |
\usepackage[template,scheme=/usr/local/my-colors.tex]{ppt-slides} |
| 315 |
\end{verbatim} |
| 316 |
%\iffalse |
| 317 |
%</verb> |
| 318 |
%\fi |
| 319 |
|
| 320 |
% \DescribeMacro{directory} |
| 321 |
% The location of the templates and schemes may be altered by means of the |directory| package option: |
| 322 |
%\iffalse |
| 323 |
%<*verb> |
| 324 |
%\fi |
| 325 |
\begin{verbatim} |
| 326 |
\usepackage[directory=/tmp,template=foo]{ppt-slides} |
| 327 |
\end{verbatim} |
| 328 |
%\iffalse |
| 329 |
%</verb> |
| 330 |
%\fi |
| 331 |
|
| 332 |
% \DescribeMacro{nominutes} |
| 333 |
% By default, when the slide deck is rendered in non-static mode (the |static| option of the ``clicks'' package being absent), |
| 334 |
% a minute tracker appears at the upper right corner of each slide. This may be disabled |
| 335 |
% by means of the |nominutes| option of the package: |
| 336 |
%\iffalse |
| 337 |
%<*verb> |
| 338 |
%\fi |
| 339 |
\begin{verbatim} |
| 340 |
\usepackage[nominutes]{ppt-slides} |
| 341 |
\end{verbatim} |
| 342 |
%\iffalse |
| 343 |
%</verb> |
| 344 |
%\fi |
| 345 |
|
| 346 |
% \DescribeMacro{nocrumbs} |
| 347 |
% By default, the upper left corner of each slide bears so-called crumbs. These may be removed |
| 348 |
% by means of the |nocrumbs| package option: |
| 349 |
%\iffalse |
| 350 |
%<*verb> |
| 351 |
%\fi |
| 352 |
\begin{verbatim} |
| 353 |
\usepackage[nocrumbs]{ppt-slides} |
| 354 |
\end{verbatim} |
| 355 |
%\iffalse |
| 356 |
%</verb> |
| 357 |
%\fi |
| 358 |
|
| 359 |
% \StopEventually{} |
| 360 |
|
| 361 |
% \section{Implementation} |
| 362 |
% \changes{0.0.1}{2022/09/11}{First draft.} |
| 363 |
% \changes{0.1.4}{2022/09/15}{The \texttt{nominutes} package option added.} |
| 364 |
% \changes{0.1.5}{2022/09/19}{The default directory fixed.} |
| 365 |
% \changes{0.2.0}{2022/12/03}{We migrated to the \texttt{ltxdoc} format and \texttt{.dtx} file.} |
| 366 |
% \changes{0.5.0}{2025/04/17}{The \texttt{nocrumbs} package option was introduced.} |
| 367 |
|
| 368 |
% First, we parse the package options: |
| 369 |
% \begin{macrocode} |
| 370 |
\RequirePackage{pgfopts} |
| 371 |
\makeatletter |
| 372 |
\pgfkeys{ |
| 373 |
/ppt-slides/.is family, |
| 374 |
/ppt-slides, |
| 375 |
template/.estore in = \ppt@template, |
| 376 |
template/.default = 9x6, |
| 377 |
scheme/.estore in = \ppt@scheme, |
| 378 |
directory/.estore in = \ppt@directory, |
| 379 |
directory/.default = , |
| 380 |
nominutes/.estore in = \ppt@nominutes, |
| 381 |
nocrumbs/.estore in = \ppt@nocrumbs, |
| 382 |
directory |
| 383 |
} |
| 384 |
\ProcessPgfPackageOptions{/ppt-slides} |
| 385 |
\makeatother |
| 386 |
% \end{macrocode} |
| 387 |
|
| 388 |
% Then, we include the template: |
| 389 |
% \begin{macrocode} |
| 390 |
\makeatletter\ifdefined\ppt@template |
| 391 |
\input{\ppt@directory ppt-templates/ppt-\[email protected]} |
| 392 |
\else |
| 393 |
\message{^^Jppt: No template is loaded, because |
| 394 |
the 'template' option is not specified} |
| 395 |
\fi\makeatother |
| 396 |
% \end{macrocode} |
| 397 |
|
| 398 |
% Then, we include the scheme: |
| 399 |
% \begin{macrocode} |
| 400 |
\makeatletter\ifdefined\ppt@scheme |
| 401 |
\RequirePackage{xcolor} |
| 402 |
\input{\ppt@directory ppt-schemes/ppt-\[email protected]} |
| 403 |
\else |
| 404 |
\message{^^Jppt: No color scheme is loaded, because |
| 405 |
the 'scheme' option is not specified} |
| 406 |
\fi\makeatother |
| 407 |
% \end{macrocode} |
| 408 |
|
| 409 |
% Then, we include \href{https://ctan.org/pkg/ifthen}{ifthen} |
| 410 |
% in order to enable |if/then/else| commands: |
| 411 |
% \begin{macrocode} |
| 412 |
\RequirePackage{ifthen} |
| 413 |
% \end{macrocode} |
| 414 |
|
| 415 |
% Then, we include \href{https://ctan.org/pkg/href-ul}{href-ul} |
| 416 |
% in order to enable underlined hyperlinks: |
| 417 |
% \begin{macrocode} |
| 418 |
\RequirePackage{href-ul} |
| 419 |
% \end{macrocode} |
| 420 |
|
| 421 |
% Then, we include \href{https://ctan.org/pkg/pagecolor}{pagecolor} |
| 422 |
% in order to make it possible to change the background color of a page: |
| 423 |
% \begin{macrocode} |
| 424 |
\RequirePackage{pagecolor} |
| 425 |
% \end{macrocode} |
| 426 |
|
| 427 |
% Then, we include \href{https://ctan.org/pkg/varwidth}{varwidth} |
| 428 |
% in order to change the width of the page, inside |pptWide|: |
| 429 |
% \begin{macrocode} |
| 430 |
\RequirePackage{varwidth} |
| 431 |
% \end{macrocode} |
| 432 |
|
| 433 |
% Then, we include \href{https://ctan.org/pkg/csquotes}{csquotes} |
| 434 |
% in order to use double quotes: |
| 435 |
% \begin{macrocode} |
| 436 |
\RequirePackage{csquotes} |
| 437 |
% \end{macrocode} |
| 438 |
|
| 439 |
% Then, we include \href{https://ctan.org/pkg/qrcode}{qrcode} |
| 440 |
% in order to render QR codes: |
| 441 |
% \begin{macrocode} |
| 442 |
\RequirePackage{qrcode} |
| 443 |
% \end{macrocode} |
| 444 |
|
| 445 |
% Then, we include \href{https://ctan.org/pkg/tikz}{tikz} |
| 446 |
% in order to position elements on the page, especially in the Table of Contents: |
| 447 |
% \begin{macrocode} |
| 448 |
\RequirePackage{tikz} |
| 449 |
% \end{macrocode} |
| 450 |
|
| 451 |
% Then, we include \href{https://ctan.org/pkg/tikzpagenodes}{tikzpagenodes} |
| 452 |
% in order to pin a block in |\pptPin|: |
| 453 |
% \begin{macrocode} |
| 454 |
\RequirePackage{tikzpagenodes} |
| 455 |
% \end{macrocode} |
| 456 |
|
| 457 |
% Then, we include \href{https://ctan.org/pkg/enumitem}{enumitem} |
| 458 |
% in order to render inline lists in crumbs: |
| 459 |
% \begin{macrocode} |
| 460 |
\PassOptionsToPackage{inline}{enumitem} |
| 461 |
\RequirePackage{enumitem} |
| 462 |
% \end{macrocode} |
| 463 |
|
| 464 |
% Then, we include \href{https://ctan.org/pkg/crumbs}{crumbs} |
| 465 |
% in order to show top-page menus: |
| 466 |
% \begin{macrocode} |
| 467 |
\RequirePackage{crumbs} |
| 468 |
% \end{macrocode} |
| 469 |
|
| 470 |
% Then, we include \href{https://ctan.org/pkg/calc}{calc} |
| 471 |
% in order to calculate positions of elements more precisely: |
| 472 |
% \changes{0.3.1}{2024/01/13}{The \texttt{calc} package added.} |
| 473 |
% \begin{macrocode} |
| 474 |
\RequirePackage{calc} |
| 475 |
% \end{macrocode} |
| 476 |
|
| 477 |
% Then, we include \href{https://ctan.org/pkg/tabularx}{tabularx} |
| 478 |
% in order to render |\pptQuote|: |
| 479 |
% \begin{macrocode} |
| 480 |
\RequirePackage{tabularx} |
| 481 |
% \end{macrocode} |
| 482 |
|
| 483 |
% Then, we include \href{https://ctan.org/pkg/seqsplit}{seqsplit} |
| 484 |
% in order to split long links: |
| 485 |
% \begin{macrocode} |
| 486 |
\RequirePackage{seqsplit} |
| 487 |
% \end{macrocode} |
| 488 |
|
| 489 |
% \begin{macro}{\pptMiddle} |
| 490 |
% \changes{0.2.1}{2022/12/04}{The \texttt{\char`\\pptMiddle} command turned into \texttt{pptMiddle} environment.} |
| 491 |
% Then, we define the |pptMiddle| environment: |
| 492 |
% \begin{macrocode} |
| 493 |
\newenvironment{pptMiddle} |
| 494 |
{\vspace*{\fill}} |
| 495 |
{\vspace*{\fill}} |
| 496 |
% \end{macrocode} |
| 497 |
% \end{macro} |
| 498 |
|
| 499 |
% \begin{macro}{\pptBanner} |
| 500 |
% Then, we define the |\pptBanner| command: |
| 501 |
% \begin{macrocode} |
| 502 |
\newcommand\pptBanner[2][green]{% |
| 503 |
\par% |
| 504 |
{\setlength{\fboxsep}{6pt}% |
| 505 |
\colorbox{#1}{\color{\thepagecolor}\large #2}}% |
| 506 |
\par% |
| 507 |
} |
| 508 |
% \end{macrocode} |
| 509 |
% \end{macro} |
| 510 |
|
| 511 |
% \begin{macro}{\pptChapter} |
| 512 |
% \changes{0.4.0}{2024/10/18}{The \texttt{\char`\\pptChapterLabel} command introduced.} |
| 513 |
% Then, we define the |\pptChapter| and |\pptChapterLabel| commands: |
| 514 |
% \begin{macrocode} |
| 515 |
\newcommand\pptChapterLabel{Chapter} |
| 516 |
\newcommand\pptChapter[2][]{% |
| 517 |
\crumbection[#1]{#2}% |
| 518 |
\begin{pptMiddle}% |
| 519 |
{\large\ttfamily \pptChapterLabel{} \#\the\value{section}:}% |
| 520 |
\newline% |
| 521 |
\rotatebox{1}{\pptBanner[blue]{\LARGE#2}}% |
| 522 |
\end{pptMiddle}% |
| 523 |
} |
| 524 |
% \end{macrocode} |
| 525 |
% \end{macro} |
| 526 |
|
| 527 |
% \begin{macro}{\pptSection} |
| 528 |
% Then, we define the |\pptSection| command: |
| 529 |
% \begin{macrocode} |
| 530 |
\newcommand\pptSection[2][]{% |
| 531 |
\subcrumbection[#1]{#2}% |
| 532 |
\pptHeader{#2}% |
| 533 |
} |
| 534 |
% \end{macrocode} |
| 535 |
% \end{macro} |
| 536 |
|
| 537 |
% \begin{macro}{\pptHeader} |
| 538 |
% Then, we define the |\pptHeader| command: |
| 539 |
% \begin{macrocode} |
| 540 |
\newcommand\pptHeader[1]{% |
| 541 |
\vspace*{-0.75in}\hspace*{-0.5in}% |
| 542 |
\rotatebox{1}{\pptBanner[orange]{\Large #1}}\vspace*{0.15in}% |
| 543 |
\par% |
| 544 |
} |
| 545 |
% \end{macrocode} |
| 546 |
% \end{macro} |
| 547 |
|
| 548 |
% \begin{macro}{\pptTitle} |
| 549 |
% Then, we define the |\pptTitle| command, which prints the |title| and |subtitle| on the |
| 550 |
% first page. The first argument is the title, the second is the subtitle. If the second |
| 551 |
% argument is empty, it won't be printed: |
| 552 |
% \begin{macrocode} |
| 553 |
\newcommand\pptTitle[2]{% |
| 554 |
{\pptBanner{\Huge #1}}% |
| 555 |
\def\param{#2}% |
| 556 |
\ifx\param\empty\else% |
| 557 |
{\pptBanner{\large #2}}% |
| 558 |
\fi% |
| 559 |
} |
| 560 |
% \end{macrocode} |
| 561 |
% \end{macro} |
| 562 |
|
| 563 |
% \begin{macro}{\pptToc} |
| 564 |
% Then, we define the |\pptToc| command: |
| 565 |
% \begin{macrocode} |
| 566 |
\newcommand*\pptTOC{} |
| 567 |
\newcommand\pptToc[1][]{% |
| 568 |
\renewcommand*\pptTOC{}% |
| 569 |
\print{% |
| 570 |
\def\param{#1}% |
| 571 |
\ifx\param\empty\else% |
| 572 |
\pptBanner{#1}% |
| 573 |
\fi% |
| 574 |
\tikz{% |
| 575 |
\node (z) {% |
| 576 |
\begin{varwidth}{\textwidth}% |
| 577 |
\ifx\pptTOC\empty\else% |
| 578 |
\begin{itemize}[label={}] |
| 579 |
\pptTOC |
| 580 |
\end{itemize} |
| 581 |
\fi% |
| 582 |
\end{varwidth}% |
| 583 |
};% |
| 584 |
\path [draw=blue,line width=4pt] (z.north west) -- (z.south west);% |
| 585 |
}% |
| 586 |
}% |
| 587 |
\begin{@empty}% |
| 588 |
\renewcommand\crumb[2]{% |
| 589 |
\ifx\pptTOC\empty\else\ifdefined\click\click[0]\fi\fi |
| 590 |
\gappto\pptTOC{\item ##2} |
| 591 |
} |
| 592 |
\crumbs |
| 593 |
\end{@empty}% |
| 594 |
\ifdefined\flush\flush[1]\fi% |
| 595 |
} |
| 596 |
% \end{macrocode} |
| 597 |
% \end{macro} |
| 598 |
|
| 599 |
% \begin{macro}{\pptQuote} |
| 600 |
% Then, we define the |\pptQuote| command, with one optional and three mandatory arguments: |
| 601 |
% \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.} |
| 602 |
% \begin{macrocode} |
| 603 |
\newcommand\pptQuote[4][]{% |
| 604 |
\begin{tabularx}{\columnwidth}{c>{\raggedright\arraybackslash}X}% |
| 605 |
\raisebox{\dimexpr-\height+\ht\strutbox}{ |
| 606 |
\parbox{0.25\textwidth+2pt}{% |
| 607 |
\raggedright% |
| 608 |
\pptPic{0.25}{#2}% |
| 609 |
\def\person{#1}% |
| 610 |
\ifx\person\empty\else% |
| 611 |
\par% |
| 612 |
\small% |
| 613 |
\person% |
| 614 |
\fi% |
| 615 |
}% |
| 616 |
}% |
| 617 |
&% |
| 618 |
\enquote{#3{}}% |
| 619 |
\def\param{#4}% |
| 620 |
\ifx\param\empty\else% |
| 621 |
\par\vspace*{1em}% |
| 622 |
\small% |
| 623 |
\textemdash{} \param% |
| 624 |
\par% |
| 625 |
\fi% |
| 626 |
\\% |
| 627 |
\end{tabularx}% |
| 628 |
} |
| 629 |
% \end{macrocode} |
| 630 |
% \end{macro} |
| 631 |
|
| 632 |
% \begin{macro}{\pptPic} |
| 633 |
% Then, we define the |\pptPic| command: |
| 634 |
% \begin{macrocode} |
| 635 |
\newcommand\pptPic[2]{% |
| 636 |
{% |
| 637 |
\setlength{\fboxsep}{0pt}% |
| 638 |
\setlength{\fboxrule}{1pt}% |
| 639 |
\fcolorbox{gray}{white}{% |
| 640 |
\includegraphics[width=#1\columnwidth]{#2}% |
| 641 |
}% |
| 642 |
}% |
| 643 |
} |
| 644 |
% \end{macrocode} |
| 645 |
% \end{macro} |
| 646 |
|
| 647 |
% \begin{macro}{\pptPin} |
| 648 |
% Then, we define the |\pptPin| command: |
| 649 |
% \begin{macrocode} |
| 650 |
\newcommand\pptPin[2][right]{% |
| 651 |
\begin{tikzpicture}[remember picture,overlay]% |
| 652 |
\ifthenelse{\equal{#1}{left}}% |
| 653 |
{% |
| 654 |
\node[anchor=north east] at |
| 655 |
($(current page text area.north west) - (24pt, 18pt)$) {% |
| 656 |
\begin{minipage}{0.25\textwidth}% |
| 657 |
\raggedleft #2% |
| 658 |
\end{minipage}% |
| 659 |
};% |
| 660 |
}% |
| 661 |
{% |
| 662 |
\node[anchor=north east] at (current page text area.north east) {% |
| 663 |
\begin{minipage}{0.25\textwidth}% |
| 664 |
\raggedright #2% |
| 665 |
\end{minipage}% |
| 666 |
};% |
| 667 |
}% |
| 668 |
\end{tikzpicture}% |
| 669 |
} |
| 670 |
% \end{macrocode} |
| 671 |
% \end{macro} |
| 672 |
|
| 673 |
% \begin{macro}{\pptThought} |
| 674 |
% \changes{0.3.0}{2023/09/19}{The \texttt{\char`\\pptThought} command aligns text to the left.} |
| 675 |
% Then, we define the |\pptThought| command: |
| 676 |
% \begin{macrocode} |
| 677 |
\newcommand\pptThought[1]{% |
| 678 |
\begin{pptMiddle}% |
| 679 |
\tikz{% |
| 680 |
\node [inner sep=18pt] (z) {% |
| 681 |
\begin{varwidth}{0.8\textwidth}% |
| 682 |
\raggedright\Large #1% |
| 683 |
\end{varwidth}% |
| 684 |
}; |
| 685 |
\path [draw=green,line width=8pt] (z.north west) -- (z.south west); |
| 686 |
}% |
| 687 |
\end{pptMiddle}% |
| 688 |
} |
| 689 |
% \end{macrocode} |
| 690 |
% \end{macro} |
| 691 |
|
| 692 |
% \begin{macro}{\pptPunch} |
| 693 |
% \changes{0.7.0}{2026/05/19}{The \texttt{\char`\\pptPunch} command places content right |
| 694 |
% in the middle of the slide, both vertically and horizontally.} |
| 695 |
% Then, we define the |\pptPunch| command: |
| 696 |
% \begin{macrocode} |
| 697 |
\newcommand\pptPunch[1]{% |
| 698 |
\begin{textblock}{16}[0.5,0.5](8,8)% |
| 699 |
\centering #1% |
| 700 |
\end{textblock}% |
| 701 |
} |
| 702 |
% \end{macrocode} |
| 703 |
% \end{macro} |
| 704 |
|
| 705 |
% \begin{macro}{\pptSnippet} |
| 706 |
% Then, we define the |\pptSnippet| command: |
| 707 |
% \begin{macrocode} |
| 708 |
\newcommand\pptSnippet[2][\small]{% |
| 709 |
\begin{samepage}% |
| 710 |
#1\verbatiminput{#2}% |
| 711 |
\end{samepage}% |
| 712 |
} |
| 713 |
% \end{macrocode} |
| 714 |
% \end{macro} |
| 715 |
|
| 716 |
% \begin{macro}{\pptQR} |
| 717 |
% Then, we define the |\pptQR| command: |
| 718 |
% \begin{macrocode} |
| 719 |
\newcommand\pptQR[2][2in]{% |
| 720 |
\tikz{% |
| 721 |
\node[draw=white]{% |
| 722 |
\href{#2}{% |
| 723 |
\qrcode[height=#1]{#2}% |
| 724 |
}% |
| 725 |
}% |
| 726 |
}% |
| 727 |
} |
| 728 |
% \end{macrocode} |
| 729 |
% \end{macro} |
| 730 |
|
| 731 |
% \begin{macro}{\pptPinQR} |
| 732 |
% Then, we define the |\pptPinQR| command: |
| 733 |
% \begin{macrocode} |
| 734 |
\newcommand\pptPinQR[2][right]{% |
| 735 |
\pptPin[#1]{% |
| 736 |
\begin{minipage}{1.4in}% |
| 737 |
\raggedleft% |
| 738 |
\pptQR[1in]{#2}% |
| 739 |
\\[3pt] |
| 740 |
\ttfamily\fontsize{8pt}{10pt}\selectfont% |
| 741 |
\seqsplit{#2} \href{#2}{$\rightarrow$}% |
| 742 |
\\ |
| 743 |
\end{minipage}% |
| 744 |
}% |
| 745 |
} |
| 746 |
% \end{macrocode} |
| 747 |
% \end{macro} |
| 748 |
|
| 749 |
% \begin{macro}{pptWide} |
| 750 |
% Finally, we define the |pptWide| and |pptWideOne| environments: |
| 751 |
% \begin{macrocode} |
| 752 |
\newenvironment{pptWideOne} |
| 753 |
{\begin{adjustwidth}{-2in}{-1in}} |
| 754 |
{\end{adjustwidth}} |
| 755 |
\newenvironment{pptWide}[1] |
| 756 |
{\begin{pptWideOne}\begin{multicols}{#1}} |
| 757 |
{\end{multicols}\end{pptWideOne}} |
| 758 |
% \end{macrocode} |
| 759 |
% \end{macro} |
| 760 |
|
| 761 |
% \begin{macrocode} |
| 762 |
\endinput |
| 763 |
% \end{macrocode} |
| 764 |
|
| 765 |
% \Finale |
| 766 |
|
| 767 |
% \PrintChanges |
| 768 |
% \clearpage |
| 769 |
% \PrintIndex |