Changelog¶
All notable changes to this project will be documented in this file. The format follows Keep a Changelog. This project adheres to Semantic Versioning.
[Unreleased]¶
Added¶
Touchscreen gestures: Sweeping change slides and pinching applies zoom.
Small screen friendly toolbar and sidebar: Toolbar buttons now collapse in rows when it does not fit the screen space, and sidebar hides it top title.
Printing / PDF export: The deck now prints (Ctrl+P / Save as PDF) with one slide per page and no sidebar or toolbar.
[0.5.0] - 2026-06-22¶
Added¶
Font scaling.
Deck(fontsize_scale=…)scales every font in the presentation — slide content and navigation chrome alike — by one factor, leaving spacing/layout untouched. Per-cellslide.add_*(…, fontscale=…)(andCellDefaults(fontscale=…)) scales a single cell’s text and composes on top of the deck factor.Interactive tables —
slide.add_tabulator()(newPlugins.Tabulator()), backed by the bundled Tabulator library (MIT). Sort, filter, paginate, group, edit inline, and download (CSV/JSON). Takes the same inputs asadd_table— and both now also accept a path to a CSV/TSV file. Per-column formatters/editors/calcs go throughcolumns=[...]; the full Tabulator option set is reachable viaoptions={...}. Two stock themes are vendored (light + dark); styling follows the deck theme automatically (Plugins.Tabulator(theme="auto"|"light"|"dark")). Works offline / underSecurity(block_external=True).Bundled (offline) plugins. Each plugin can load from a CDN (
source="cdn", default) or be embedded in the report (source="bundled") so it works with no network at all. Flip the whole deck withDeck(plugin_source="bundled"). The embedded libraries are vendored undermontin/static/vendor/<library>/— each alongside itsLICENSE(Plotly/Mermaid MIT, highlight.js BSD-3-Clause, MathJax Apache-2.0) — and refreshed by the dev scriptscripts/update_vendor.py(which fetches code + licenses, with a--checkmode and an update log).Per-plugin classes via the
Pluginscontainer —Plugins.Plotly(),Plugins.Mermaid(theme=...),Plugins.Highlight(style=...),Plugins.MathJax(output=...)— each with its own typed options, plusversion=/url=/set_cdn()to pin a version or point at a custom mirror.Security(...)hardening, passed asDeck(security=...). Light hardening is on by default (no-referrer,Permissions-Policy, and Subresource-Integrity on CDN libraries).block_external=Trueis a hard offline guarantee: it forces all plugins to bundle, emits a strict Content-Security-Policy, and raisesSecurityErrorif the rendered report still references any external resource. New docs: Plugins and Security & offline use.notebook_unique=Trueonadd_slide/add_title/add_section/add_tocand every celladd_*: re-running the same Jupyter cell replaces the items it created instead of duplicating them — no manual id needed. Keys off the Jupyter cell id; warns (and falls back) in a script, errors in an interactive session that can’t supply one.Deck(preview_height=...)to set the notebook_repr_html_iframe height, propagated to slide and cell previews.WebP support for images and figures:
to_webp=True/webp_quality=onadd_image,add_matplotlib,add_image_slider(requires the new optionalpillowdependency:pip install 'montin[image]').Contents folder:
Deck(contents_folder=...)plussave_source=Trueon the mediaadd_*(incl.add_plotly, which exports a standalone HTML). Saves assets to_<report>_contents/(created lazily). When the deck is self-contained the asset is still embedded and saved; otherwise the cell references the saved file.add_imageandadd_image_slidernow accept matplotlibFigureobjects (routed through the matplotlib pipeline).
Changed¶
Optional-dependency extras now cover only what Montin itself imports.
[full]ismarkdown-it-py+pillow; the standalone[plotly]and[pandas]extras were removed. You buildFigure/DataFrameobjects yourself, so those libraries are already present when you calladd_plotly/add_table/add_matplotlib— they’re now pulled only by[dev]for the test suite.add_matplotlibnow defaults tofmt="svg"(was"png") — crisp, vector, infinitely zoomable. Usefmt="webp"/to_webp=Truefor dense plots where SVG gets large.Plotly charts now read the active theme’s CSS variables for text/grid colours, fixing invisible chart text on light themes.
Arrow-key / prev-next navigation now steps into a collapsed section (auto- expanding it) instead of skipping over it; search-filtered slides are still skipped.
Fixed¶
add_*cell methods now expose their real signatures to type checkers and editors (Pylance/pyright) instead of collapsing to(...) -> Cell. The@cell_methoddecorator is now signature-preserving (ParamSpec/TypeVar), so parameters and concrete return types show up in autocomplete and hovers.Title and section cover slides are now centered in fixed-size (
size=) mode. The centering had relied on the.slidebeing the flex container, but in fixed-size mode that role moved to.stage, so covers rendered top-left; the cover now centers itself viamargin:auto, working in both modes.
[0.4.0] - 2026-06-17¶
Changed (breaking)¶
Renamed the main class
HTMLSlides→Deck(no alias; updatefrom montin import HTMLSlidestofrom montin import Deck). The internal modulemontin.core.slidesmoved tomontin.core.deck.Replaced the flat
Plugin(name, source)with thePlugins.*classes. UpdatePlugin("plotly", "cdn")toPlugins.Plotly(source="cdn")(or justPlugins.Plotly()— the default source is now"cdn").Pluginremains as the shared base type. AddedDeck(plugin_source=...)to set the default for all plugins at once.Repositioned the library toward self-contained, interactive HTML reports for batch-generated data/ML output (was framed as “HTML slideshows”).
Fixed
__version__resolution, which previously looked up the wrong distribution name and always fell back to0.0.0.dev.
Added¶
_repr_html_onDeck,Slide, andCellfor inline previews in Jupyter notebooks: return a deck, slide, or cell as a cell’s last expression to render it in a sandboxed iframe (slide/cell previews are chrome-free and reuse the deck’s theme and plugins).Sidebar fold toolbar: Collapse all / Expand all / Collapse level / Expand level buttons (shown when
sidebar_collapsible_sectionsis on). The level buttons fold/unfold one nesting layer per click.Sidebar search regex toggle (literal matching by default; click
.*to switch to regex), with a hover tooltip of common regex patterns while in regex mode. The chosen mode is remembered across reloads.
Changed¶
Sidebar arrow-key / prev-next navigation now steps only over visible items, skipping slides hidden by an active search filter or a collapsed section.
Slightly enlarged the section fold caret for legibility.
[0.3.0] - 2026-06-15¶
Added¶
title_id,section_id, andtoc_idparameters onadd_title,add_section, andadd_toc, mirroringslide_id— re-running a notebook cell replaces the slide in place instead of appending a duplicate. Overwriting a section also updates its table-of-contents entry in place rather than duplicating it.Fixed-size “stage” mode: pass
size=(width, height)toDeckto render slides at fixed pixel dimensions, scaled with a CSS transform to fit the window — fonts, images, and layout scale together like a static PDF. Options:scale_up(allow growing past 1:1) andkeep_aspect_ratio(uniform letterbox vs. stretch-to-fill). Modal and lightbox stay unscaled.show_sidebarandshow_toolbaroptions onDeck(both defaultTrue). Disable them for clean single-slide / embeddable files — e.g. the slides shown inline in the documentation.sidebar_collapsedoption onDeck(defaultFalse) to start with the sidebar collapsed while keeping it toggleable. A remembered toggle state takes precedence over this default.Sidebar navigation aids: a regex search box that live-filters slides (
sidebar_search, defaultTrue;sidebar_search_scopeof"title"/"title_subtitle"/"content") and collapsible sections with a fold caret on section items (sidebar_collapsible_sections, defaultTrue). Collapsed state is remembered across reloads; an active search overrides it.
Fixed¶
Overwriting a slide or cell by id now truly replaces it in place (keeping its position in the deck / grid), as the documentation already described; previously the replacement was moved to the end.
The sidebar slide list now shows a vertical scrollbar when it overflows instead of clipping items.
[0.2.0] - 2026-06-14¶
Added¶
slide_idandcell_idarguments to avoid duplicating slides and cells while re-running code-cells on interactive Jupyter notebooks.auto_saveandauto_save_leveloptions to help creating presentations on interactive Jupyter notebooks, without having to call.write()manually.get_slideto retrieve an slide.All cells now have a
__repr__method to help identifying them.Refactored the title and TOC features