circuiteria/src/circuit.typ

14 lines
419 B
Plaintext
Raw Normal View History

2024-05-16 21:35:53 +00:00
#import "@preview/cetz:0.2.2": canvas
2024-05-17 07:36:38 +00:00
#import "@preview/tidy:0.3.0"
2024-05-16 21:35:53 +00:00
2024-05-17 07:36:38 +00:00
/// Draws a block circuit diagram
///
/// This function is also available at the package root
///
2024-05-17 07:36:38 +00:00
/// - body (none, array, element): A code block in which draw functions have been called
/// - length (length, ratio): Optional base unit
/// -> none
2024-05-16 21:35:53 +00:00
#let circuit(body, length: 2em) = {
set text(font: "Source Sans 3")
canvas(length: length, body)
}