Skip to content

A structure, navigation, and transition engine for Typst presentations.

License

Notifications You must be signed in to change notification settings

eusebe/typst-navigator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Navigator

Navigator is a navigation engine for Typst. It provides a modular suite of tools to generate dynamic tables of contents (progressive outlines), progress bars (miniframes), and automated transition slides. It should be compatible with any presentation framework (e.g., Polylux, Presentate, Typslides). All tools can also be used for any native Typst documents (particularly the progressive-outline function), but they are especially useful when used within a structured presentation.

Key Features

  • Progressive Outline: A roadmap component that adapts to the current position in the document, with smart state management (active, completed, future).
  • Flexible Miniframes: Configurable progress markers (compact vs. grid modes, alignment, vertical positioning).
  • Transition Engine: Automatically generates "roadmap" slides during section changes via simple show rules.

Installation

Import the package from the Typst Universe:

#import "@preview/navigator:0.1.1": *

Core Components

Progressive Outline (progressive-outline)

The progressive-outline function inserts a table of contents that reflects the document's progression. See detailed documentation (⇒ pdf).

#progressive-outline(
  level-1-mode: "all",
  level-2-mode: "current-parent",
  text-styles: (
    level-1: (active: (weight: "bold", fill: navy), inactive: 0.5),
  ),
  spacing: (v-between-1-2: 1em)
)

Navigation Bars (render-miniframes)

Generates a bar of dots (miniframes) representing the logical structure of a presentation. See detailed documentation (⇒ pdf).

#render-miniframes(
  structure,            // Extracted via get-structure()
  current-slide-num,    // Current active slide index
  style: "compact",
  navigation-pos: "top",
  active-color: blue
)

Transition Engine (render-transition)

Automates the creation of roadmap slides using a show rule on structural headings. See detailed documentation (⇒ pdf).

#show heading.where(level: 1): h => render-transition(
  h,
  mapping: (section: 1, subsection: 2),
  slide-func: my-slide-wrapper, // A function (fill, body) => content
  transitions: (background: navy)
)

Demos

Integration examples using different slide engines are available in the examples/ directory:

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgement

Thanks to the presentate package author for his constructive feedback and valuable insights during the development of these tools.

Changelog

0.1.1

  • Added top-padding option to render-transition for better control of roadmap vertical positioning.

0.1.0

  • First release.

About

A structure, navigation, and transition engine for Typst presentations.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages