2e6bfab744f6ad033fde40d197ab31442fbd67b0
Introduces a new "s-shape" wire style connecting two ports on opposite cardinal sides (east<->west or north<->south) via 5 segments joined at 4 corners (u1-start, u1-end, u2-start, u2-end). The axis is auto-detected from port anchors; when both endpoints share the same perpendicular coordinate (single-block loopback) `s-ratio-mid` is reinterpreted as an absolute signed offset so the crossbar can still be placed above or below the endpoints. Also adds `u-at` to the "u-shape" style, an anchor-based crossbar placement analogous to `zigzag-at`. `u-depth` now defaults to `auto` to allow clean mutual-exclusion with `u-at`. Factors the shared placement normalizer into `normalize-scalar-offset(at, axis)`; `normalize-zigzag-at` remains as a thin backwards-compatible wrapper.
circuiteria
Circuiteria is a Typst package for drawing block circuit diagrams using the CeTZ package.
Examples
|
|
| A bit of everything | |
|
|
| Wires everywhere | |
|
|
| Groups | Rotated |
Note
These circuit layouts were copied from a digital design course given by prof. S. Zahno and recreated using this package
Click on the example image to jump to the code.
Usage
For more information, see the manual
To use this package, simply import circuiteria and call the circuit function:
#import "@preview/circuiteria:0.2.1"
#circuiteria.circuit({
import circuiteria: *
...
})
Description
Drawing block circuits with Typst made easy, using CeTZ
https://typst.app/universe/package/circuiteria
Readme
Apache-2.0
4.2 MiB
7 Stars
4 Watchers
7 Forks
