ntjess / typst-drafting

Some common drafting utilities for the `typst` document typesetter
The Unlicense
52 stars 2 forks source link

Feature Request: hide notes #1

Closed joeldierkes closed 10 months ago

joeldierkes commented 10 months ago

Hey, I really like the package and the looks of the notes. :+1: It would be nice to have a way of suppressing/hiding the notes (something like latex todonotes ^1 disable feature). The overall idea would be to have a drafting and preview mode, where the drafting would show the notes and the preview would simply omit them. This would make it easier to create intermediate versions of a document for distribution without personal opinions and with the final formatting of the document.

I am thinking of something like

#hide_notes()

at the beginning of the document. This should also work for included files.

Note that the page parameters must somehow be updated too (to remove the margin).

Hope this is the right place and that I'm not imposing.

ntjess commented 10 months ago

With the most recent updates, you can make the requested function like so:

#let hide_notes() = {
  set-margin-note-defaults(hidden: true)
}

@joeldierkes Thanks for the feature idea!