Skip to content

Instantly share code, notes, and snippets.

@floffy-f
Created August 28, 2025 18:02
Show Gist options
  • Select an option

  • Save floffy-f/ea00a6462f5cfb6b66d19621a662c9db to your computer and use it in GitHub Desktop.

Select an option

Save floffy-f/ea00a6462f5cfb6b66d19621a662c9db to your computer and use it in GitHub Desktop.
Makes a block that should be put at the top-right of a slide in typst
// Makes a block that should be put at the top-right of a slide in typst.
// Adjust the dy and dx to fit the line length you use, this is set for my default 30pt fontsize.
// Input multiple content blocks to put them side by side.
#let notations = (..contents) => place(top+right, dy: -1.5em, dx: 1.5em, block(inset: 0%, outset: 5pt, fill: red.transparentize(60%), width: 20%*(contents.pos()).len(), height: auto, radius: (bottom-left: 20%))[
#set align(top+left)
#set text(0.65em)
#set text(0.6em)
#emoji.gear *Notations:*
#stack(dir: ltr, spacing: 1em, ..contents)
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment