Write markdown-like checklist easily.
Checklists are incredibly useful for keeping track of important items. We can use the cheq package to achieve checklist syntax similar to GitHub Flavored Markdown.
#import "@preview/cheq:0.1.0": checklist
#show: checklist
= Solar System Exploration, 1950s – 1960s
- [ ] Mercury
- [x] Venus
- [x] Earth (Orbit/Moon)
- [x] Mars
- [ ] Jupiter
- [ ] Saturn
- [ ] Uranus
- [ ] Neptune
- [ ] Comet Haley
#import "@preview/cheq:0.1.0": checklist
#show: checklist.with(fill: luma(95%), stroke: blue, radius: .2em)
= Solar System Exploration, 1950s – 1960s
- [ ] Mercury
- [x] Venus
- [x] Earth (Orbit/Moon)
- [x] Mars
- [ ] Jupiter
- [ ] Saturn
- [ ] Uranus
- [ ] Neptune
- [ ] Comet Haley
#show: checklist.with(unchecked: sym.ballot, checked: sym.ballot.x)
= Solar System Exploration, 1950s – 1960s
- [ ] Mercury
- [x] Venus
- [x] Earth (Orbit/Moon)
- [x] Mars
- [ ] Jupiter
- [ ] Saturn
- [ ] Uranus
- [ ] Neptune
- [ ] Comet Haley
#let checklist(
fill: white,
stroke: rgb("#616161"),
radius: .1em,
default: ([•], [‣], [–]),
unchecked: auto,
checked: auto,
body,
) = { .. }
Arguments:
fill
: [string
] — The fill color for the checklist marker.stroke
: [string
] — The stroke color for the checklist marker.radius
: [string
] — The radius of the checklist marker.default
: [tuple
] — The default markers for Bullet List, default to be([•], [‣], [–])
.unchecked
: [string
] — The marker to represent unchecked item. If set toauto
, it will use theunchecked-sym()
function in the cheq package.checked
: [string
] — The marker to represent checked item. If set toauto
, it will use thechecked-sym()
function in the cheq package.body
: [content
] — The main body from#show: checklist
rule.
#let unchecked-sym(fill: white, stroke: rgb("#616161"), radius: .1em) = { .. }
Arguments:
fill
: [string
] — The fill color for the unchecked symbol.stroke
: [string
] — The stroke color for the unchecked symbol.radius
: [string
] — The radius of the unchecked symbol.
#let checked-sym(fill: white, stroke: rgb("#616161"), radius: .1em) = { .. }
Arguments:
fill
: [string
] — The fill color for the checked symbol.stroke
: [string
] — The stroke color for the checked symbol.radius
: [string
] — The radius of the checked symbol.
This project is licensed under the MIT License.