Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jomaway/typst-gentle-clues
Simple admonishment for typst
https://github.com/jomaway/typst-gentle-clues
Last synced: 3 months ago
JSON representation
Simple admonishment for typst
- Host: GitHub
- URL: https://github.com/jomaway/typst-gentle-clues
- Owner: jomaway
- License: mit
- Created: 2023-08-14T10:24:30.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-26T10:14:31.000Z (3 months ago)
- Last Synced: 2024-03-27T00:40:22.647Z (3 months ago)
- Language: Typst
- Size: 10 MB
- Stars: 16
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Lists
- awesome-typst - typst-gentle-clues - A typst package to simply add admonitions. (Templates & Libraries / Formatting)
README
# gentle-clues
Simple admonitions for typst. Add predefined or define your own.
Inspired from [mdbook-admonish](https://tommilligan.github.io/mdbook-admonish/).
## Usage
Import the package
```typst
#import "@preview/gentle-clues:0.6.0": *
```
Change the default settings.
```typst
#show: gentle-clues.with(
lang: "de", // set header title language (default: "en")
)
```
[See the docs.pdf for all options](https://github.com/jomaway/typst-admonish/blob/main/docs.pdf)### Use predefined clues
```typst
// info clue
#info[ This is the info clue ... ]// or a tip
#tip(title: "Best tip ever")[Check out this cool package]
```Overview of the predefined clues:
![Overview of the predefined clues](gc_overview.svg)
`abstract`, `info`, `question`, `memo`, `task`, `idea`, `tip`, `quote`, `success`, `warning`, `error`, `example`.
### Define your own clue
But it is very easy to define your own.
```typst
//When you import the package, include clue
#import "@preview/gentle-clues:0.5.0": clue//Define it
#let ghost-admon(..args) = clue(
title: "Buuuuh",
_color: gray,
icon: emoji.ghost,
..args
)
// Use it
#ghost-admon[Huuuuuh.]
```The icon can be an `emoji`, `symbol` or `.svg`-file.
## License
[MIT License](LICENSE)
## Changelog
[See CHANGELOG.md](CHANGELOG.md)