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.
