WoodcoreMake the numbers vibe

Commands › Writing templates

#fmt-value Writing templates

Formats a var object's value with its unit: «26.916 kNm».

#fmt-value()

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

The essentials

A template's building blockWhat Woodcore's own commands use; a report seldom needs it.
The document's decimalsThe number of decimals follows number-digits, as everywhere in the report.
Without a unitA dimensionless value prints as a bare number.

Arguments

ArgumentStatusWhat it does, and examples
The line's arguments
required
A var object: its value and unit.
#fmt-value((value: 26.916, unit: "kNm"))26.916 kNm
#fmt-value((value: 0.8, unit: ""))0.8, without a unit

Lines to copy

Minimal call

#fmt-value((value: 1.115292, unit: "kN/m²", symbol: "q_k", label: "Charakteristische Schneelast"))

Examples

Example 1
#fmt-value((value: 26.916, unit: "kNm"))
The page fmt-value produces, level 2
Example 2
#fmt-value((value: 0.8, unit: ""))
The page fmt-value produces, level 2

Defined in lib/calc-engine-core.typ:654