Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cetz-package/cetz
CeTZ: ein Typst Zeichenpaket - A library for drawing stuff with Typst.
https://github.com/cetz-package/cetz
cetz typst typst-canvas
Last synced: 3 months ago
JSON representation
CeTZ: ein Typst Zeichenpaket - A library for drawing stuff with Typst.
- Host: GitHub
- URL: https://github.com/cetz-package/cetz
- Owner: cetz-package
- License: lgpl-3.0
- Created: 2023-04-15T21:19:07.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T17:04:33.000Z (3 months ago)
- Last Synced: 2024-10-29T18:31:00.753Z (3 months ago)
- Topics: cetz, typst, typst-canvas
- Language: Typst
- Homepage: https://cetz-package.github.io
- Size: 53.1 MB
- Stars: 888
- Watchers: 5
- Forks: 36
- Open Issues: 55
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
- awesome-typst - CeTZ - CeTZ (CeTZ, ein Typst Zeichenpacket) is a library for drawing with [Typst](https://typst.app) with an API inspired by TikZ and [Processing](https://processing.org/). It comes with modules for drawing plots, graphs and charts. (Templates & Libraries / Graphics)
README
# CeTZ
CeTZ (CeTZ, ein Typst Zeichenpaket) is a library for drawing with [Typst](https://typst.app) with an API inspired by TikZ and [Processing](https://processing.org/).
## Examples
Karl's Picture
Tree Layout
Waves*Click on the example image to jump to the code.*
## Usage
For information, see the [online manual](https://cetz-package.github.io/docs).
To use this package, simply add the following code to your document:
```
#import "@preview/cetz:0.3.1"#cetz.canvas({
import cetz.draw: *
// Your drawing code goes here
})
```## CeTZ Libraries
- [cetz-plot - Plotting and Charts Library](https://github.com/cetz-package/cetz-plot)
- [cetz-venn - Simple two- or three-set Venn diagrams](https://github.com/cetz-package/cetz-venn)## Installing
To install the CeTZ package under [your local typst package dir](https://github.com/typst/packages?tab=readme-ov-file#local-packages) you can use the `install` script from the repository.
```bash
just install
```The installed version can be imported by prefixing the package name with `@local`.
```typ
#import "@local/cetz:0.3.1"#cetz.canvas({
import cetz.draw: *
// Your drawing code goes here
})
```### Just
This project uses [just](https://github.com/casey/just), a handy command runner.
You can run all commands without having `just` installed, just have a look into the `justfile`.
To install `just` on your system, use your systems package manager. On Windows, [Cargo](https://doc.rust-lang.org/cargo/) (`cargo install just`), [Chocolatey](https://chocolatey.org/) (`choco install just`) and [some other sources](https://just.systems/man/en/chapter_4.html) can be used. You need to run it from a `sh` compatible shell on Windows (e.g git-bash).## Testing
This package comes with some unit tests under the `tests` directory.
To run all tests you can run the `just test` target. You need to have
[`typst-test`](https://github.com/tingerrr/typst-test/) in your `PATH`: `cargo install typst-test --git https://github.com/tingerrr/typst-test`.## Projects using CeTZ
- [cirCeTZ](https://github.com/fenjalien/cirCeTZ) A port of [circuitikz](https://github.com/circuitikz/circuitikz) to Typst.
- [conchord](https://github.com/sitandr/conchord) Package for writing lyrics with chords that generates fretboard diagrams using CeTZ.
- [finite](https://github.com/jneug/typst-finite) Finite is a Typst package for rendering finite automata.
- [fletcher](https://github.com/Jollywatt/typst-fletcher) Package for drawing commutative diagrams and figures with arrows.
- [riesketcher](https://github.com/ThatOneCalculator/riesketcher) Package for drawing Riemann sums.