Revealjs Options

Revealjs is an open source HTML presentation framework. To learn more about Revealjs see https://revealjs.com/.

See the Revealjs format user guide for more details on creating Revealjs output with Quarto.

format: revealjs

Title & Author

title

Document title

subtitle

Identifies the subtitle of the document.

date

Document date

author

Author or authors of the document

institute

Author affiliations for the presentation.

order

Order for document when included in a website automatic sidebar menu.

Format Options

theme

Theme name, theme scss file, or a mix of both.

css

One or more CSS style sheets.

identifier-prefix

Specify a prefix to be added to all identifiers and internal links in HTML and DocBook output, and to footnote numbers in Markdown and Haddock output. This is useful for preventing duplicate identifiers when generating fragments to be included in other pages.

email-obfuscation

Specify a method for obfuscating mailto: links in HTML documents.

  • javascript: Obfuscate links using JavaScript.
  • references: Obfuscate links by printing their letters as decimal or hexadecimal character references.
  • none (default): Do not obfuscate links.
html-q-tags

Use <q> tags for quotes in HTML.

quarto-required

A semver version range describing the supported quarto versions for this document or project.

Examples:

  • >= 1.1.0: Require at least quarto version 1.1
  • 1.*: Require any quarto versions whose major version number is 1

Table of Contents

toc

Include an automatically generated table of contents (or, in the case of latex, context, docx, odt, opendocument, rst, or ms, an instruction to create one) in the output document. This option has no effect if standalone is false.

Note that if you are producing a PDF via ms, the table of contents will appear at the beginning of the document, before the title. If you would prefer it to be at the end of the document, use the option pdf-engine-opt: --no-toc-relocation.

toc-depth

Specify the number of section levels to include in the table of contents. The default is 3

toc-title

The title used for the table of contents.

Numbering

number-sections

Number section headings rendered output. By default, sections are not numbered. Sections with class .unnumbered will never be numbered, even if number-sections is specified.

number-depth

By default, all headings in your document create a numbered section. You customize numbering depth using the number-depth option.

For example, to only number sections immediately below the chapter level, use this:

number-depth: 1
number-offset

Offset for section headings in output (offsets are 0 by default) The first number is added to the section number for top-level headings, the second for second-level headings, and so on. So, for example, if you want the first top-level heading in your document to be numbered “6”, specify number-offset: 5. If your document starts with a level-2 heading which you want to be numbered “1.5”, specify number-offset: [1,4]. Implies number-sections

shift-heading-level-by

Shift heading levels by a positive or negative integer. For example, with shift-heading-level-by: -1, level 2 headings become level 1 headings, and level 3 headings become level 2 headings. Headings cannot have a level less than 1, so a heading that would be shifted below level 1 becomes a regular paragraph. Exception: with a shift of -N, a level-N heading at the beginning of the document replaces the metadata title.

Slides

incremental

Make list items in slide shows display incrementally (one by one). The default is for lists to be displayed all at once.

slide-level

Specifies that headings with the specified level create slides. Headings above this level in the hierarchy are used to divide the slide show into sections; headings below this level create subheads within a slide. Valid values are 0-6. If a slide level of 0 is specified, slides will not be split automatically on headings, and horizontal rules must be used to indicate slide boundaries. If a slide level is not specified explicitly, the slide level will be set automatically based on the contents of the document

slide-number

Display the page number of the current slide

  • true: Show slide number
  • false: Hide slide number

Can optionally be set as a string that specifies the number formatting:

  • h.v: Horizontal . vertical slide number
  • h/v: Horizontal / vertical slide number
  • c: Flattened slide number
  • c/t: Flattened slide number / total slides (default)
show-slide-number

Contexts in which the slide number appears (all, print, or speaker)

title-slide-attributes

Additional attributes for the title slide of a reveal.js presentation as a map of attribute names and values. For example

  title-slide-attributes:
      data-background-image: /path/to/title_image.png
      data-background-size: contain      

(Note that the data- prefix is required here, as it isn’t added automatically.)

title-slide-style

The title slide style. Use pandoc to select the Pandoc default title slide style.

center-title-slide

Vertical centering of title slide

show-notes

Make speaker notes visible to all viewers

rtl

Change the presentation direction to be RTL

Slide Content

logo

Logo image (placed in bottom right corner of slides)

footer

Footer to include on all slides. Can also be set per-slide by including a div with class .footer on the slide.

scrollable

true to allow content that overflows slides vertically to scroll. This can also be set per-slide by including the .scrollable class on the slide title.

smaller

true to use a smaller default font for slide content. This can also be set per-slide by including the .smaller class on the slide title.

output-location

Location of output relative to the code that generated it. The possible values are as follows:

  • default: Normal flow of the slide after the code
  • fragment: In a fragment (not visible until you advance)
  • slide: On a new slide after the curent one
  • column: In an adjacent column
  • column-fragment: In an adjacent column (not visible until you advance)

Note that this option is supported only for the revealjs format.

Slide Tools

overview

Enable the slide overview mode

menu

Configuration for revealjs menu.

chalkboard

Configuration for revealjs chalkboard.

multiplex

Configuration for reveal presentation multiplexing.

Transitions

transition

Transition style for slides backgrounds. (none, fade, slide, convex, concave, or zoom)

transition-speed

Slide transition speed (default, fast, or slow)

background-transition

Transition style for full page slide backgrounds. (none, fade, slide, convex, concave, or zoom)

fragments

Turns fragments on and off globally

auto-animate

Globally enable/disable auto-animate (enabled by default)

auto-animate-easing

Default CSS easing function for auto-animation. Can be overridden per-slide or per-element via attributes.

auto-animate-duration

Duration (in seconds) of auto-animate transition. Can be overridden per-slide or per-element via attributes.

auto-animate-unmatched

Auto-animate unmatched elements. Can be overridden per-slide or per-element via attributes.

auto-animate-styles

CSS properties that can be auto-animated (positional styles like top, left, etc. are always animated).

Media

preview-links

Open links in an iframe preview overlay.

  • true: Open links in iframe preview overlay
  • false: Do not open links in iframe preview overlay
  • auto (default): Open links in iframe preview overlay, in fullscreen mode.
auto-play-media

Autoplay embedded media (null, true, or false). Default is null (only when autoplay attribute is specified)

preload-iframes

Global override for preloading lazy-loaded iframes

  • null: Iframes with data-src AND data-preload will be loaded when within the viewDistance, iframes with only data-src will be loaded when visible
  • true: All iframes with data-src will be loaded when within the viewDistance
  • false: All iframes with data-src will be loaded only when visible
view-distance

Number of slides away from the current slide to pre-load resources for

mobile-view-distance

Number of slides away from the current slide to pre-load resources for (on mobile devices).

parallax-background-image

Parallax background image

parallax-background-size

Parallax background size (e.g. ‘2100px 900px’)

parallax-background-horizontal

Number of pixels to move the parallax background horizontally per slide.

parallax-background-vertical

Number of pixels to move the parallax background vertically per slide.

Slide Layout

auto-stretch

For slides with a single top-level image, automatically stretch it to fill the slide.

width

The “normal” width of the presentation, aspect ratio will be preserved when the presentation is scaled to fit different resolutions. Can be specified using percentage units.

height

The “normal” height of the presentation, aspect ratio will be preserved when the presentation is scaled to fit different resolutions. Can be specified using percentage units.

margin

For revealjs, the factor of the display size that should remain empty around the content (e.g. 0.1).

For typst, a dictionary with the fields defined in the Typst documentation: x, y, top, bottom, left, right (margins are specified in cm units, e.g. 5cm).

min-scale

Bounds for smallest possible scale to apply to content

max-scale

Bounds for largest possible scale to apply to content

center

Vertical centering of slides

disable-layout

Disables the default reveal.js slide layout (scaling and centering)

code-block-height

Sets the maximum height for source code blocks that appear in the presentation.

Layout

cap-location

Where to place figure and table captions (top, bottom, or margin)

fig-cap-location

Where to place figure captions (top, bottom, or margin)

tbl-cap-location

Where to place table captions (top, bottom, or margin)

classoption

For LaTeX/PDF output, the options set for the document class.

For HTML output using KaTeX, you can render display math equations flush left using classoption: fleqn

grid

Properties of the grid system used to layout Quarto HTML pages.

max-width

Adds a css max-width to the body Element.

margin-left

For HTML output, sets the margin-left property on the Body element.

For LaTeX output, sets the left margin if geometry is not used (otherwise geometry overrides this value)

For ConTeXt output, sets the left margin if layout is not used, otherwise layout overrides these.

For wkhtmltopdf sets the left page margin.

margin-right

For HTML output, sets the margin-right property on the Body element.

For LaTeX output, sets the right margin if geometry is not used (otherwise geometry overrides this value)

For ConTeXt output, sets the right margin if layout is not used, otherwise layout overrides these.

For wkhtmltopdf sets the right page margin.

margin-top

For HTML output, sets the margin-top property on the Body element.

For LaTeX output, sets the top margin if geometry is not used (otherwise geometry overrides this value)

For ConTeXt output, sets the top margin if layout is not used, otherwise layout overrides these.

For wkhtmltopdf sets the top page margin.

margin-bottom

For HTML output, sets the margin-bottom property on the Body element.

For LaTeX output, sets the bottom margin if geometry is not used (otherwise geometry overrides this value)

For ConTeXt output, sets the bottom margin if layout is not used, otherwise layout overrides these.

For wkhtmltopdf sets the bottom page margin.

Code

code-fold

Collapse code into an HTML <details> tag so the user can display it on-demand.

  • true: collapse code
  • false (default): do not collapse code
  • show: use the <details> tag, but show the expanded code initially.
code-summary

Summary text to use for code blocks collapsed using code-fold

code-overflow

Choose how to handle code overflow, when code lines are too wide for their container. One of:

  • scroll
  • wrap
code-line-numbers

Include line numbers in code block output (true or false).

For revealjs output only, you can also specify a string to highlight specific lines (and/or animate between sets of highlighted lines).

  • Sets of lines are denoted with commas:
    • 3,4,5
    • 1,10,12
  • Ranges can be denoted with dashes and combined with commas:
    • 1-3,5
    • 5-10,12,14
  • Finally, animation steps are separated by |:
    • 1-3|1-3,5 first shows 1-3, then 1-3,5
    • |5|5-10,12 first shows no numbering, then 5, then lines 5-10 and 12
code-copy

Enable a code copy icon for code blocks.

  • true: Always show the icon
  • false: Never show the icon
  • hover (default): Show the icon when the mouse hovers over the code block
code-link

Enables hyper-linking of functions within code blocks to their online documentation.

Code linking is currently implemented only for the knitr engine (via the downlit package). A limitation of downlit currently prevents code linking if code-line-numbers is also true.

code-annotations

The style to use when displaying code annotations. Set this value to false to hide code annotations.

highlight-style

Specifies the coloring style to be used in highlighted source code.

Instead of a STYLE name, a JSON file with extension .theme may be supplied. This will be parsed as a KDE syntax highlighting theme and (if valid) used as the highlighting style.

syntax-definitions

KDE language syntax definition files (XML)

indented-code-classes

Specify classes to use for all indented code blocks

Execution

Execution options should be specified within the execute key. For example:

execute:
  echo: false
  warning: false
eval

Evaluate code cells (if false just echos the code into output).

  • true (default): evaluate code cell
  • false: don’t evaluate code cell
  • [...]: A list of positive or negative line numbers to selectively include or exclude lines (explicit inclusion/excusion of lines is available only when using the knitr engine)
echo

Include cell source code in rendered output.

  • true (default in most formats): include source code in output
  • false (default in presentation formats like beamer, revealjs, and pptx): do not include source code in output
  • fenced: in addition to echoing, include the cell delimiter as part of the output.
  • [...]: A list of positive or negative line numbers to selectively include or exclude lines (explicit inclusion/excusion of lines is available only when using the knitr engine)
output

Include the results of executing the code in the output. Possible values:

  • true: Include results.
  • false: Do not include results.
  • asis: Treat output as raw markdown with no enclosing containers.
warning

Include warnings in rendered output.

error

Include errors in the output (note that this implies that errors executing code will not halt processing of the document).

include

Catch all for preventing any output (code or results) from being included in output.

cache

Cache results of computations (using the knitr cache for R documents, and Jupyter Cache for Jupyter documents).

Note that cache invalidation is triggered by changes in chunk source code (or other cache attributes you’ve defined).

  • true: Cache results
  • false: Do not cache results
  • refresh: Force a refresh of the cache even if has not been otherwise invalidated.
freeze

Control the re-use of previous computational output when rendering.

  • true: Never recompute previously generated computational output during a global project render
  • false (default): Recompute previously generated computational output
  • auto: Re-compute previously generated computational output only in case their source file changes

Figures

fig-align

Figure horizontal alignment (default, left, right, or center)

fig-cap-location

Where to place figure captions (top, bottom, or margin)

fig-width

Default width for figures generated by Matplotlib or R graphics.

Note that with the Jupyter engine, this option has no effect when provided at the cell level; it can only be provided with document or project metadata.

fig-height

Default height for figures generated by Matplotlib or R graphics.

Note that with the Jupyter engine, this option has no effect when provided at the cell level; it can only be provided with document or project metadata.

fig-format

Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf)

fig-dpi

Default DPI for figures generated by Matplotlib or R graphics.

Note that with the Jupyter engine, this option has no effect when provided at the cell level; it can only be provided with document or project metadata.

fig-asp

The aspect ratio of the plot, i.e., the ratio of height/width. When fig-asp is specified, the height of a plot (the option fig-height) is calculated from fig-width * fig-asp.

The fig-asp option is only available within the knitr engine.

fig-responsive

Whether to make images in this document responsive.

Tables

tbl-colwidths

Apply explicit table column widths for markdown grid tables and pipe tables that are more than columns characters wide (72 by default).

Some formats (e.g. HTML) do an excellent job automatically sizing table columns and so don’t benefit much from column width specifications. Other formats (e.g. LaTeX) require table column sizes in order to correctly flow longer cell content (this is a major reason why tables > 72 columns wide are assigned explicit widths by Pandoc).

This can be specified as:

  • auto: Apply markdown table column widths except when there is a hyperlink in the table (which tends to throw off automatic calculation of column widths based on the markdown text width of cells). (auto is the default for HTML output formats)

  • true: Always apply markdown table widths (true is the default for all non-HTML formats)

  • false: Never apply markdown table widths.

  • An array of numbers (e.g. [40, 30, 30]): Array of explicit width percentages.

tbl-cap-location

Where to place table captions (top, bottom, or margin)

df-print

Method used to print tables in Knitr engine documents:

  • default: Use the default S3 method for the data frame.
  • kable: Markdown table using the knitr::kable() function.
  • tibble: Plain text table using the tibble package.
  • paged: HTML table with paging for row and column overflow.

The default printing method is kable.

References

bibliography

Document bibliography (BibTeX or CSL). May be a single file or a list of files

csl

Citation Style Language file to use for formatting references.

citations-hover

Enables a hover popup for citation that shows the reference information.

citeproc

Turn on built-in citation processing. To use this feature, you will need to have a document containing citations and a source of bibliographic data: either an external bibliography file or a list of references in the document’s YAML metadata. You can optionally also include a csl citation style file.

citation-abbreviations

JSON file containing abbreviations of journals that should be used in formatted bibliographies when form="short" is specified. The format of the file can be illustrated with an example:

{ "default": {
    "container-title": {
      "Lloyd's Law Reports": "Lloyd's Rep",
      "Estates Gazette": "EG",
      "Scots Law Times": "SLT"
    }
  }
}

Footnotes

footnotes-hover

Enables a hover popup for footnotes that shows the footnote contents.

reference-location

Specify location for footnotes. Also controls the location of references, if reference-links is set.

  • block: Place at end of current top-level block
  • section: Place at end of current section
  • margin: Place at the margin
  • document: Place at end of document

Crossrefs

crossref

Configuration for crossref labels and prefixes.

crossrefs-hover

Enables a hover popup for cross references that shows the item being referenced.

Citation

citation

Citation information for the document itself specified as CSL YAML in the document front matter.

For more on supported options, see Citation Metadata.

Language

lang

Identifies the main language of the document using IETF language tags (following the BCP 47 standard), such as en or en-GB. The Language subtag lookup tool can look up or verify these tags.

This affects most formats, and controls hyphenation in PDF output when using LaTeX (through babel and polyglossia) or ConTeXt.

language

YAML file containing custom language translations

dir

The base script direction for the document (rtl or ltr).

For bidirectional documents, native pandoc spans and divs with the dir attribute can be used to override the base direction in some output formats. This may not always be necessary if the final renderer (e.g. the browser, when generating HTML) supports the [Unicode Bidirectional Algorithm].

When using LaTeX for bidirectional documents, only the xelatex engine is fully supported (use --pdf-engine=xelatex).

Includes

include-before-body

Include contents at the beginning of the document body (e.g. after the <body> tag in HTML, or the \begin{document} command in LaTeX).

A string value or an object with key “file” indicates a filename whose contents are to be included

An object with key “text” indicates textual content to be included

include-after-body

Include content at the end of the document body immediately after the markdown content. While it will be included before the closing </body> tag in HTML and the \end{document} command in LaTeX, this option refers to the end of the markdown content.

A string value or an object with key “file” indicates a filename whose contents are to be included

An object with key “text” indicates textual content to be included

include-in-header

Include contents at the end of the header. This can be used, for example, to include special CSS or JavaScript in HTML documents.

A string value or an object with key “file” indicates a filename whose contents are to be included

An object with key “text” indicates textual content to be included

resources

Path (or glob) to files to publish with this document.

metadata-files

Read metadata from the supplied YAML (or JSON) files. This option can be used with every input format, but string scalars in the YAML file will always be parsed as Markdown. Generally, the input will be handled the same as in YAML metadata blocks. Values in files specified later in the list will be preferred over those specified earlier. Metadata values specified inside the document, or by using -M, overwrite values specified with this option.

Metadata

keywords

List of keywords to be included in the document metadata.

pagetitle

Sets the title metadata for the document

title-prefix

Specify STRING as a prefix at the beginning of the title that appears in the HTML header (but not in the title as it appears at the beginning of the body)

description-meta

Sets the description metadata for the document

author-meta

Sets the author metadata for the document

date-meta

Sets the date metadata for the document

Rendering

from

Format to read from. Extensions can be individually enabled or disabled by appending +EXTENSION or -EXTENSION to the format name (e.g. markdown+emoji).

output-file

Output file to write to

output-ext

Extension to use for generated output file

template

Use the specified file as a custom template for the generated document.

template-partials

Include the specified files as partials accessible to the template for the generated content.

standalone

Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment)

embed-resources

Produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. The resulting file should be “self-contained,” in the sense that it needs no external files and no net access to be displayed properly by a browser. This option works only with HTML output formats, including html4, html5, html+lhs, html5+lhs, s5, slidy, slideous, dzslides, and revealjs. Scripts, images, and stylesheets at absolute URLs will be downloaded; those at relative URLs will be sought relative to the working directory (if the first source file is local) or relative to the base URL (if the first source file is remote). Elements with the attribute data-external="1" will be left alone; the documents they link to will not be incorporated in the document. Limitation: resources that are loaded dynamically through JavaScript cannot be incorporated; as a result, some advanced features (e.g. zoom or speaker notes) may not work in an offline “self-contained” reveal.js slide show.

self-contained-math

Embed math libraries (e.g. MathJax) within self-contained output. Note that math libraries are not embedded by default because they are quite large and often time consuming to download.

filters

Specify executables or Lua scripts to be used as a filter transforming the pandoc AST after the input is parsed and before the output is written.

shortcodes

Specify Lua scripts that implement shortcode handlers

keep-md

Keep the markdown file generated by executing code

keep-ipynb

Keep the notebook file generated from executing code.

ipynb-filters

Filters to pre-process ipynb files before rendering to markdown

ipynb-shell-interactivity

Specify which nodes should be run interactively (displaying output from expressions)

plotly-connected

If true, use the “notebook_connected” plotly renderer, which downloads its dependencies from a CDN and requires an internet connection to view.

extract-media

Extract images and other media contained in or linked from the source document to the path DIR, creating it if necessary, and adjust the images references in the document so they point to the extracted files. Media are downloaded, read from the file system, or extracted from a binary container (e.g. docx), as needed. The original file paths are used if they are relative paths not containing … Otherwise filenames are constructed from the SHA1 hash of the contents.

resource-path

List of paths to search for images and other resources.

default-image-extension

Specify a default extension to use when image paths/URLs have no extension. This allows you to use the same source for formats that require different kinds of images. Currently this option only affects the Markdown and LaTeX readers.

abbreviations

Specifies a custom abbreviations file, with abbreviations one to a line. This list is used when reading Markdown input: strings found in this list will be followed by a nonbreaking space, and the period will not produce sentence-ending space in formats like LaTeX. The strings may not contain spaces.

dpi

Specify the default dpi (dots per inch) value for conversion from pixels to inch/ centimeters and vice versa. (Technically, the correct term would be ppi: pixels per inch.) The default is 96. When images contain information about dpi internally, the encoded value is used instead of the default specified by this option.

html-table-processing

If none, do not process tables in HTML input.

Text Output

strip-comments

Strip out HTML comments in the Markdown source, rather than passing them on to Markdown, Textile or HTML output as raw HTML. This does not apply to HTML comments inside raw HTML blocks when the markdown_in_html_blocks extension is not set.

ascii

Use only ASCII characters in output. Currently supported for XML and HTML formats (which use entities instead of UTF-8 when this option is selected), CommonMark, gfm, and Markdown (which use entities), roff ms (which use hexadecimal escapes), and to a limited degree LaTeX (which uses standard commands for accented characters when possible). roff man output uses ASCII by default.

Library

revealjs-url

Directory containing reveal.js files.