diff options
Diffstat (limited to 'macros/latex/contrib/ppt-slides')
-rw-r--r-- | macros/latex/contrib/ppt-slides/DEPENDS.txt | 13 | ||||
-rw-r--r-- | macros/latex/contrib/ppt-slides/README.md | 34 | ||||
-rw-r--r-- | macros/latex/contrib/ppt-slides/ppt-schemes/ppt-dark-mono.tex | 36 | ||||
-rw-r--r-- | macros/latex/contrib/ppt-slides/ppt-schemes/ppt-dark.tex | 36 | ||||
-rw-r--r-- | macros/latex/contrib/ppt-slides/ppt-schemes/ppt-light-mono.tex | 36 | ||||
-rw-r--r-- | macros/latex/contrib/ppt-slides/ppt-schemes/ppt-light.tex | 36 | ||||
-rw-r--r-- | macros/latex/contrib/ppt-slides/ppt-slides.pdf | bin | 0 -> 227781 bytes | |||
-rw-r--r-- | macros/latex/contrib/ppt-slides/ppt-slides.sty | 226 | ||||
-rw-r--r-- | macros/latex/contrib/ppt-slides/ppt-slides.tex | 248 | ||||
-rw-r--r-- | macros/latex/contrib/ppt-slides/ppt-templates/ppt-9x6.tex | 131 | ||||
-rw-r--r-- | macros/latex/contrib/ppt-slides/socrates.jpg | bin | 0 -> 94352 bytes |
11 files changed, 796 insertions, 0 deletions
diff --git a/macros/latex/contrib/ppt-slides/DEPENDS.txt b/macros/latex/contrib/ppt-slides/DEPENDS.txt new file mode 100644 index 0000000000..32dfe012e6 --- /dev/null +++ b/macros/latex/contrib/ppt-slides/DEPENDS.txt @@ -0,0 +1,13 @@ +hard pgfopts +hard xcolor +hard pagecolor +hard varwidth +hard qrcode +hard tikz +hard tikzpagenodes +hard enumitem +hard crumbs +hard tabularx +hard ifthen +hard seqsplit +hard hyperref diff --git a/macros/latex/contrib/ppt-slides/README.md b/macros/latex/contrib/ppt-slides/README.md new file mode 100644 index 0000000000..91d4058c89 --- /dev/null +++ b/macros/latex/contrib/ppt-slides/README.md @@ -0,0 +1,34 @@ +[![make](https://github.com/yegor256/ppt-slides/actions/workflows/latexmk.yml/badge.svg)](https://github.com/yegor256/ppt-slides/actions/workflows/latexmk.yml) +[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/ppt-slides/blob/master/LICENSE.txt) + +This LaTeX package helps you create slide decks as good looking +as with [PowerPointâ„¢](https://en.wikipedia.org/wiki/Microsoft_PowerPoint), +but more precise, uniform, and visually strict. +Check [this series of lectures](https://github.com/yegor256/ssd16) +fully designed with the use of this package. + +First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages) +from [CTAN](https://ctan.org/pkg/ppt-slides) +and then use in preamble: + +```tex +\documentclass{article} +\usepackage{clicks} +\usepackage[template=dark]{ppt-slides} +\begin{document} +\plick{\pptBanner{This Is My First Slide}} +\plick{The slide tells you an interesting story...} +\plick{but slowly...} +\plick{step by step...} +\plush{until you get totally bored.} +\end{document} +``` + +The full example and all commands are available in +[`ppt-slides.tex`](https://github.com/yegor256/ppt-slides/blob/master/ppt-slides.tex) file. + +If you want to contribute yourself, make a fork, create a branch, +then run `make` in root directory. +It should compile everything without errors. If not, submit an issue and wait. +Otherwise, make your changes and then run `make` again. If the build is +still clean, submit a pull request. diff --git a/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-dark-mono.tex b/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-dark-mono.tex new file mode 100644 index 0000000000..a0e28fcdae --- /dev/null +++ b/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-dark-mono.tex @@ -0,0 +1,36 @@ +% (The MIT License) +% +% Copyright (c) 2022 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. + +\definecolor{white}{HTML}{FFFFFF} +\definecolor{red}{HTML}{FFFFFF} +\definecolor{orange}{HTML}{FFFFFF} +\definecolor{black}{HTML}{000000} +\definecolor{grey}{HTML}{FFFFFF} +\definecolor{green}{HTML}{FFFFFF} +\definecolor{blue}{HTML}{FFFFFF} + +\AtBeginDocument{% + \pagecolor{black} + \color{white} +} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-dark.tex b/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-dark.tex new file mode 100644 index 0000000000..7736e886bd --- /dev/null +++ b/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-dark.tex @@ -0,0 +1,36 @@ +% (The MIT License) +% +% Copyright (c) 2022 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. + +\definecolor{white}{HTML}{EEEEEE} +\definecolor{red}{HTML}{ED474A} +\definecolor{orange}{HTML}{F06543} +\definecolor{black}{HTML}{232527} +\definecolor{grey}{HTML}{C0BCB5} +\definecolor{green}{HTML}{5C946E} +\definecolor{blue}{HTML}{5299D3} + +\AtBeginDocument{% + \pagecolor{black} + \color{white} + +} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-light-mono.tex b/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-light-mono.tex new file mode 100644 index 0000000000..4974c08ef6 --- /dev/null +++ b/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-light-mono.tex @@ -0,0 +1,36 @@ +% (The MIT License) +% +% Copyright (c) 2022 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. + +\definecolor{white}{HTML}{FFFFFF} +\definecolor{red}{HTML}{000000} +\definecolor{orange}{HTML}{000000} +\definecolor{black}{HTML}{000000} +\definecolor{grey}{HTML}{000000} +\definecolor{green}{HTML}{000000} +\definecolor{blue}{HTML}{000000} + +\AtBeginDocument{% + \pagecolor{white} + \color{black} +} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-light.tex b/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-light.tex new file mode 100644 index 0000000000..6a687c1aef --- /dev/null +++ b/macros/latex/contrib/ppt-slides/ppt-schemes/ppt-light.tex @@ -0,0 +1,36 @@ +% (The MIT License) +% +% Copyright (c) 2022 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. + +\definecolor{white}{HTML}{FEFEFE} +\definecolor{red}{HTML}{ED474A} +\definecolor{orange}{HTML}{F06543} +\definecolor{black}{HTML}{232527} +\definecolor{grey}{HTML}{808080} +\definecolor{green}{HTML}{5C946E} +\definecolor{blue}{HTML}{5299D3} + +\AtBeginDocument{% + \pagecolor{white} + \color{black} +} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/ppt-slides/ppt-slides.pdf b/macros/latex/contrib/ppt-slides/ppt-slides.pdf Binary files differnew file mode 100644 index 0000000000..42df3d6dff --- /dev/null +++ b/macros/latex/contrib/ppt-slides/ppt-slides.pdf diff --git a/macros/latex/contrib/ppt-slides/ppt-slides.sty b/macros/latex/contrib/ppt-slides/ppt-slides.sty new file mode 100644 index 0000000000..6b05d25303 --- /dev/null +++ b/macros/latex/contrib/ppt-slides/ppt-slides.sty @@ -0,0 +1,226 @@ +% (The MIT License) +% +% Copyright (c) 2022 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. + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{ppt-slides}[2022/09/11 0.0.1 Slide Decks à la Power Point] + +\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 = ., + directory +} +\ProcessPgfOptions* +\makeatother + +\makeatletter\ifdefined\ppt@template + \input{\ppt@directory/ppt-templates/ppt-\ppt@template.tex} +\else + \message{^^Jppt: No template is loaded, because 'template' option is not specified} +\fi\makeatother + +\makeatletter\ifdefined\ppt@scheme + \RequirePackage{xcolor} + \input{\ppt@directory/ppt-schemes/ppt-\ppt@scheme.tex} +\else + \message{^^Jppt: No color scheme is loaded, because 'scheme' option is not specified} +\fi\makeatother + +\RequirePackage{pagecolor} +\RequirePackage{varwidth} +\RequirePackage{qrcode} +\RequirePackage{tikz} +\RequirePackage{tikzpagenodes} +\RequirePackage[inline]{enumitem} +\RequirePackage{crumbs} + +\newcommand\pptMiddle[1]{% + \vspace*{\fill}#1\vspace*{\fill}% +} + +\newcommand\pptBanner[2][green]{% + \par + {\setlength{\fboxsep}{6pt}\colorbox{#1}{\color{\thepagecolor}\large #2}} + \par +} + +\newcommand\pptChapter[2][]{% + \crumbection[#1]{#2}% + \pptMiddle{% + {\large\ttfamily Chapter \#\the\value{section}:}% + \newline% + \rotatebox{1}{\pptBanner[blue]{\LARGE#2}}% + }% +} + +\newcommand\pptSection[2][]{% + \subcrumbection[#1]{#2}% + \pptHeader{#2}% +} + +\newcommand\pptHeader[1]{% + \vspace*{-0.75in}\hspace*{-0.5in}% + \rotatebox{1}{\pptBanner[orange]{\Large #1}}\vspace*{0.15in}% + \par% +} + +\newcommand\pptTitle[2]{% + {\pptBanner{\Huge #1}}% + {\pptBanner{\large #2}}% +} + +\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\click[0]\fi + \gappto\pptTOC{\item ##2} + } + \crumbs + \end{@empty}% + \flush[1]% +} + +\RequirePackage{tabularx} +\newcommand\pptQuote[3]{% + \begin{tabularx}{\columnwidth}{c>{\raggedright\arraybackslash}X}% + \raisebox{\dimexpr-\height+\ht\strutbox}{\pptPic{0.25}{#1}}% + &% + ``#2''% + \def\param{#3}% + \ifx\param\empty\else% + \newline\newline% + \small% + --- #3 + \fi% + \\% + \end{tabularx}% +} + +\newcommand\pptPic[2]{% + {% + \setlength{\fboxsep}{0pt}% + \setlength{\fboxrule}{1pt}% + \fcolorbox{gray}{white}{% + \includegraphics[width=#1\columnwidth]{#2}% + }% + }% +} + +\RequirePackage{ifthen} +\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}% +} + +\newcommand\pptThought[1]{% + \pptMiddle{% + \tikz{% + \node [inner sep=18pt] (z) {% + \begin{varwidth}{0.8\textwidth} + \Large + #1 + \end{varwidth} + }; + \path [draw=green,line width=8pt] (z.north west) -- (z.south west); + } + } +} + +\newcommand\pptSnippet[2][\small]{% + \begin{samepage}% + #1\verbatiminput{#2}% + \end{samepage}% +} + +\newcommand\pptQR[2][2in]{% + \tikz{% + \node[draw=white]{% + \href{#2}{% + \qrcode[height=#1]{#2}% + }% + }% + } +} + +\RequirePackage{seqsplit} +\RequirePackage{hyperref} +\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}% + }% +} + +\newenvironment{pptWideOne} + {\begin{adjustwidth}{-2in}{-1in}} + {\end{adjustwidth}} +\newenvironment{pptWide}[1] + {\begin{pptWideOne}\begin{multicols}{#1}} + {\end{multicols}\end{pptWideOne}} + +\endinput diff --git a/macros/latex/contrib/ppt-slides/ppt-slides.tex b/macros/latex/contrib/ppt-slides/ppt-slides.tex new file mode 100644 index 0000000000..f126acfcff --- /dev/null +++ b/macros/latex/contrib/ppt-slides/ppt-slides.tex @@ -0,0 +1,248 @@ +% (The MIT License) +% +% Copyright (c) 2022 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. + +\documentclass{article} +\usepackage[increment]{crumbs} +\usepackage[static]{clicks} +\usepackage[template,scheme=dark]{ppt-slides} +\usepackage[nonumbers]{ffcode} +\usepackage{titling} +\usepackage{textcomp} +\title{\LaTeX{} Package for Slide Decks \`a la PowerPoint\texttrademark} +\author{Yegor Bugayenko} +\date{0.0.1 2022/09/11} +\pptLeft{\thetitle} +\pptRight{\href{https://github.com/yegor256}{@yegor256}} + +\begin{document} + +\plush{ + \pptMiddle{ + \pptTitle{ppt-slides}{\thetitle}\par + {\scshape Made by \href{https://www.yegor256.com}{\theauthor}}\par + \thedate + } +} + +\clearpage +This package helps you make slide decks in \LaTeX: +\begin{ffcode*}{fontsize=\small} +\documentclass{article} +\usepackage{clicks} +\usepackage[template,scheme=dark]{ppt-slides} +\begin{document} +\plick{\pptBanner{Making Slides Is Easy}} +\plick{Just use this package...} +\plush{together with 'clicks' package.} +\end{document} +\end{ffcode*} +They will look similar to what PowerPoint\texttrademark{} can make, +but with the precision of \LaTeX. We recommend to use this package +together with \href{https://github.com/yegor256/clicks}{clicks}. + +\clearpage +\pptToc[Table of Contents] + +\clearpage +\plush{\pptChapter[Layout]{Scaffolding and Layout}} + +\clearpage +\pptSection{Template} +You start with a template for your slide deck: +\begin{ffcode*}{fontsize=\scriptsize} +\documentclass{article} +\usepackage{clicks} +\usepackage[template=9x6]{ppt-slides} +\begin{document} +... +\end{document} +\end{ffcode*} +There is only one template, which is used by default: \ff{9x6}. If you don't +specify the name, it will be used. If you don't use \ff{template} option at all, +the default \ff{article} will be rendered, which is not what you want. + +\clearpage +\pptSection[Scheme]{Color Schemes} +You can choose a color scheme for your slides, using \ff{scheme} option +of the package: +\begin{ffcode*}{fontsize=\scriptsize} +\documentclass{article} +\usepackage{clicks} +\usepackage[template,scheme=light]{ppt-slides} +\begin{document} +... +\end{document} +\end{ffcode*} +There are a few out-of-the-box schemes available: \ff{light}, \ff{dark}, +\ff{light-mono}, and \ff{dark-mono}. You can design your own, using +\ff{ppt-light.text} file as an example: +{\scriptsize\begin{ffcode} +\usepackage[template,scheme=/usr/local/my-colors.tex]{ppt-slides} +\end{ffcode} +} + +\clearpage +\pptSection{Chapters} +First, split your story into Chapters: +\begin{ffcode*}{fontsize=\scriptsize} +\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{ffcode*} +\ff{\char`\\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. + +\clearpage +\pptSection{Sections} +Put Sections inside Chapters: +\begin{ffcode*}{fontsize=\scriptsize} +\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{ffcode*} +\ff{\char`\\pptChapter} and \ff{\char`\\pptSection} used together will render +nice two-level nagivation menu at the top left corner. + +\clearpage +\pptSection[Signatures]{Signatures at the Bottom of Each Page} +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: +\begin{ffcode*}{fontsize=\scriptsize} +\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{ffcode*} +If you don't use \ff{\char`\\pptLeft} or \ff{\char`\\pptRight}, nothing will +be printed at the bottom. + +\clearpage +\pptSection[Wide]{Wide Slides} +Sometimes you need your slide content to take all visible horizontal space: +\begin{ffcode*}{fontsize=\scriptsize} +\begin{document} +\begin{pptWideOne} +This paragraph is too long for some reasons, +that's why must take all visible horizontal space. +\end{pptWideOne} +\end{document} +\end{ffcode*} +\begin{pptWideOne} +This paragraph is too long for some reasons, that's why must take all visible horizontal space. +\end{pptWideOne} +You can also use \ff{\char`\\begin\char`\{pptWide\char`\}\char`\{X\char`\}}, +where \ff{X} is the number of columns to render. + +\clearpage +\plush{\pptChapter[Elements]{Content Elements}} + +\clearpage +\pptSection{Images} +You can add an image to the slide (the first argument is the width +of the image in relation to \ff{\char`\\textwidth}, +while the second one is the path of it): +\begin{ffcode*}{fontsize=\scriptsize} +\begin{document} +\plush{\pptPic{0.2}{socrates.jpg}} +\end{document} +\end{ffcode*} +\pptPic{0.2}{socrates.jpg} + +\clearpage +\pptSection[Snippets]{Code Snippets} +You can add a piece of code to the slide (we recommend using \href{https://github.com/yegor256/ffcode}{ffcode}): +{\scriptsize +\begin{verbatim} +\begin{document} +\clearpage +\pptHeader{This is How You Print to Console:} +\begin{ffcode} +System.out.println("Hello, world!"); +\end{ffcode} +\end{document} +\end{verbatim} +} +Don't use \ff{\char`\\plick} or \ff{\char`\\plush}, they won't work with code snippets. + +\ff{\char`\\pptHeader} prints a header similar to what \ff{\char`\\pptSection} prints, but +doesn't start a new section. + +\clearpage +\pptSection{Quotes} +\pptQuote{socrates.jpg}{The only true wisdom is in knowing you know nothing}{Socrates} +\begin{ffcode*}{fontsize=\scriptsize} +\begin{document} +\plush{\pptQuote{socrates.jpg} + {The only true wisdom is in knowing you know nothing}{Socrates}} +\end{document} +\end{ffcode*} + +\clearpage +\pptSection{Thoughts} +\plush{\pptThought{Socrates said that the only true wisdom is in knowing you know nothing. Was he a wise man?... By the way, I'm using \ff{\char`\\pptThought} in this slide.}} + +\clearpage +\pptSection[QR]{QR Codes} +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{ffcode*}{fontsize=\scriptsize} +\begin{document} +\plick{Check my blog post by this link:} +\plush{\pptQR{https://www.yegor256.com}} +\end{document} +\end{ffcode*} +The code will look like this, thanks to \href{https://ctan.org/pkg/qrcode}{qrcode} package that +we use behind the scene:\par +\pptQR[1in]{https://www.yegor256.com} + +\clearpage +\plush{ + \crumbection{Sources} + \pptMiddle{ + More details about this package you can find\\ + in \href{https://github.com/yegor256/ppt-slides}{yegor256/ppt-slides} GitHub repository. + } +} + +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/ppt-slides/ppt-templates/ppt-9x6.tex b/macros/latex/contrib/ppt-slides/ppt-templates/ppt-9x6.tex new file mode 100644 index 0000000000..3466d8d85f --- /dev/null +++ b/macros/latex/contrib/ppt-slides/ppt-templates/ppt-9x6.tex @@ -0,0 +1,131 @@ +% (The MIT License) +% +% Copyright (c) 2022 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. + +\RequirePackage{geometry} + \geometry{paperwidth=16in, paperheight=9in, left=4in, right=2in, top=1.5in, bottom=1.5in} +\RequirePackage[absolute]{textpos} + \TPGrid{16}{16} + +\RequirePackage[tt=false,type1=true]{libertine} +\RequirePackage{microtype} +\RequirePackage{anyfontsize} +\RequirePackage{multicol} +\RequirePackage[fontsize=24pt]{fontsize} % to make fonts larger +\RequirePackage{changepage} +\RequirePackage{soul} +\RequirePackage{href-ul} + +\RequirePackage{tikz} + \usetikzlibrary{arrows} + \usetikzlibrary{decorations} + \usetikzlibrary{decorations.pathmorphing} + \usetikzlibrary{intersections} + \usetikzlibrary{positioning} + \usetikzlibrary{backgrounds} + \usetikzlibrary{calc} + \usetikzlibrary{shapes.arrows} +\RequirePackage{tikzpagenodes} + +\RequirePackage{crumbs} + \renewcommand\crumb[2]{% + \ifnum\value{crumbi}=1\else\hspace{1em}\fi + \ifnum\value{crumbi}=\value{section}% + {\setulcolor{blue}\color{blue}\ul{#1}}% + \else% + #1% + \fi% + } + \renewcommand\subcrumb[2]{% + \ifnum\value{subcrumbi}=1\else\hspace{0.5em}\fi + \ifnum\value{subcrumbi}=\value{subsection}% + {\setulcolor{blue}\color{blue}\ul{#1}}% + \else% + #1% + \fi% + } + +\RequirePackage{fancyhdr} + \pagestyle{fancy} + \renewcommand{\headrulewidth}{0pt} + \fancyhf{} + \fancyhead[L]{% + \ifx\crumbs\empty\else + \begin{textblock}{12}(1,1)% + \ifnum\value{section}=0\else + {\small\ttfamily\crumbs} + \ifnum\value{subsection}=0\else + \\[6pt] + {\quad\scriptsize\ttfamily\color{grey}[ \subcrumbs{} ]} + \fi + \fi + \end{textblock}% + \fi + } + \RequirePackage{lastpage} + \fancyhead[R]{% + \ifnum\value{page}=1\else% + \begin{textblock}{4}[1,0](15,1)% + {\ttfamily\normalsize {\thepage{}}{\footnotesize{\color{grey}/\pageref{LastPage}}}} + \end{textblock}% + \ifcsname c@minutes\endcsname + \ifnum\value{minutes}=0\else% + \begin{textblock}{1}[1,0](15.8,0.2)% + \tikz{\node[inner sep=2pt,circle,draw=grey]{\color{grey}\scriptsize\ttfamily\theminutes{}};} + \end{textblock}% + \fi + \fi + \fi + } + +\newcommand\pptLeft[1]{% + \fancyfoot[L]{% + \ifnum\value{page}=1\else% + \begin{textblock}{8}[0,1](1,15)% + {\color{grey}\scriptsize\ttfamily #1} + \end{textblock}% + \fi + } +} + +\newcommand\pptRight[1]{% + \fancyfoot[R]{% + \ifnum\value{page}=1\else% + \begin{textblock}{8}[1,1](15,15)% + {\color{grey}\scriptsize\ttfamily #1} + \end{textblock}% + \fi + } +} + +\AtBeginDocument{% + \raggedbottom% + \raggedright% + \raggedcolumns% + \setlength\topskip{0pt}% + \setlength\headheight{32pt}% + \setlength\footskip{32pt}% + \setlength\parindent{0pt}% + \setlength\parskip{18pt}% + \setlength\columnsep{32pt}% + \normalsize% + \sffamily% +} diff --git a/macros/latex/contrib/ppt-slides/socrates.jpg b/macros/latex/contrib/ppt-slides/socrates.jpg Binary files differnew file mode 100644 index 0000000000..32c38388f6 --- /dev/null +++ b/macros/latex/contrib/ppt-slides/socrates.jpg |