Skip to content

OrangeX4/typst-cheq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cheq

Write markdown-like checklist easily.

Usage

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

Example

Custom Styles

#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

Example

checklist function

#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 to auto, it will use the unchecked-sym() function in the cheq package.
  • checked: [string] — The marker to represent checked item. If set to auto, it will use the checked-sym() function in the cheq package.
  • body: [content] — The main body from #show: checklist rule.

unchecked-sym function

#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.

checked-sym function

#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.

License

This project is licensed under the MIT License.

About

Write markdown-like checklist easily.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages