summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ppt-slides/ppt-slides.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/ppt-slides/ppt-slides.tex')
-rw-r--r--macros/latex/contrib/ppt-slides/ppt-slides.tex248
1 files changed, 248 insertions, 0 deletions
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