a

aa-draw

@preview

Convert ASCII art diagrams into SVG powered by aasvg-rs

v0.1.0
MIT
1 downloads

Package Information

Last Updated
Minimum Typst Version
0.14.0
Categories
utility

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/aa-draw:0.1.0

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/aa-draw:0.1.0": *

Version History

0.1.00.14.0
83026ecb320f...

typst-aasvg

A Typst package for converting ASCII art diagrams into SVG, powered by aasvg-rs.

Usage

aasvg(str, ...)

Parameters:

  • str (string, required) — The ASCII art diagram as a string
  • backdrop (boolean, default: false) — Enable backdrop
  • disable-text (boolean, default: false) — Disable text rendering
  • spaces (integer, default: 2) — Number of spaces for tab replacement
  • stretch (boolean, default: false) — Stretch to fit
  • ..args — Additional arguments passed to image()
#import "@preview/aa-draw:0.1.0": aasvg

#aasvg("A --> B")

Example

See example.typ and example.pdf.

Build

cargo build --release --target wasm32-unknown-unknown

The WASM artifact will be output to target/wasm32-unknown-unknown/release/typst_aasvg.wasm.

License

MIT