mirror of
https://github.com/wassname/draw_diag.git
synced 2026-08-15 12:25:09 +08:00
71 lines
1.6 KiB
Typst
71 lines
1.6 KiB
Typst
// Diagram Name: [Your Diagram Title]
|
|
//
|
|
// Source: /path/to/source/file.py:LINE_START-LINE_END
|
|
// Created: YYYY-MM-DD
|
|
//
|
|
// Concept:
|
|
// Brief explanation of what this diagram visualizes. Describe the key
|
|
// mathematical or computational concept being illustrated.
|
|
//
|
|
// Key Equations:
|
|
// L = f(x, y) where...
|
|
//
|
|
// Visualization Style:
|
|
// - Geometric (vectors in subspace)
|
|
// - Flowchart (computational steps)
|
|
// - Annotated (functions with labels)
|
|
//
|
|
// References:
|
|
// - Paper: [Title] (arxiv.org/abs/...)
|
|
// - Documentation: https://...
|
|
// - Related diagrams: diagrams/other/file.typ
|
|
//
|
|
// Notes:
|
|
// - Any implementation-specific details
|
|
// - Color coding explanations
|
|
// - Known limitations or simplifications
|
|
|
|
#import "@preview/cetz:0.4.2"
|
|
|
|
#set page(width: auto, height: auto, margin: 1.5cm)
|
|
|
|
// Optional: Make math equations more readable
|
|
#show math.equation: block.with(fill: white, inset: 2pt)
|
|
|
|
#align(center)[
|
|
#text(size: 16pt, weight: "bold")[Your Diagram Title]
|
|
]
|
|
#align(center)[
|
|
#text(size: 11pt)[Subtitle or brief description]
|
|
]
|
|
|
|
#v(0.5cm)
|
|
|
|
#cetz.canvas(length: 1.2cm, {
|
|
import cetz.draw: *
|
|
|
|
// Centralized styling
|
|
set-style(
|
|
stroke: (thickness: 1.2pt),
|
|
mark: (fill: black, scale: 1.5),
|
|
content: (padding: 2pt)
|
|
)
|
|
|
|
// Your diagram code here
|
|
// Example:
|
|
circle((0, 0), radius: 2, stroke: (paint: blue, thickness: 2pt))
|
|
content((0, 0), [Your content])
|
|
})
|
|
|
|
// Optional: Add formula or explanation below
|
|
#v(0.5cm)
|
|
#align(center)[
|
|
#box(fill: rgb("#F5F5F5"), inset: 10pt, radius: 5pt)[
|
|
#text(size: 11pt)[
|
|
Mathematical formulation or key insights
|
|
|
|
$ cal(L) = sum_i f(x_i) $
|
|
]
|
|
]
|
|
]
|