Skip to content
/ hydra Public

A typst package for displaying the active section in the page header or footer.

License

Notifications You must be signed in to change notification settings

tingerrr/hydra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f1090d0 · Mar 31, 2025

History

81 Commits
Feb 23, 2025
Mar 31, 2025
Feb 18, 2025
Mar 30, 2025
Mar 30, 2025
Feb 18, 2025
Feb 18, 2025
Mar 31, 2025
Feb 18, 2025
Feb 18, 2025
Feb 18, 2025
Mar 31, 2025
Mar 31, 2025

Repository files navigation

hydra

Hydra is a Typst package allowing you to easily display the heading like elements anywhere in your document. It's primary focus is to provide the reader with a reminder of where they currently are in your document only when it is needed.

Example

#import "@preview/hydra:0.6.1": hydra

#set page(paper: "a7", margin: (y: 4em), numbering: "1", header: context {
  if calc.odd(here().page()) {
    align(right, emph(hydra(1)))
  } else {
    align(left, emph(hydra(2)))
  }
  line(length: 100%)
})
#set heading(numbering: "1.1")
#show heading.where(level: 1): it => pagebreak(weak: true) + it

= Introduction
#lorem(50)

= Content
== First Section
#lorem(50)
== Second Section
#lorem(100)

thumbnail

Documentation

For a more in-depth description of hydra's functionality and the reference read its manual.

Contribution

For contributing, please take a look CONTRIBUTING.

Etymology

The package name hydra /ˈhaɪdrə/ is a word play on headings and headers, inspired by the monster in greek and roman mythology resembling a serpent with many heads.