d

dashy-todo

@preview

A method to display TODOs at the side of the page.

v0.1.3
MIT-0

Package Information

Last Updated
Authors
Otto-AA
Categories
utility

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/dashy-todo:0.1.3

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/dashy-todo:0.1.3": *

Version History

0.1.3
757354877ed2...
0.1.2
60d6c544b714...
0.1.1
a460a123d27b...
0.1.0
6b29d23f177f...
0.0.3
28dd7e8c75ea...
0.0.2
81343300751e...
0.0.1
d09ed85e64bb...

Dashy TODO

Create simple TODO comments, which are displayed at the sides of the page.

I suggest to also take a look at the drafting package, which is a more feature-complete annotation library, but also suitable for simple TODO comments.

Screenshot

Usage

The package provides a todo(message, position: auto | left | right) method. Call it anywhere you need a todo message.

#import "@preview/dashy-todo:0.1.3": todo

// It automatically goes to the closer side (left or right)
A todo on the left #todo[On the left].

// You can specify a position if you want to (auto, left, right or "inline")
#todo(position: right)[Also right]

// You can add arbitrary content
#todo[We need to fix the $lim_(x -> oo)$ equation. See #link("https://example.com")[example.com]]

// And you can create an outline for the TODOs
#outline(title: "TODOs", target: figure.where(kind: "todo"))

Styling

You can change the border color with any stroke type:

#todo(stroke: blue)[This is in blue!]

#let blue-todo = todo.with(stroke: blue)
#blue-todo[This is also in blue!]

You can modify the text by wrapping it, e.g.:

#let small-todo = (..args) => text(size: 0.6em)[#todo(..args)]

#small-todo[This will be in fine print]

Contributing

See https://github.com/Otto-AA/dashy-todo/blob/main/CONTRIBUTING.md.