WoodcoreMake the numbers vibe

Commands › Calculating in the report

#unit Calculating in the report

Sets the unit computed answers of one dimension are printed in.

#unit(,
  : 
)

Hover an argument: what it does. Hover its value: every possible value. A click keeps the bubble open.

The essentials

One dimension#unit("kN") reaches forces only; other answers keep theirs.
Answers onlyA value written or read from the export keeps its unit.
Stress or loadN/mm² and kN/m² are one dimension: the default serves the stress.

Arguments

ArgumentStatusWhat it does, and examples
The line's arguments
required
The unit. It must have a dimension.
#unit("kN")forces in kN
#unit("kN/m²")area loads rather than stresses
"%"refused: dimensionless
optional
How far it reaches.
scope: "document"the whole rest of the document
scope: "domain"the rest of the #domain it stands in

Defaults: mm, mm², mm³, mm⁴, s, kN, kNm, N/mm², kN/m, kg, °.

Lines to copy

Minimal call

#unit("kN")

Complete call

#unit("kN", scope: "next")

Examples

Example 1
#var("F", 12, "kN")
#var("A", 2400, "mm²")
#unit("N/mm²")
#eq("sigma", `F / A`)
The page unit produces, level 2
Example 2
#var("M", 4.2, "kNm")
#var("l", 3, "m")
#unit("N", scope: "document")
#eq("V", `M / l`)
#eq("V_2", `2 * M / l`)
The page unit produces, level 2

Defined in lib/formula.typ:1807