Section 34.2 Beamer LaTeX
Run this to produce a Beamer LaTeX slideshow:
xsltproc --xinclude -o path/to/output/slides.tex path/to/pretext/xsl/pretext-beamer.xsl path/to/source/slides.xml
Of course, you should then run e.g.
pdflatex slides.tex to produce a PDF.
Beamer has a large collection of themes, which set colors, navigation aids, and the overall look of every frame. Elect one with the
@theme attribute of the <appearance> element within the <beamer> element of the publication file, exactly as you would name it in a \usetheme command (Subsection 45.7.1). Absent a choice, the Boadilla theme is used. A theme name your LaTeX installation does not provide stops the build early, with an error message that repeats the name and suggests the likely repairs. Theme names are case-sensitive—it is Singapore, never singapore—so check capitalization before anything else.
Beamer builds each slide as a small page—16 centimeters by 9 centimeters for the default shape—which a PDF viewer then scales up to fill whatever screen you present on. So a point size is never what a viewer sees. What a viewer sees is the size of the type relative to the slide, and that is what the two options below control.
Elect the shape with the
@aspect-ratio attribute of the <page> element within the <beamer> element of the publication file (Subsection 45.7.2). The default is 16:9, which matches most projectors and displays made this century. Choose 4:3 for an older projector, or one of the other shapes on offer to match a particular room. A wider shape buys width for your content and gives back a little height, so slides that are already tall may need attention after a change—in particular an image sized as a percentage of the width will grow taller as the slide grows wider.
Beamer’s default type is large, which is right for a lecture hall and can be too large when you want room to write on a slide, or when you have a lot to show at once. Reduce it with the
@font-size attribute of the <beamer> element (Subsection 45.7.3). The default is 11, and a smaller value scales everything together—body text, slide titles, blocks, and mathematics—so the whole slide simply holds more. Going from 11 to 9, for instance, leaves the type a fifth smaller on screen, whatever the screen.
Beamer’s own habit is to center a frame’s content vertically. A PreTeXt slideshow instead places content at the top of every frame by default, in agreement with the Reveal.js conversion. For the classic centered look—title page, section pages, and every slide—set a document-wide default of
middle with the @valign attribute described in Section 4.43.
Beamer themes differ in whether they show a frame number, and where. Set the
@slide-numbering attribute of the <appearance> element to yes (Subsection 45.7.1), and a theme that shows a frame number shows instead the number PreTeXt gives each <slide>, formed exactly as for a Reveal.js slideshow (“Slide Numbers” in Section 34.1). Some themes, such as Warsaw and Berlin, have a place for a frame number that they leave empty, and that place then gets the number. A theme with no place for a frame number, such as the default theme, shows none. Where a theme would also show a total, as Boadilla does, the number appears alone, so your audience is not told how long your talk will run. The title, contents, abstract, and section title frames show no number. With the default value, no, no frame shows a number, whatever the theme.
