Skip to main content

fastslides

Render a Markdown file, a Jupyter notebook or a Solveit dialog as HTML slides, and print them to PDF.

pip install fastslides
fastslides talk.md              # opens the slides in a browser
fastslides talk.ipynb --export  # writes talk.html and talk.pdf next to it

The HTML is one self-contained file: local images inlined, arrow keys, Space and PageUp/PageDown move between slides, and the slide number is in the URL, so a reload keeps your place. --export also prints the page to a 16:9 PDF with a headless Chrome, which must be installed.

Writing slides

A slide deck is an ordinary document. A line containing only --- starts a new slide; headings never do. In a notebook or dialog, a note cell containing only --- breaks between cells. When any cell is exported (nbdev's #| export, or the Solveit export flag), only exported cells are rendered, so a working dialog can hold drafts and prompts beside the deck; --no-exported renders every cell. Code cells render as highlighted code with their stored outputs beneath.

Two columns: wrap the blocks in a fenced div.

::: {.cols}
![](logo.png)

- first point
- second point
:::

::: {.cols .narrow} makes the left column a quarter of the width. An image on its own line shrinks to the space left on the slide. A slide that still does not fit scrolls, which is the cue to cut it.

fastslides --help lists the options, which are viewmd's: --refs, --hl, --head my.css for your own styling, --math.

How it works

mdhtml parses the Markdown (and aidialog turns notebooks into Markdown first). mdhtml2slides cuts the parsed tree at top-level hr elements and renders each group with mdhtml2html, so every Markdown feature mdhtml supports works on a slide. The page is viewmd's, plus about forty lines of CSS and JS.

Metadata

Release files for fastslides 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastslides 0.0.1
File Size Uploaded
fastslides-0.0.1.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastslides 0.0.1
File Interpreter ABI Platform
fastslides-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / fastslides-0.0.1.tar.gz

Download URL fastslides-0.0.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
336bec6716aaa3185f8b25e297ea1bd0a4b8213bacd30f1234a489c608632ffa
BLAKE2b-256 checksum
How to use checksums
1e8b5141477342670ba5aac8c23379fae1e171eaffd02b4422f75fa680328446
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / fastslides-0.0.1-py3-none-any.whl

Download URL fastslides-0.0.1-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35b315c33a15b4a9c97bee72350364559791e2a246d89f253de534c0ccd0677b
BLAKE2b-256 checksum
How to use checksums
8376b3a215a7367ceb325d79a341456c0fd370f3b8ba6462465720ab9e819ed0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

0.0.2

2 release files

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page