| 1 |
\documentclass[aspectratio=169]{beamer} |
| 2 |
|
| 3 |
\usepackage{standalone} |
| 4 |
\usepackage{tikz} |
| 5 |
\usepackage{pgfplots} |
| 6 |
|
| 7 |
\usepackage{tabularray} % Typeset tabulars and arrays (contains equivalent of longtable, booktabs and dcolumn at least) |
| 8 |
\UseTblrLibrary{booktabs} % to load extra commands from booktabs |
| 9 |
|
| 10 |
\usepackage{natbib} |
| 11 |
\begin{filecontents*}[overwrite]{pres.bib} |
| 12 |
@article{Knuth92, |
| 13 |
author = "D.E. Knuth", |
| 14 |
title = "Two notes on notation", |
| 15 |
journal = "Amer. Math. Monthly", |
| 16 |
volume = "99", |
| 17 |
year = "1992", |
| 18 |
pages = "403--422", |
| 19 |
} |
| 20 |
|
| 21 |
@book{ConcreteMath, |
| 22 |
author = "R.L. Graham and D.E. Knuth and O. Patashnik", |
| 23 |
title = "Concrete mathematics", |
| 24 |
publisher = "Addison-Wesley", |
| 25 |
address = "Reading, MA", |
| 26 |
year = "1989" |
| 27 |
} |
| 28 |
|
| 29 |
@unpublished{Simpson, |
| 30 |
author = "H. Simpson", |
| 31 |
title = "Proof of the {R}iemann {H}ypothesis", |
| 32 |
note = "preprint (2003), available at \texttt{http://www.math.drofnats.edu/riemann.ps}", |
| 33 |
year = "2003" |
| 34 |
} |
| 35 |
|
| 36 |
@incollection{Er01, |
| 37 |
author = "P. Erd{\H o}s", |
| 38 |
title = "A selection of problems and results in combinatorics", |
| 39 |
booktitle = "Recent trends in combinatorics (Matrahaza, 1995)", |
| 40 |
publisher = "Cambridge Univ. Press", |
| 41 |
address = "Cambridge", |
| 42 |
pages = "1--6", |
| 43 |
year = "1995" |
| 44 |
} |
| 45 |
|
| 46 |
@article{greenwade93, |
| 47 |
author = "George D. Greenwade", |
| 48 |
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})", |
| 49 |
year = "1993", |
| 50 |
journal = "TUGBoat", |
| 51 |
volume = "14", |
| 52 |
number = "3", |
| 53 |
pages = "342--351" |
| 54 |
} |
| 55 |
\end{filecontents*} |
| 56 |
|
| 57 |
|
| 58 |
\begin{document} |
| 59 |
|
| 60 |
\section{Introduction: Beamer} |
| 61 |
|
| 62 |
% FRAME |
| 63 |
\begin{frame}[fragile]{Title page} |
| 64 |
The Title page is printed using the command: |
| 65 |
\begin{verbatim} \maketitle\end{verbatim} |
| 66 |
|
| 67 |
The element printed on this page are defined in the preamble by |
| 68 |
\begin{verbatim} |
| 69 |
\title[]{Gotham} |
| 70 |
\subtitle{A Modern, versatile and extendable theme for Beamer} |
| 71 |
\date[]{\today} |
| 72 |
\author[]{Romain NOËL} |
| 73 |
\institute{Center for modern beamer themes} |
| 74 |
\titlegraphic{\hfill\includegraphics[height=1.5cm, draft]{Title_logo.pdf}} |
| 75 |
\end{verbatim} |
| 76 |
\end{frame} |
| 77 |
|
| 78 |
% FRAME |
| 79 |
\begin{frame}[fragile]{Plain Slide} |
| 80 |
The usual page is printed and defined using the command: |
| 81 |
\begin{verbatim} |
| 82 |
\begin{frame}{Title on top of the frame} |
| 83 |
contenu... |
| 84 |
\end{frame } |
| 85 |
\end{verbatim} |
| 86 |
|
| 87 |
Note that the logo printed on this page are defined in the preamble by |
| 88 |
\begin{verbatim} |
| 89 |
\logo{\includegraphics[height=1.5cm, draft]{logo.pdf}} |
| 90 |
\end{verbatim} |
| 91 |
\end{frame} |
| 92 |
|
| 93 |
% FRAME |
| 94 |
\begin{frame}[fragile]{Sections} |
| 95 |
Sections group slides of the same topic |
| 96 |
|
| 97 |
\begin{verbatim} \section{Elements}\end{verbatim} |
| 98 |
\end{frame} |
| 99 |
|
| 100 |
% FRAME |
| 101 |
\begin{frame}[fragile]{Typography} |
| 102 |
\begin{verbatim} |
| 103 |
The theme provides sensible defaults to |
| 104 |
\emph{emphasize} text, \alert{accent} parts |
| 105 |
or show \textbf{bold} results. |
| 106 |
\end{verbatim} |
| 107 |
|
| 108 |
\begin{center}becomes\end{center} |
| 109 |
|
| 110 |
The theme provides sensible defaults to \emph{emphasize} text, |
| 111 |
\alert{accent} parts or show \textbf{bold} results. |
| 112 |
\end{frame} |
| 113 |
|
| 114 |
% FRAME |
| 115 |
\begin{frame}{Font feature test} |
| 116 |
\begin{itemize} |
| 117 |
\item Regular |
| 118 |
\item \textit{Italic} |
| 119 |
\item \textsc{Small Caps} |
| 120 |
\item \textbf{Bold} |
| 121 |
\item \textbf{\textit{Bold Italic}} |
| 122 |
\item \textbf{\textsc{Bold Small Caps}} |
| 123 |
\item \texttt{Monospace} |
| 124 |
\item \texttt{\textit{Monospace Italic}} |
| 125 |
\item \texttt{\textbf{Monospace Bold}} |
| 126 |
\item \texttt{\textbf{\textit{Monospace Bold Italic}}} |
| 127 |
\end{itemize} |
| 128 |
\end{frame} |
| 129 |
|
| 130 |
% FRAME |
| 131 |
\begin{frame}{Lists} |
| 132 |
\begin{columns}[T,onlytextwidth] |
| 133 |
\column{0.33\textwidth} |
| 134 |
Items |
| 135 |
\begin{itemize} |
| 136 |
\item Milk \item Eggs \item Potatoes |
| 137 |
\begin{itemize} |
| 138 |
\item Milk \item Eggs \item Potatoes |
| 139 |
\begin{itemize} |
| 140 |
\item Milk |
| 141 |
\end{itemize} |
| 142 |
\end{itemize} |
| 143 |
\end{itemize} |
| 144 |
|
| 145 |
\column{0.33\textwidth} |
| 146 |
Enumerations |
| 147 |
\begin{enumerate} |
| 148 |
\item First, \item Second and \item Last. |
| 149 |
\end{enumerate} |
| 150 |
|
| 151 |
\column{0.33\textwidth} |
| 152 |
Descriptions |
| 153 |
\begin{description} |
| 154 |
\item[PowerPoint] Meeh. \item[Beamer] Yeeeha. |
| 155 |
\end{description} |
| 156 |
\end{columns} |
| 157 |
|
| 158 |
\vspace{2em} |
| 159 |
Then, something below the columns, that be long enough to recover all the line-width. |
| 160 |
\end{frame} |
| 161 |
|
| 162 |
% FRAME |
| 163 |
\begin{frame}{Animation} |
| 164 |
\begin{itemize}[<+- | alert@+>] |
| 165 |
\item \alert<4>{This is\only<4>{ really} important} |
| 166 |
\item Now this |
| 167 |
\item And now this |
| 168 |
\end{itemize} |
| 169 |
\end{frame} |
| 170 |
|
| 171 |
% FRAME from https://www.edpif.org/documents/latex/intermediate/beamer/latex-int-beamer_handout.pdf |
| 172 |
\begin{frame}[fragile]{Commands controlling overlay} |
| 173 |
Beamer defines a bunch of commands intended to control overlays: |
| 174 |
\verb$\only<...>{text}$ Throws away \verb$text$ content on slides not in \verb$<...>$ |
| 175 |
\verb$\onslide<...>{text}$ Same, but when hidden \verb$text$ still takes space. |
| 176 |
\verb$\visible<...>{text}$ Same. |
| 177 |
\verb$\uncover<...>{text}$ Same, but also handle transparency. |
| 178 |
\verb$\invisible<...>{text}$ Opposite of \verb$\visible$ |
| 179 |
\verb$\alt<...>{text1}{text2}$ Alternates between \verb$text1$ and \verb$text2$ for\verb$ <...>$. |
| 180 |
\verb$\temporal<...>{before}{inside}{after}$ Alternate between three texts depending on slide index before, inside or after the range of \verb$<...>$. |
| 181 |
For the commands \verb$\only$ and \verb$\alt$ the \verb$<...>$ can also be after the text. |
| 182 |
Then \verb$\only$ can be used to make commands \verb$<...>$-aware (§9.3) like in: |
| 183 |
\verb$\newcommand{\myblue}{\only{\color{blue}}}$ |
| 184 |
\verb$\myblue<2> This text is blue only on slide 2.$ |
| 185 |
Finally, \verb$\only$ and \verb$\onslide$ without text argument work as toogles. |
| 186 |
Much more options, described in §9.4 to 9.6 |
| 187 |
\end{frame} |
| 188 |
|
| 189 |
% FRAME from https://www.edpif.org/documents/latex/intermediate/beamer/latex-int-beamer_handout.pdf |
| 190 |
\begin{frame}[fragile]{Action specifications} |
| 191 |
Inside \verb$<...>$ it is possible to add some action specifications |
| 192 |
Action are specified after the slide range \& a | and followed by @ and the target slide or range. |
| 193 |
For example one can write: |
| 194 |
\verb$\item<3-|alert@4> Shown from slide 3 on, alerted on slide 4.$ |
| 195 |
which set the \verb$\alert$ for item 3 only in slide 4. |
| 196 |
Actions can be defined for \verb$\item$, \verb$\action$, \verb$\begin{actionenv}\verb$ |
| 197 |
and the block environments and the possible actions are by default, |
| 198 |
alert, uncover, only, visible, invisible, but other can be |
| 199 |
defined by the user. See manual § 9.6.3 |
| 200 |
Simple example using uncover with specified transparency: |
| 201 |
\begin{verbatim} |
| 202 |
\setbeamercovered{transparent=30} |
| 203 |
\begin{itemize}[<+-|uncover@+>] |
| 204 |
\item first |
| 205 |
\item second |
| 206 |
\item third |
| 207 |
\end{itemize} |
| 208 |
\end{verbatim} |
| 209 |
\end{frame} |
| 210 |
|
| 211 |
% FRAME |
| 212 |
\begin{frame}{Figures} |
| 213 |
\begin{figure} |
| 214 |
\centering |
| 215 |
\newcounter{density} |
| 216 |
\setcounter{density}{20} |
| 217 |
\begin{tikzpicture} |
| 218 |
\def\couleur{alerted text.fg} |
| 219 |
\path[coordinate] (0,0) coordinate(A) |
| 220 |
++( 90:5cm) coordinate(B) |
| 221 |
++(0:5cm) coordinate(C) |
| 222 |
++(-90:5cm) coordinate(D); |
| 223 |
\draw[fill=\couleur!\thedensity] (A) -- (B) -- (C) --(D) -- cycle; |
| 224 |
\foreach \x in {1,...,40}{% |
| 225 |
\pgfmathsetcounter{density}{\thedensity+20} |
| 226 |
\setcounter{density}{\thedensity} |
| 227 |
\path[coordinate] coordinate(X) at (A){}; |
| 228 |
\path[coordinate] (A) -- (B) coordinate[pos=.10](A) |
| 229 |
-- (C) coordinate[pos=.10](B) |
| 230 |
-- (D) coordinate[pos=.10](C) |
| 231 |
-- (X) coordinate[pos=.10](D); |
| 232 |
\draw[fill=\couleur!\thedensity] (A)--(B)--(C)-- (D) -- cycle; |
| 233 |
} |
| 234 |
\end{tikzpicture} |
| 235 |
\caption{Rotated square with Tikz package from |
| 236 |
\href{http://www.texample.net/tikz/examples/rotated-polygons/}{texample.net}.} |
| 237 |
\end{figure} |
| 238 |
\end{frame} |
| 239 |
|
| 240 |
% FRAME |
| 241 |
\begin{frame}{Tables} |
| 242 |
\begin{table} |
| 243 |
\centering |
| 244 |
\caption{Largest cities in the world (source: Wikipedia)} |
| 245 |
\begin{tabular}{@{} lr @{}} |
| 246 |
\toprule |
| 247 |
City & Population\\ |
| 248 |
\midrule |
| 249 |
Mexico City & 20,116,842\\ |
| 250 |
Shanghai & 19,210,000\\ |
| 251 |
Peking & 15,796,450\\ |
| 252 |
Istanbul & 14,160,467\\ |
| 253 |
\bottomrule |
| 254 |
\end{tabular} |
| 255 |
\end{table} |
| 256 |
\end{frame} |
| 257 |
|
| 258 |
% FRAME |
| 259 |
\begin{frame}{Blocks} |
| 260 |
Three different block environments are pre-defined. |
| 261 |
|
| 262 |
\begin{block}{Default} |
| 263 |
Block content. |
| 264 |
\end{block} |
| 265 |
|
| 266 |
\begin{alertblock}{Alert} |
| 267 |
Block content. |
| 268 |
\end{alertblock} |
| 269 |
|
| 270 |
\begin{exampleblock}{Example} |
| 271 |
Block content. |
| 272 |
\end{exampleblock} |
| 273 |
\end{frame} |
| 274 |
|
| 275 |
% FRAME |
| 276 |
\begin{frame}{Math} |
| 277 |
\begin{equation} |
| 278 |
e = \lim_{n\to \infty} \left(1 + \frac{1}{n}\right)^n |
| 279 |
\end{equation} |
| 280 |
\end{frame} |
| 281 |
|
| 282 |
% FRAME |
| 283 |
\begin{frame}{Line plots} |
| 284 |
\begin{figure} |
| 285 |
\centering |
| 286 |
\begin{tikzpicture} |
| 287 |
\begin{axis}[ |
| 288 |
width=0.9\textwidth, |
| 289 |
height=6cm, |
| 290 |
] |
| 291 |
|
| 292 |
\addplot {sin(deg(x))}; |
| 293 |
\addplot+[samples=100] {sin(deg(2*x))}; |
| 294 |
|
| 295 |
\end{axis} |
| 296 |
\end{tikzpicture} |
| 297 |
\caption{A nice sinus plot with Tikz.} |
| 298 |
\end{figure} |
| 299 |
\end{frame} |
| 300 |
|
| 301 |
% FRAME |
| 302 |
\begin{frame}{Bar charts} |
| 303 |
\begin{figure} |
| 304 |
\centering |
| 305 |
\begin{tikzpicture} |
| 306 |
\begin{axis}[ |
| 307 |
ybar, |
| 308 |
xlabel={Foo}, |
| 309 |
ylabel={Bar}, |
| 310 |
width=0.9\textwidth, |
| 311 |
height=6cm, |
| 312 |
nodes near coords, |
| 313 |
nodes near coords align={vertical}, |
| 314 |
] |
| 315 |
|
| 316 |
\addplot plot coordinates {(1, 20) (2, 25) (3, 22.4) (4, 12.4)}; |
| 317 |
\addplot plot coordinates {(1, 18) (2, 24) (3, 23.5) (4, 13.2)}; |
| 318 |
\addplot plot coordinates {(1, 10) (2, 19) (3, 25) (4, 15.2)}; |
| 319 |
|
| 320 |
\legend{lorem, ipsum, dolor} |
| 321 |
|
| 322 |
\end{axis} |
| 323 |
\end{tikzpicture} |
| 324 |
\caption{A nice bar chart with Tikz.} |
| 325 |
\end{figure} |
| 326 |
\end{frame} |
| 327 |
|
| 328 |
% FRAME |
| 329 |
\begin{frame}{Quotes} |
| 330 |
\begin{quote} |
| 331 |
Veni, Vidi, Vici |
| 332 |
\end{quote} |
| 333 |
from Julius Caesar. |
| 334 |
\end{frame} |
| 335 |
|
| 336 |
% FRAME |
| 337 |
\begin{frame}[fragile]{References} |
| 338 |
Some references to showcase \verb|[allowframebreaks]| on next slide~\cite{Knuth92,ConcreteMath,Simpson,Er01,greenwade93} |
| 339 |
\end{frame} |
| 340 |
|
| 341 |
% % FRAME |
| 342 |
% \begin{frame}{References} |
| 343 |
% \bibliography{pres} |
| 344 |
% \bibliographystyle{abbrv} |
| 345 |
% \end{frame} |
| 346 |
|
| 347 |
% FRAME |
| 348 |
\begin{frame}[allowframebreaks]{References} |
| 349 |
\begin{thebibliography}{1} |
| 350 |
|
| 351 |
\bibitem{Er01} |
| 352 |
P.~Erd{\H o}s. |
| 353 |
\newblock A selection of problems and results in combinatorics. |
| 354 |
\newblock In {\em Recent trends in combinatorics (Matrahaza, 1995)}, pages 1--6. Cambridge Univ. Press, Cambridge, 1995. |
| 355 |
|
| 356 |
\bibitem{ConcreteMath} |
| 357 |
R.~Graham, D.~Knuth, and O.~Patashnik. |
| 358 |
\newblock {\em Concrete mathematics}. |
| 359 |
\newblock Addison-Wesley, Reading, MA, 1989. |
| 360 |
|
| 361 |
\bibitem{greenwade93} |
| 362 |
G.~D. Greenwade. |
| 363 |
\newblock The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN}). |
| 364 |
\newblock {\em TUGBoat}, 14(3):342--351, 1993. |
| 365 |
|
| 366 |
\bibitem{Knuth92} |
| 367 |
D.~Knuth. |
| 368 |
\newblock Two notes on notation. |
| 369 |
\newblock {\em Amer. Math. Monthly}, 99:403--422, 1992. |
| 370 |
|
| 371 |
\bibitem{Simpson} |
| 372 |
H.~Simpson. |
| 373 |
\newblock Proof of the {R}iemann {H}ypothesis. |
| 374 |
\newblock preprint (2003), available at \texttt{http://www.math.drofnats.edu/riemann.ps}, 2003. |
| 375 |
|
| 376 |
\end{thebibliography} |
| 377 |
\end{frame} |
| 378 |
|
| 379 |
\end{document} |