WoodcoreMake the numbers vibe

Commands › Calculating in the report

#var-table Calculating in the report

Prints a table of the variables of one role — data, computed values or results — read from the report, never copied.

#var-table(
  : , : , : ,
  : 
)

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

The essentials

Always currentIt reads the values wherever they are declared, even below.
A summarydomain: "all" and unit: give the summary of loads or results.
A table of the documentIt is set as the other tables: #show table and #set table reach it.

Arguments

ArgumentStatusWhat it does, and examples
The line's arguments
optional
The role of the lines listed.
role: "data"the input data
role: "result"the results, #verify included
optional
The domains whose variables are listed.
domain: "all"the whole document
domain: ("p1", "p2")two domains
optional
Only the variables in that unit, or in one of them.
unit: "kN/m²"the area loads
unit: ("kN/m", "kN")several units
What is printed
optional
The columns, in their order.
columns: ("label", "symbol", "value")without citation
columns: ("symbol", "value", "unit")the unit in a column of its own

Lines to copy

Minimal call

#var-table()

Complete call

#var-table(role: auto, domain: auto, unit: none, columns: ("label", "symbol", "value", "norm"))

Examples

Example 1
#domain("p1", label: "Poutre P1")[
  #var-table(role: "data", columns: ("label", "symbol", "value"))
  #var("b", 140, "mm", label: "Largeur", level: 0)
  #var("h", 400, "mm", label: "Hauteur", level: 0)
  #eq("A", `b * h`, level: 0)
]
The page var-table produces, level 2
Example 2
#var("g_k", 1.2, "kN/m²", label: "Eigengewicht", level: 0)
#var("q_k", 3, "kN/m²", label: "Nutzlast", level: 0)
#var("s_k", 1.4, "kN/m²", label: "Schnee", level: 0)
#var-table(role: "data", domain: "all", unit: "kN/m²")
The page var-table produces, level 2

Defined in lib/formula.typ:2062