lini 0.22.0

Pretty diagrams, charts, and technical drawings from plain text, with fine-grained control. Compiles to clean, themeable SVG.
Documentation
// The sheeted screw [SPEC 24]: an ISO 5457 |page| — frame, zone references,
// centring marks — hosting a DIN 912 socket cap screw. The side view is a
// revolved profile with a thread: dressing and a |hidden| hex socket; the
// end view is ordinary concentric geometry; the |title-block| seats itself
// flush inside the frame's bottom-right corner — its ISO 7200 field properties
// build the grid, absent fields collapsing.

|page| { sheet: a4 landscape; gap: 50; align: origin; } [
  // the ISO sheet: frame, zones, marks — views share their axes datum-to-datum

  |drawing#side| "DIN 912 — M8 × 40" { scale: 2; } [
    |sketch#screw| {
      draw: move(0, 0) up(6.5) chamfer(0.8) right(8):head down(2.5):k right(12)
            point():v right(28):m8 chamfer(1) down(4);
      revolve: x-axis;
      // a turned part
      thread: m8 1.25;
      // the threaded run
    } [
      |hidden#socket| {
        // the hex socket, dashed
        draw: move(0, 3) right(4) line(3, -3);
        mirror: x-axis;
      }
    ]
    screw:head (o) { side: left; }
    // → ⌀13
    screw:left (-) screw:k { side: bottom; }
    // → 8 — K, the head
    screw:k (-) screw:right { side: bottom; }
    // → 40 — L, under the head
    screw:v (-) screw:right { side: top; }
    // → 28 — the thread length
    screw:m8 <- { side: top; }
    // → M8×1.25 — composed by the thread
  ]

  |drawing#end| { scale: 2; } [
    |oval#od| { width: 13; height: 13; }
    |oval| { width: 11.4; height: 11.4; }
    // the head, end-on
    |hex#socket| { width: 7; height: 6; }

    // the socket, visible here
    socket:left (-) socket:right

  ]

  |title-block| {
    title: "Socket cap screw"; drawing-number: "DIN 912 — M8 × 40"; revision: "A"; sheet-number: "1/1"; date: "2026-07-08"; author: "AM";
  }
]