Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Enter-tainer/wavy

Run wavedrom in typst
https://github.com/Enter-tainer/wavy

Last synced: about 8 hours ago
JSON representation

Run wavedrom in typst

Awesome Lists containing this project

README

        

# [Wavy](https://github.com/Enter-tainer/wavy)

Draw digital timing diagram in Typst using [Wavedrom](https://wavedrom.com/).

![](wavy.svg)

````typ
#import "@preview/wavy:0.1.1"

#set page(height: auto, width: auto, fill: black, margin: 2em)
#set text(fill: white)

#show raw.where(lang: "wavy"): it => wavy.render(it.text)

= Wavy

Typst, now with waves.

```wavy
{
signal:
[
{name:'clk',wave:'p......'},
{name:'bus',wave:'x.34.5x',data:'head body tail'},
{name:'wire',wave:'0.1..0.'}
]
}
```

```js
{
signal:
[
{name:'clk',wave:'p......'},
{name:'bus',wave:'x.34.5x',data:'head body tail'},
{name:'wire',wave:'0.1..0.'}
]
}
```

````

## Documentation

### `render`

Render a wavedrom json5 string to an image

#### Arguments

* `src`: `str` - wavedrom json5 string
* All other arguments are passed to `image.decode` so you can customize the image size

#### Returns

The image, of type `content`