circuiteria/manual.typ

58 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-05-17 07:36:38 +00:00
#import "@preview/tidy:0.3.0"
2024-05-17 12:19:27 +00:00
#import "@preview/cetz:0.2.2": draw, canvas
2024-05-17 07:36:38 +00:00
#import "src/circuit.typ": circuit
2024-05-17 12:19:27 +00:00
#import "src/element.typ"
2024-05-17 07:36:38 +00:00
#import "src/util.typ"
#import "src/wire.typ"
#let circuit-docs = tidy.parse-module(
read("src/circuit.typ"),
name: "circuit",
require-all-parameters: true
)
2024-05-17 12:19:27 +00:00
#tidy.show-module(circuit-docs, style: tidy.styles.minimal)
#pagebreak()
2024-05-17 07:36:38 +00:00
#let util-docs = tidy.parse-module(
read("src/util.typ"),
name: "util",
require-all-parameters: true,
2024-05-17 12:19:27 +00:00
scope: (
util: util,
canvas: canvas,
draw: draw
)
2024-05-17 07:36:38 +00:00
)
#tidy.show-module(util-docs)
2024-05-17 12:19:27 +00:00
#pagebreak()
2024-05-17 07:36:38 +00:00
#let wire-docs = tidy.parse-module(
read("src/wire.typ"),
name: "wire",
require-all-parameters: true,
scope: (wire: wire, circuit: circuit, draw: draw)
)
2024-05-17 12:19:27 +00:00
#tidy.show-module(wire-docs)
#pagebreak()
#let element-docs = tidy.parse-module(
read("src/elements/element.typ") + "\n" +
read("src/elements/alu.typ") + "\n" +
read("src/elements/block.typ") + "\n" +
read("src/elements/extender.typ") + "\n" +
read("src/elements/multiplexer.typ"),
name: "element",
require-all-parameters: false,
scope: (
element: element,
circuit: circuit,
draw: draw,
wire: wire,
tidy: tidy
)
)
#tidy.show-module(element-docs, sort-functions: false)