Skip to main content

9  Academic Presentations with Reveal.js and Beamer

A scientific presentation is not a manuscript projected onto a wall. A manuscript allows readers to pause and reread; a presentation must guide attention at the pace of a speaker. Quarto makes it possible to maintain the mathematical notation, computational analysis and references behind a presentation in plain text while producing slides for different audiences. This chapter develops a classroom lecture and a research presentation using the synthetic scheduling investigation introduced in Chapter 8.

9.1 Learning objectives

After completing this chapter, you should be able to select a slide format, structure a deck, use incremental content and speaker notes, integrate reproducible calculations, design accessible graphics, and prepare a reliable offline presentation.

9.2 Selecting a presentation format

Reveal.js produces browser-based slides with navigation, fragments and presenter tools. Beamer produces PDF slides through LaTeX and is particularly suitable for mathematical derivations and offline annotation. PowerPoint produces an editable PPTX file useful when collaborators require Office. These formats share Markdown source conventions but not all layout features. A browser fragment is not a PowerPoint animation, and custom HTML is not automatically translated into a PDF. Maintain separate format-specific sources when the differences become substantial.

Requirement Reveal.js Beamer PowerPoint
Browser delivery Native PDF viewer Requires viewer
Offline annotation Browser or exported PDF PDF annotation app Office tools
Progressive content Fragments Overlays Verify or add in Office
Mathematical typography Browser math renderer LaTeX Inspect converted equations
Editable Office slides No No Yes

Begin with the simplest format that meets the audience’s needs. A classroom with unreliable internet benefits from a locally tested PDF. A workshop in which participants follow links and inspect code may benefit from Reveal.js. A conference that requires PPTX should receive a native PPTX output, not a renamed PDF.

9.3 Creating a first deck

Save the following source as lecture.qmd in a standalone directory.

---
title: "Understanding Confidence Intervals"
format:
  revealjs:
    theme: simple
    slide-number: true
    incremental: false
---

After the closing YAML delimiter, write a level-two heading for each slide. A level-one heading normally introduces a section slide. Explicitly setting slide-level: 2 under the format can make the intended hierarchy clearer. A slide should have one central claim or question, rather than several unrelated paragraphs.

## Research question

How precisely can we estimate the difference in mean waiting time?

## Learning objectives

- Identify the parameter.
- Interpret an interval in context.
- Distinguish precision from clinical importance.

Run quarto preview lecture.qmd during development and quarto render lecture.qmd to produce the final file. Previewing a single deck does not guarantee that the complete book renders. Keep example decks outside the book chapter list and give them their own project configuration.

9.4 Progressive revelation and annotation

A useful teaching sequence is question, prediction, calculation, interpretation. Revealing the solution before students attempt the problem removes the opportunity for formative assessment. In Reveal.js, use an incremental block to reveal list items in sequence:

::: {.incremental}
- Identify the parameter.
- Check the assumptions.
- Calculate the interval.
- Interpret the result.
:::

For a single delayed paragraph, use a fragment div. Do not place essential information exclusively in a fragment if students will receive a static handout. Speaker notes can provide prompts that are not displayed on the main slide.

::: {.notes}
Ask students to predict the direction of the difference before showing the estimate.
:::

A handwritten solution slide needs real blank space, not a large decorative box full of instructions. In Reveal.js a dedicated CSS class can set a minimum height; in Beamer a vertical space command can reserve writing room. Keep the footer limited to a slide number where possible. Test the slide on the actual classroom display, because a laptop preview can hide problems with contrast, clipping and font size.

9.5 Mathematical slides and Beamer

Use inline math for short expressions and display math for a central equation. For a differentiable function, the tangent line at \(x=a\) is

\[L(x)=f(a)+f'(a)(x-a).\]

For \(f(x)=x^2+1\) at \(a=2\), the derivative is \(f'(x)=2x\), so \(L(x)=5+4(x-2)=4x-3\). Split this reasoning across a prompt slide and a solution slide rather than shrinking a full derivation to fit. The solution slide can use an aligned environment:

\begin{aligned}
f(2)&=5,\\
f'(2)&=4,\\
L(x)&=5+4(x-2)=4x-3.
\end{aligned}

A Beamer source can begin with the following configuration. A working LaTeX installation is required.

---
title: "Tangent Lines"
format:
  beamer:
    theme: default
    aspectratio: 169
    include-in-header: beamer-header.tex
---

The accompanying header removes navigation symbols and uses only frame numbers in the footer. Native Beamer overlays such as \pause are format-specific. They may generate several PDF pages for a single logical frame; inspect the resulting handout before distributing it. For an annotation workflow, separate question and solution frames are often easier to manage than overlays.

9.6 Designing slides around evidence

A research talk should distinguish the research question, design, estimate, uncertainty and limitations. The synthetic trial from Chapter 8 compares standard and new scheduling procedures. The standard group has eight observations (18, 22, 15, 25, 20, 17, 24, 19); the new group has eight (12, 16, 14, 19, 11, 17, 15, 13). The means are 20 and 14.625 minutes. Define the contrast as new minus standard, so a negative estimate favors shorter waits under the new procedure.

Individual synthetic waiting times and group means.
Figure 9.1: Individual synthetic waiting times and group means.

A figure such as Figure 9.1 shows both individual observations and group means. A bar chart of means alone would hide the spread and sample size. Use a direct title that states the finding without claiming real clinical effectiveness. The dataset is simulated and cannot support a recommendation about actual scheduling policy.

9.6.1 R implementation

The following code produces the estimate and Welch interval. Use a separate executable R deck to avoid mixing engines unnecessarily.

standard <- c(18,22,15,25,20,17,24,19)
new <- c(12,16,14,19,11,17,15,13)
fit <- t.test(new, standard)
mean(new)-mean(standard)
fit$conf.int
fit$p.value

9.6.2 Python implementation

import numpy as np
from scipy import stats
standard = np.array([18,22,15,25,20,17,24,19])
new = np.array([12,16,14,19,11,17,15,13])
fit = stats.ttest_ind(new, standard, equal_var=False)
print(new.mean()-standard.mean())
print(fit.confidence_interval())
print(fit.pvalue)

Both implementations define the contrast in the same order. The interval uses the Welch approximation rather than assuming equal variances. In an actual study, independence, allocation, missing data and the analysis plan must be evaluated before interpreting the test. The accompanying executable decks calculate the statistics rather than requiring a presenter to copy values from a spreadsheet.

9.7 Layout, accessibility and delivery

Use a consistent visual hierarchy: slide title, central evidence, short interpretation. A two-column layout can compare a graph with a brief interpretation, but avoid putting a long code listing beside a detailed graph. Prefer sequential slides for code and results. Use large type, descriptive axis labels, and redundant encodings such as shape and position instead of relying on color alone. Add alternative text to images and provide a text summary of essential findings. A slide deck should remain understandable to a reader who cannot distinguish its colors.

A local Reveal.js presentation may rely on a directory of supporting assets. Keep the HTML and its assets together, or test embed-resources: true for a self-contained HTML output. External videos, fonts or interactive services may still need connectivity. Beamer produces PDF directly. Reveal.js can be printed to PDF using its print mode in a compatible browser; verify page size and fragment behavior. To create a native PowerPoint deck, render a source configured with format: pptx; inspect the resulting file in PowerPoint rather than assuming visual parity.

For a conference, prepare a short backup PDF and a local copy of all required assets. For teaching, distribute a student version with prompts and an instructor version with solutions. Never include confidential patient records in slide assets, speaker notes, hidden cells or source archives. Hiding a cell is not a privacy safeguard.

9.8 Guided practice

9.8.1 Activity 1: Build a three-slide deck

Create a Reveal.js presentation with a research question, a mathematical expression and a conclusion. Render it and verify navigation. Change the theme and compare readability rather than decoration.

9.8.2 Activity 2: Design a calculus teaching sequence

Use \(f(x)=x^2+1\) at \(a=-1\). Create a question slide with writing space, a prediction prompt and a solution slide. Verify that the slope is negative and that the tangent line passes through the point of tangency.

9.8.3 Activity 3: Reproduce a research result

Run the R or Python scheduling example. Change one new-group observation from 19 to 21. Regenerate the estimate and interval. Explain why manually typed numbers in the narrative could become inconsistent with the output.

9.8.4 Activity 4: Compare formats

Render the supplied Beamer and Reveal.js teaching decks. Record differences in typography, progressive revelation, annotation space and navigation. If LaTeX is unavailable, document that dependency rather than reporting a successful render.

9.9 Troubleshooting

Symptom Diagnostic action
Slides run together Inspect heading levels and slide-level setting
Blank or clipped content Reduce content or split the slide
Python kernel unavailable Run quarto check jupyter and inspect environment
Beamer compilation fails Check LaTeX installation and first meaningful error
Image missing offline Check relative path and supporting assets
Fragment missing in handout Inspect print output and create a static version
PPTX layout differs Open in Office and adjust format-specific layout

9.10 Designing a lecture as a sequence of decisions

Begin with an observable learning outcome rather than a list of topics. For example, “students will construct and interpret a tangent line” is more useful than “cover derivatives.” A successful lecture gives students an opportunity to demonstrate that outcome. A presentation is therefore a sequence of decisions about what learners see, what they do, and what evidence the instructor collects. A slide that contains a question and its answer simultaneously may be useful for independent review but is poorly suited to eliciting an initial prediction.

For a fifty-minute class, allocate five minutes to retrieval practice, ten to a worked example, ten to a guided problem, ten to independent or paired practice, ten to discussion, and five to an exit question. These allocations are planning suggestions, not universal rules. If students struggle with the prerequisite derivative, the instructor should adjust the schedule rather than hurry through the planned slides. Keep optional enrichment in a separate section so it can be skipped without losing the central argument.

Stage Visible material Instructor action Evidence of learning
Retrieve Short derivative question Wait before inviting answers Correct derivative
Predict Curve and marked point Ask for slope sign Geometric reasoning
Model One derivation step at a time Explain the connection Student explanation
Practice New problem and blank space Circulate or annotate Independent calculation
Consolidate Solution and limitation Compare approaches Exit response

9.10.1 Guided practice: redesign an overloaded slide

Imagine a slide containing the definition of a derivative, a tangent-line formula, a complete worked example, a graph, and three exercises. Divide it into four slides. The first establishes the question, the second introduces the formula, the third provides a worked example, and the fourth presents a new problem with writing space. Explain which material belongs in speaker notes rather than on the screen. A good redesign preserves mathematical completeness across the deck without requiring every slide to be self-contained.

9.11 A mathematical annotation laboratory

Consider the hypothetical concentration model \(C(t)=80e^{-0.2t}\), where time is measured in hours and concentration in arbitrary units. This is a teaching model, not a medication dosing recommendation. At \(t=2\), the derivative is \(C'(2)=-16e^{-0.4}\). The tangent line is

\[L(t)=80e^{-0.4}-16e^{-0.4}(t-2). \tag{9.1}\]

The derivative has units of concentration per hour. Its negative sign indicates that the model is decreasing at the selected time. The tangent line gives a local approximation, not a replacement for the exponential model at all times. At \(t=3\), the exact value is about 43.90 units, while the tangent approximation is about 42.90 units. The difference is about 1.00 unit. The exponential is convex, so its tangent lies below the curve. This geometric observation provides a useful check on the arithmetic.

Exponential curve and tangent at two hours. The tangent lies below the curve and agrees at the point of tangency.
Figure 9.2: Exponential curve and tangent at two hours. The tangent lies below the curve and agrees at the point of tangency.

Use Figure 9.2 as a prediction slide before displaying Equation 9.1. Ask students whether the tangent approximation at three hours is too high or too low. Then give them time to calculate. This order encourages reasoning from the graph before evaluating the formula.

9.11.1 Reveal.js teaching source

## Predict the slope

What is the sign of $C'(2)$? Explain without differentiating.

::: {.notes}
Wait for a geometric explanation before showing the solution.
:::

## Calculate the tangent

Find $C(2)$ and $C'(2)$, then write the tangent equation.

::: {.writing-space}
:::

## Solution

$$L(t)=80e^{-0.4}-16e^{-0.4}(t-2).$$

The writing-space class is defined in a CSS file. A minimum height reserves room, but it does not guarantee that the slide fits on every display. The instructor should inspect the actual browser viewport, especially when using a projector with a different aspect ratio. Speaker notes are prompts for delivery, not a secure location for confidential information. Anyone receiving the source or inspecting the HTML may be able to read them.

9.11.2 Beamer teaching source

## Calculate the tangent

Find $C(2)$ and $C'(2)$, then write the tangent equation.

\vspace{3cm}

## Solution

$$L(t)=80e^{-0.4}-16e^{-0.4}(t-2).$$

A separate prompt frame and solution frame are preferable when using a PDF annotation application. Beamer overlays may produce multiple PDF pages for a single logical frame. Handwritten annotations on one page do not necessarily carry over to another. A page-number-only footer reduces distractions and leaves more room for mathematical work. The companion Beamer header uses the frame number, which may differ from the physical PDF page number when overlays are present.

\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}{\hfill\insertframenumber\hspace{1em}\vskip4pt}

For a student handout, consider keeping the prompt and solution on separate pages or distributing the solution after class. Do not rely on hidden fragments as a way to protect assessment answers. A browser deck is a publication, and its source may expose content that is not currently visible.

9.12 A research talk built around an estimand

A ten-minute conference presentation cannot reproduce every detail of a journal article. It should nevertheless preserve the scientific logic. Begin with the question and explain the outcome, population, comparison, and study design before presenting a numerical result. A result slide that states only a p-value leaves the audience unable to judge magnitude or precision. Use a title that communicates the result in context, such as “The constructed new-scheduling group had shorter mean waits.” Avoid stronger language implying a real clinical intervention when the data are synthetic.

Use the scheduling data from Chapter 8. The standard group has mean 20 minutes and the new group has mean 14.625 minutes. The contrast is new minus standard, so a negative estimate indicates shorter observed waits. A Welch interval communicates uncertainty about a population contrast under the model assumptions. In a synthetic example, the interval is a demonstration of the method rather than evidence about an actual population.

Estimated new-minus-standard difference with a 95 percent Welch interval and a vertical reference line at zero.
Figure 9.3: Estimated new-minus-standard difference with a 95 percent Welch interval and a vertical reference line at zero.

A useful spoken interpretation of Figure 9.3 is: “The constructed difference is about five minutes, with an interval from approximately eight and a half minutes shorter to two minutes shorter.” The exact interval is approximately \((-8.71,-2.04)\). Explain that the interval is conditional on the statistical assumptions. Do not claim that the interval contains 95 percent of individual waiting times.

9.12.1 R computation for the research deck

standard <- c(18,22,15,25,20,17,24,19)
new <- c(12,16,14,19,11,17,15,13)
fit <- t.test(new, standard, var.equal = FALSE)
fit$conf.int
mean(new) - mean(standard)

9.12.2 Python computation for the research deck

from scipy.stats import ttest_ind
standard = [18,22,15,25,20,17,24,19]
new = [12,16,14,19,11,17,15,13]
fit = ttest_ind(new, standard, equal_var=False)
print(fit.confidence_interval())

The two implementations should agree to numerical tolerance. Use the same contrast order and confidence level in both. A difference in sign is often a consequence of reversing group order rather than a software defect. A computational slide should include enough context to identify the input data and method, even if the source code is hidden during the talk. The source package should contain the complete analysis.

9.13 Designing for the room and the audience

A figure prepared for a journal column is not automatically suitable for projection. A slide audience views the figure from a distance and cannot zoom or inspect a dense caption while listening. Remove redundant legends when direct labels are clearer. Preserve axis units and uncertainty intervals. Increase the size of axis labels, but avoid enlarging the entire figure so much that it clips. A figure should communicate its central message without relying exclusively on color. For example, a solid line and dashed line distinguish the exponential model and tangent even when projected in grayscale.

Test a slide from the back of the intended room. Ask a colleague to identify the outcome and contrast without hearing your explanation. If they cannot, revise the title or labels. For remote teaching, check the screen-share view at typical laptop size. Provide a static accessible description of the main graph in the accompanying notes. Alternative text should explain the relevant pattern, not simply repeat the file name.

A common mistake is to use a table with every participant’s measurement in a conference presentation. The complete table may belong in supplementary materials. The slide can instead display the group sizes, means, difference and interval, while the data file remains available for reproduction. Never remove a limitation simply because it makes the result less dramatic. Scientific communication is a process of prioritizing information without changing its meaning.

9.14 Managing computational execution during delivery

Render the deck before the presentation. Live execution can be useful for teaching programming, but it introduces dependencies on the interpreter, network, data paths and package versions. A pre-rendered figure provides a reliable fallback. When a live demonstration fails, explain the intended computation and use the saved result rather than spending the remaining class time debugging an environment. A reproducible source package allows students to repeat the demonstration afterward.

Quarto execution options distinguish whether code runs from whether its source or output appears. For example, echo: false hides the source from the rendered presentation but does not prevent execution. eval: false prevents execution. Neither is a data-security control. During development, keep errors visible in the console and fix them before release. Avoid silently presenting stale cached results after changing the input data. A fresh render and comparison with known numerical benchmarks are useful release checks.

9.15 Presenter rehearsal and handout production

Prepare a delivery copy and a separate learner copy when their purposes differ. The delivery copy may use progressive revelation and speaker notes. The learner copy should retain the mathematical reasoning and include the context necessary for independent review. A PDF exported from a browser deck may have different pagination from the browser view; check the print preview and inspect the exported pages. For Beamer, inspect the actual PDF rather than assuming that every frame fits. For PowerPoint, open the file in the intended Office application and inspect equations, images, fonts and line breaks.

Record the version of the deck, the date of the rehearsal, the device and display tested, and any unresolved issues. Carry a local PDF and the necessary assets. Test without internet access before claiming that the deck is offline-ready. A self-contained HTML setting may embed many resources, but external links, remote media or custom scripts can still require connectivity. Check those dependencies individually.

9.16 Extended project: two-format teaching and research portfolio

Create a Reveal.js lecture and a Beamer version of the same mathematical lesson, followed by a short research presentation using the scheduling example. Include a prediction prompt, a spacious annotation frame, a worked solution, a labeled figure, and a formative assessment. The research presentation must state the estimand, report the effect and uncertainty, and distinguish synthetic data from real clinical evidence. Submit the sources, dependencies, rendered outputs when available, and a rehearsal log. If an engine is unavailable, record the failed or unattempted check rather than claiming success.

Criterion Points
Learning objectives and instructional sequencing 6
Mathematical and statistical accuracy 8
Annotation space and accessible graphics 6
Computational reproducibility 5
Format-specific delivery and rehearsal evidence 5
Total 30

9.16.1 Additional review exercises

  1. Explain why a prompt and solution should occupy separate frames in an annotated PDF.
  2. Compute \(C(2)\) and \(C'(2)\) for the exponential model.
  3. Evaluate the tangent at three hours and compare with the exact model.
  4. Explain why convexity predicts the direction of approximation error.
  5. Reverse the scheduling contrast and describe the resulting interval.
  6. Distinguish a confidence interval for a mean difference from a range of individual observations.
  7. Explain the difference between echo: false and eval: false.
  8. Identify two ways to make a figure readable in grayscale.
  9. Describe how to test a deck for offline use.
  10. Explain what evidence is needed before declaring a presentation ready for classroom delivery.

9.17 Chapter summary

A reproducible presentation connects a clearly defined audience and message with maintained source, computational evidence and format-specific delivery. Use progressive revelation deliberately, keep mathematical slides spacious, and verify each output independently. A successful render is necessary but not sufficient: the slides must also be accurate, readable and usable in the intended teaching or research setting.

9.18 Review exercises

  1. Distinguish Reveal.js, Beamer and PPTX.
  2. Explain why a manuscript should not simply be projected as slides.
  3. Describe the role of a level-two heading.
  4. Explain the purpose of incremental lists.
  5. Distinguish speaker notes from visible content.
  6. Derive the tangent line for \(f(x)=x^2+1\) at \(a=-1\).
  7. Explain why a PDF overlay may complicate annotation.
  8. Compute the standard-group mean.
  9. Compute the new-minus-standard contrast.
  10. Explain why Welch’s method is used here.
  11. Identify two accessibility improvements for a graph.
  12. Explain why hiding code does not protect private data.
  13. Describe a reliable offline delivery plan.
  14. Explain why PowerPoint output requires separate inspection.
  15. Describe how to test an updated computational deck.
  16. Identify two limitations of the synthetic scheduling example.

9.19 Applied project: A reproducible academic presentation

Develop an eight-to-twelve-slide lecture or research talk. Include a clear objective, a mathematical expression, one reproducible analysis, a labeled figure, an interpretation, a limitation and a closing summary. Submit source, dependencies, rendered slides and a brief verification log. For a lecture include a prompt with writing space; for a research talk include a statement of the study design and uncertainty. Use synthetic or publicly shareable data.

Criterion Points
Audience and organization 5
Mathematical and statistical accuracy 5
Reproducible computation 5
Visual design and accessibility 5
Delivery checks and documentation 5
Total 25

9.20 Further reading

9.21 Supplemental assessment

  1. Conceptual (4 points). Explain why a presentation should not simply reproduce a manuscript.
  2. Technical (8 points). Prepare three slides on mean versus median for waits 10,12,15,18,25; include one prediction prompt.
  3. Applied (8 points). Create Reveal.js and Beamer versions with accessible labels and space for annotations.

See the student assessment packet in the source package for submission guidance and any required datasets.

9.22 Looking ahead

Organize presentations and research resources within a website in Chapter 10.

9.23 Interactive learning lab

Explore the activity below, then explain what changed and why.

Open the activity in its own page.