Table des matières

Intermediate Latex Introduction to Beamer 1 Beamer Configuration Examples Jean Hare Elements in presentation More control on presentations Sorbonne Université Laboratoire Kastler Brossel [email protected] 2 Overlays Mai 2021

Jean Hare (SU) A-LaTeX Mai 2021 1 / 40 Jean Hare (SU) A-LaTeX Mai 2021 2 / 40

Beamer Beamer Sommaire Introduction to Beamer

Beamer is a LaTeX document class dedicated to the creation of presentations or slideshows. It was created in 2003 by Till Tantau, the same author as for PGF/TikZ, and shares many features with 1 Beamer them. Configuration It supersedes the older classes like SliTeX, seminar, prosper , Examples , etc Elements in presentation It is mostly intended to be used with pdfLateX to produce PDF More control on presentations presentations, but also works with traditional LaTeX route Beside Portability of PDF format, the most prominent and interesting features are: 2 Overlays Handling of layers for progressive display of the same slide Ability to embed many kinds of multimedia content (with companion packages). Automatic creation of an handout (flatten version of the presentation) All (almost) the LaTeX formatting tools (namely math) Drawbacks: requires compilation, type code instead to click.

Jean Hare (SU) A-LaTeX Mai 2021 3 / 40 Jean Hare (SU) A-LaTeX Mai 2021 4 / 40 Beamer Beamer Configuration The basic presentation structure Dans la section

Outline slide

Uses class beamer

Slides defined by environment frame Introductory section 1 Beamer Sectioning commands: only section Configuration and subsection Examples Minimal code: Elements in presentation \documentclass{beamer} More control on presentations \usepackage[utf8]{inputenc} My first slide \begin{document} \begin{frame}{Outline slide} \tableofcontents 2 Overlays \end{frame} Some content \section{Introductory section} a2 = b2 + c2 \begin{frame}{My first slide} Some content\[a^2=b^2 +c^2 \] \end{frame} \end{document}

Jean Hare (SU) A-LaTeX Mai 2021 5 / 40 Jean Hare (SU) A-LaTeX Mai 2021 6 / 40

Beamer Configuration Beamer Configuration Controlling appearance List of standard (outer) themes (Classified according to table of contents navigation, from beameruserguide.) The page size defaults to 128mm cm×96 mm equiv.option aspectratio=43, can be changed to aspectratio=169 (see manual § 8.3); without Navig. Bars Table of Contents Sidebar The body text font is by default a sans-serif font (keep it); default, boxes Berkeley Bergen PaloAlto The general layout of these slides can be defined with a (Presentation) Boadilla Goettingen “theme”, named after a city around the world. The “theme” settings can be modified by “color theme”, “font theme”, “outer theme” and “inner theme”. Madrid Marburg AnnArbor Hannover The themes are globally classified according to the way to display the table CambridgeUS of contents on each frame: ToC on top bar, ToC on side bar, No ToC. Mini Frame Navigation EastLansing Berlin Beside general theme, “Outer themes” control the layout and formating of Pittsburgh Ilmenau the border of the frames (top, bottom and side bars) Rochester Dresden “Inner themes” sets the formating inside the frame’s content area. Tree-Like Navigation Bar Darmstadt This presentation uses: \usetheme{Berlin}, Antibes Frankfurt \useoutertheme{infolines}, \useinnertheme{rounded} JuanLesPins Singapore For handout it adds \usecolortheme{seahorse}. Montpellier Szeged

Jean Hare (SU) A-LaTeX Mai 2021 7 / 40 Jean Hare (SU) A-LaTeX Mai 2021 8 / 40 Beamer Configuration Beamer Examples Gallery of styles Dans la section

1 Beamer Configuration https://deic-web.uab.cat/~iblanes/beamer_gallery Examples http://mcclinews.free.fr/latex/beamergalerie/ Elements in presentation completsgalerie.html More control on presentations https://fr.overleaf.com/gallery/tagged/presentation

2 Overlays

Jean Hare (SU) A-LaTeX Mai 2021 9 / 40 Jean Hare (SU) A-LaTeX Mai 2021 10 / 40

Beamer Examples Section Introduction The very nice following section

Experiment with two themes and colors set First subsection My first slide \usetheme{Berlin} 1 \usetheme{Marburg} \usefonttheme[onlymath]{serif} 2 \usefonttheme[onlymath]{serif} \usecolortheme{seahorse} 3 \usecolortheme{fly} \begin{document} 4 \begin{document} \section{Section Introduction} 5 \section{Section Introduction} \subsection{First subsection} 6 \subsection{First subsection} \begin{frame}{My first slide} 7 \begin{frame}{My first slide} Some content in theme"Berlin" 8 Some content in theme"Marburg" (color"seahorse")\\ 9 (color"fly")\\ Some content in theme ”Berlin” (color ”seahorse”) \& math reset to serif 10 \& math reset to serif & math reset to serif \end{frame} 11 \end{frame} \begin{frame}{My second slide} 12 \begin{frame}{My second slide} \alert{Some other content:} 13 \alert{Some other content:} \[a^2=b^2 +c^2 \] 14 \[a^2=b^2 +c^2 \] \end{frame} 15 \end{frame} \subsection{Second subsection} 16 \subsection{Second subsection} \begin{frame}{My third slide} 17 \begin{frame}{My third slide} Some alternate content 18 Some alternate content \end{frame} 19 \end{frame} %further content 20 %further content

Jean Hare (SU) A-LaTeX Mai 2021 11 / 40 Section Introduction The very nice following section Section Introduction The very nice following section

First subsection Second subsection My second slide My third slide

Some other content: a2 = b2 + c2 Some alternate content

Section Introduction The very nice following section Section Introduction The very nice following section

Third subsection Fourth subsection My fourth slide My fifth slide

Some final content (highlighted with “alert ) {} For more about themes, see : The manual § 15. (highlighted with “structure ) {} The page http://mcclinews.free.fr/latex/ Some ultimate content beamergalerie/completsgalerie.html. This page is part of a web site with a good tutoral, in French : http://mcclinews.free.fr/latex/introbeamer.php. The page http://deic.uab.es/~iblanes/beamer_gallery/ My first slide My second slide

Section Section Introduction Introduction First subsection First subsection Second subsection Second subsection

The very nice The very nice following section following section Third subsection Third subsection Fourth subsection Fourth subsection Some other content: Some content in theme ”Marburg” (color ”fly”) & math reset to serif a2 = b2 + c2

My third slide My fourth slide

Section Section Introduction Introduction First subsection First subsection Second subsection Second subsection

The very nice Some final content (highlighted with “alert ) The very nice following section {} following section Third subsection For more about themes, see : Third subsection Fourth subsection Fourth subsection I The manual § 15. (highlighted with “structure ) {} I The page http://mcclinews.free.fr/latex/ Some alternate content beamergalerie/completsgalerie.html. This page is part of a web site with a good tutoral, in French : http: //mcclinews.free.fr/latex/introbeamer.php. I The page http://deic.uab.es/~iblanes/beamer_gallery/ Beamer Elements in presentation My fifth slide Dans la section Section Introduction First subsection Second subsection

The very nice following section Third subsection Fourth subsection 1 Beamer Configuration Some ultimate content Examples Elements in presentation More control on presentations

2 Overlays

Jean Hare (SU) A-LaTeX Mai 2021 22 / 40

Beamer Elements in presentation A-LaTeX Metadata, Title page, Table of contents Jean Hare

Section Introduction Some important elements can be added in the following way: First subsection Second subsection

Metadata: The very nice following Intermediate LaTeX for beginners \title[A-LaTeX]{Intermediate LaTeX for beginners} section \subtitle[A-LaTeX]{Hannover theme} Third subsection Hannover theme \institute[SU]{Sorbonne Universit{\’e}\\ Laboratoire Kastler Brossel} Fourth subsection \date{11f{\’e}vrier 2021} \author[Jean Hare]{\href{mailto:[email protected]}{Jean Hare}} Jean Hare Titlepage (using metadata): Sorbonne Universit´e \begin{frame} Laboratoire Kastler Brossel \titlepage \end{frame} 11 f´evrier2021 Table of contents: \begin{frame}{Outline} \tableofcontents \end{frame}

Jean Hare (SU) A-LaTeX Mai 2021 23 / 40 A-LaTeX A-LaTeX Jean Hare Outline Jean Hare My first slide

Section Section Introduction Introduction First subsection First subsection Second subsection Second subsection

The very nice The very nice following following section section Third subsection 1 Section Introduction Third subsection Fourth subsection First subsection Fourth subsection Second subsection Some content in theme ”Hannover” (defaultcolor)

2 The very nice following section Third subsection Fourth subsection

Beamer Elements in presentation Beamer Elements in presentation Configuring Table of contents Structuring elements in frames

3 Block environments: Table of contents can be adapted to context with options : 1 Columns (like on this frame) currentsection, currentsubsection, firstsection=, \begin{columns} This is an alertblock hideallsubsections, hideothersubsections, pausesections, etc. \begin{column}{0.5\linewidth} Really alert ! (see manual § 10.5) some content \end{column} Table of content can be repeated at each section or subsection with \begin{column}{0.5\linewidth} This is an ordinary block the code (in preamble) other content \end{column} Really ordinary ! \AtBeginSection[]{% \end{columns} \begin{frame}{Sommaire} This is an exampleblock \tableofcontents[currentsection] 2 Itemize & enumerate, like here \end{frame} Or here It is always useful... } \AtBeginSubsection[]{% Same syntax as standard produced with: \begin{frame}{Dans la section} LaTeX \begin{}{} \tableofcontents[currentsection,currentsubsection] Round labels are selected with block content \end{frame} \end{} } \useinnertheme{rounded} There are also many boxes, see manual § 12.5

Jean Hare (SU) A-LaTeX Mai 2021 27 / 40 Jean Hare (SU) A-LaTeX Mai 2021 28 / 40 Beamer More control on presentations Beamer More control on presentations Dans la section Option for \documentclass and \frame

\documentclass handout, article aspectratio 1 Beamer Configuration hyperref= Examples xcolor= Elements in presentation \begin[. . . ]{frametitle} More control on presentations fragile, containsverbatim plain 2 Overlays noframenumbering squeeze label= shrink=

Jean Hare (SU) A-LaTeX Mai 2021 29 / 40 Jean Hare (SU) A-LaTeX Mai 2021 30 / 40

Beamer More control on presentations Overlays Handling frames Sommaire

To restrict the frame set, use \includeonlyframes{label-list} where labels were defined by label option of frames To repeat any previous frame, use \againframe{label} 1 Beamer Configuration Page’s geometry an be changed with moderation with Examples \setbeamersize{...}. This command (instead of \setlength) Elements in presentation can be used to alter various lengths. More control on presentations Elements or frame can be included only in different versions with : \mode{\ldots] and \mode{\ldots} If a frame must not have border elements, use option plain 2 Overlays If a frame must have verbatim contents, use option fragile Frame transitions can be managed, with moderation (manual § 14.3)

Jean Hare (SU) A-LaTeX Mai 2021 31 / 40 Jean Hare (SU) A-LaTeX Mai 2021 32 / 40 3 is prime (two divisors: 1 and 3). 4 is not prime (three divisors: 1, 2, and 4).

4 is not prime (three divisors: 1, 2, and 4).

Overlays Overlays

Managing the layers Example (slide 1)

The handling of layers (called “Overlays” in the manual) is a great interest of Beamer. Basically, if you want that a whole frame is not displayed all at once, but its points once-by-once, you will ask Beamer to splits the frame into successive slides. \pause in itemize (inside block) The most simple command for this purpose is the command \pause that you can insert between any paragraphs or structures. 2 is prime (two divisors: 1 and 2). As a (dummy) example, you could write : \begin{itemize} \item2 is prime(two divisors: 1 and 2). \pause \item3 is prime(two divisors: 1 and 3). \pause \item4 is not prime(\alert{three} divisors: 1, 2, and 4). \end{itemize} in order to get : Jean Hare (SU) A-LaTeX Mai 2021 33 / 40 Jean Hare (SU) A-LaTeX Mai 2021 34 / 40

Overlays Overlays

Example (slide 2) Example (slide 3)

\pause in itemize (inside block) \pause in itemize (inside block) 2 is prime (two divisors: 1 and 2). 2 is prime (two divisors: 1 and 2). 3 is prime (two divisors: 1 and 3). 3 is prime (two divisors: 1 and 3). 4 is not prime (three divisors: 1, 2, and 4).

Jean Hare (SU) A-LaTeX Mai 2021 34 / 40 Jean Hare (SU) A-LaTeX Mai 2021 34 / 40 Overlays Overlays

The <··· > syntax (slide 1) Incremental specification (slide 1)

Manually enter and keep up-to-date slides numbers is cumbersome. Typing endless \pause is rather tedious and does not provide the Fortunately, Beamer provides shortcuts: whole power of overlays The range can end with the - alone meaning “until the end of the frame”. E.g. in the previous example <2-4> would be written simply <2->. For this purpose, Beamer introduces a new syntax of optional In the same way, <1-4> could be written <-4> to start from the beginning. argument, using so called “pointed brackets” <···>. The range can be defined as incremental by using <+-> which means that The content of <···> is a range of slides on the which the command the current slide number will be used, and incremented when the must be executed command finishes. Hence the regular: becomes: Most commands specific to Beamer accept this parameter, and many commands of LaTeX are redefined to handle it, namely \begin{itemize} \begin{itemize} \item<1-> my first item, \item<+-> my first item, \textbf, \textit, \textsl, \textrm, \textsf and \color. \item<2-> my second item. \item<+-> my second item. For example this frame contains in the fourth \item: \end{itemize} \end{itemize} \item\textbf<4-5>{Most command specific to Beamer} Incremental overlay specification is inherited, allowing the more simple: \alert<5>{accept this parameter} ... \begin{itemize}[<+->] \item my first item, ...

Jean Hare (SU) A-LaTeX Mai 2021 35 / 40 Jean Hare (SU) A-LaTeX Mai 2021 37 / 40

Overlays Overlays Commands controlling overlay Action specifications

Beamer defines a bunch of commands intended to control overlays: Inside <···> it is possible to add some action specifications \only<···>{text} Throw away text content on slides not in <···> Action specifications are put after the slide range, a | and followed by. For example one can write: \onslide<···>{text} Same, but when hidden text still takes space. \item<3-| alert@3> Shown from slide3 on, alerted on slide 3. \visible<···>{text} Same. which set the alert (red color) for item 3 only when it just appears. \uncover<···>{text} Same, but also handle transparency. Actions can be defined for \item, \action, \begin{actionenv} \invisible<···>{text} Opposite of \visible and the block environments and the possible actions are by default, \alt<···>{text}{text} Alternate between text and alt for <···>. alert, uncover, only, visible, invisible, but other can be \temporal<···>{before}{inside}{{after} Alternate between three texts defined by the user. Se manual § 9.6.3 depending on slide index before, inside or after the range of <···>. Simple example using uncover with specified transparency: For the commands \only and \alt the <···> can also be after the text. \setbeamercovered{transparent=30} Then \only can be used to make commands <···>-aware, like in: \begin{itemize}[<+-|uncover@+>] \item first \newcommand{\myblue}{\only{\color{blue}}} \item second \myblue<2> This text is blue only on slide 2. \item third Finally, \only without text argument can also be use as a toggle. \end{itemize} Jean Hare (SU) A-LaTeX Mai 2021 38 / 40 Jean Hare (SU) A-LaTeX Mai 2021 39 / 40 Overlays Overlays Example with uncover Example with uncover

first first second second third third

Jean Hare (SU) A-LaTeX Mai 2021 40 / 40 Jean Hare (SU) A-LaTeX Mai 2021 40 / 40

Overlays Example with uncover

first second third

Jean Hare (SU) A-LaTeX Mai 2021 40 / 40