summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ppt-slides/ppt-slides.tex
blob: f126acfcffb4397d98c880fdbb317322b113aeec (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
% (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}