Slides
You can use pure Markdown, HTML, CSS, or WLX languages when creating slides.
This is powered by wljs-revealjs, which integrates the amazing RevealJS framework and the WLX language. It enables a component-based approach to creating presentations, adding interactivity, and leveraging all the features of frontend cells.
The goal of this approach is to simplify slide creation, separate content from appearance, and embrace data-driven presentations.
If you know the basics of Markdown, you're already capable of doing a lot:
.slide
# Title
Content
Slides can be separated in two ways:
- Using
---
within the same cell:
.slide
# Slide 1
---
# Slide 2
This method is simple but can become unreadable with larger slides.
- Using separate cells:
.slide
# Slide 1
.slide
# Slide 2
You can then merge them using the .slides
extension:
.slides
This could be the final slide. All previous slides will be added before.
The position of the .slides
cell in the notebook does not affect the presentation order.
To enter fullscreen mode, press the f
key after focusing on the slide content.
Use the projector feature:
to show slides in a separate window.
Layout
This method is not opinionated about how you organize content on a slide. By default, titles marked with #
, ##
, etc., are centered and rendered with standard HTML h1
, h2
, etc. tags. Paragraphs are wrapped in p
tags behind the scenes.
If you need two columns, use HTML and any method you prefer (e.g., flex
):
.slide
# Title
<div style="display: flex">
<div style="width: 50%">
## Subtitle 1
Some content
</div>
<div style="width: 50%">
## Subtitle 2
Some content
</div>
</div>
To use Markdown within HTML, please add line breaks before and after.
The result will look like this:
To mix Markdown with HTML or WLX correctly, remove leading white space from Markdown headers:
.slide
<div>
# It won't work
</div>
Instead, use:
.slide
<div>
# It will work
</div>
Using WLX
You can create helper functions for layout:
.wlx
Columns[Col1_, Col2_] := With[{},
<div style="display: flex">
<div style="width: 50%"><Col1/></div>
<div style="width: 50%"><Col2/></div>
</div>
]
And use them like this:
.slide
# Title
<Columns>
<div>
## Subtitle 1
Some content
</div>
<div>
## Subtitle 2
Some content
</div>
</Columns>
The result will be the same. The extra div
tags help WLX distinguish between the first and second arguments of Columns
, similar to how li
and ul
tags are used to make lists.
See the advanced guide on components: Building components
Full height, text align left
The standard Power Point's slide content alignment can be achieved using
.slide
<!-- .slide: style="height:100vh; text-align:left" -->
# Heading
Content