Hi everyone 📃,
Tidy is a docs generator for Typst packages.
tidy:0.3.0 is available! If you're not using it, this release might change your mind ;) because now, tidy assists you in creating a help() command for your package. The help command allows users to obtain the documentation of a specific definition or parameter right in the document. This is similar to CLI-style help commands. If you have already written docstrings for your package, it is quite low-effort to add such a command.
The package quill already uses this feature. Try for example typing
#import "@preview/quill:0.3.0"
#quill.help("gate")
Read up in the guide (see below) for instructions on setting up a help() command for your package. Note: this feature is still experimental and awaiting feedback! Also, it would hugely benefit from user-defined types (for custom set and show rules), so that the end-user could customize the output.
https://typst.app/universe/package/tidy
You can read the guide here
https://github.com/Mc-Zen/tidy/releases/download/v0.3.0/tidy-guide.pdf
and import the package via #import "@preview/tidy:0.3.0".
Full Changelog:
- New features:
- Help feature.
preambleoption for examples (e.g., to addimportstatements).- more options for
show-module:omit-private-definitions,omit-private-parameters,enable-cross-references,local-names(for configuring language-specific strings).
- Improvements:
- Allow using
show-example()as standalone. - Updated type names that changed with Typst 0.8.0, e.g., integer -> int.
- Allow using
- Fixes:
- allow examples with ratio widths if
scale-previewis notauto. show-outline- explicitly use
raw(lang: none)for types and function names.
- allow examples with ratio widths if