d83c1e9 ←7b56569antonApr 18, 2026 api

create figures.typ via macOS

A /docs/undefined +51 -0
A /docs/undefined +51 -0
1= Figures
2
3Typst figures support captions, numbering, and cross-references.
4
5== Basic figure
6
7#figure(
8 table(
9 columns: 2,
10 [*Metric*], [*Value*],
11 [Latency], [12ms],
12 [Throughput], [1.2M req/s],
13 [Uptime], [99.97%],
14 ),
15 caption: [System performance metrics],
16)
17
18== Figure with custom placement
19
20#figure(
21 rect(width: 200pt, height: 80pt, fill: luma(240), stroke: luma(180))[
22 #align(center + horizon)[placeholder for image]
23 ],
24 caption: [Architecture diagram],
25 placement: auto,
26) <arch>
27
28As shown in @arch, the system uses a layered architecture.
29
30== Numbered figures
31
32Figures are numbered automatically. Use labels to cross-reference them.
33
34#figure(
35 ```python
36 def hello():
37 print("Hello, world!")
38 ```,
39 caption: [A simple Python function],
40) <code-fig>
41
42See @code-fig for the implementation.
43
44== Equations as figures
45
46#figure(
47 $ nabla times bold(E) = -frac(diff bold(B), diff t) $,
48 caption: [Faraday's law of induction],
49) <faraday>
50
51@faraday is one of Maxwell's equations.