updated manual

This commit is contained in:
Louis Heredero 2024-11-10 01:40:50 +01:00
parent b8a7adb58f
commit 60898d1e60
Signed by: HEL
GPG Key ID: 8D83DE470F8544E7
3 changed files with 41 additions and 2 deletions

View File

@ -148,3 +148,21 @@ wire.wire("w2", ((0, 0), (1, -.5)),
style: "zigzag", zigzag-ratio: 80%) style: "zigzag", zigzag-ratio: 80%)
wire.intersection("w1.zig") wire.intersection("w1.zig")
```) ```)
#let capacitor = example(```
electrical.capacitor(
x: 0, y: 0, w: 2, h: 1, id: "a",
scales: (100%, 80%), gap: 0.3
)
electrical.capacitor(
x: 4, y: -0.5, w: 1, h: 2, id: "b",
vertical: true, symbols: ([+], none)
)
```, vertical: true)
#let resistor = example(```
electrical.resistor(x: 0, y: 0, w: 2, h: 0.5, id: "a", zigzags: 8)
electrical.resistor(x: 4, y: -0.5, w: 0.5, h: 2, id: "b", vertical: true)
electrical.resistor(x: 6.5, y: 0, w: 2, h: 0.5, id: "c", zigzags: none)
```, vertical: true)

Binary file not shown.

View File

@ -4,6 +4,7 @@
#import "doc/examples.typ" #import "doc/examples.typ"
#import "src/circuit.typ": circuit #import "src/circuit.typ": circuit
#import "src/element.typ" #import "src/element.typ"
#import "src/electrical.typ"
#import "src/gates.typ" #import "src/gates.typ"
#import "src/util.typ" #import "src/util.typ"
#import "src/wire.typ" #import "src/wire.typ"
@ -196,3 +197,23 @@ Simply import #link("src/lib.typ") and call the `circuit` function:
) )
#tidy.show-module(gates-docs, sort-functions: false) #tidy.show-module(gates-docs, sort-functions: false)
#pagebreak()
#let electrical-docs = tidy.parse-module(
read("src/elements/electrical/capacitor.typ") + "\n" +
read("src/elements/electrical/resistor.typ") + "\n",
name: "electrical",
scope: (
element: element,
circuit: circuit,
electrical: electrical,
draw: draw,
wire: wire,
tidy: tidy,
examples: examples,
doc-ref: doc-ref
)
)
#tidy.show-module(electrical-docs, sort-functions: false)