WoodcoreMake the numbers vibe

Commands › Calculating in the report

#calc-defaults Calculating in the report

Sets how the following lines are printed, where they say nothing themselves.

#calc-defaults(
  : ,
  : , : , : , : ,
  : ,
  : , : ,
  : ,
  : , : , : 
)

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

The essentials

What winsThe line's own argument, then its level:, then these.
At the head of a domainscope: "domain" holds for the whole domain and ends with it.
As a blockpresets: "block": one line a value, label after, citation on the right.

Arguments

ArgumentStatusWhat it does, and examples
The line's arguments
optional
How far the settings reach.
scope: "domain"the rest of the #domain
scope: "document"the whole rest of the document
What is printed
optional
The family of presets the levels apply.
#calc-defaults(presets: "block", scope: "domain")what Woodcore writes at the head of its domains
presets: "inline"the values in the sentence, as usual
optional
What the lines of #var and #verify print.
display: "value-unit"the values without their symbols
display: "variable-value-unit"symbol = value unit, on every line
optional
What the #eq that follow print of their formula.
display-formula: "variable-value-unit"every formula in letters, then in numbers
display-formula: "none"the answers without their formula
optional
What the #eq that follow print of their name and answer.
display-equation: "value-unit"the answers without their symbol
display-equation: "variable-value-unit"name = answer unit
optional
How the lines that follow are emphasised.
style: "bold"every line in bold
style: "normal"puts the style back after a setting
Label and description
optional
Where the labels of the lines that follow go.
label-position: "before"every label before its line
label-position: "after"every label after its line
optional
Where the descriptions of the lines that follow go.
descr-position: "after"in brackets, after every line
descr-position: "none"no description printed
Citation
optional
Where the citations of the lines that follow go.
#calc-defaults(norm-position: "line-right", scope: "document")every citation on the right
norm-position: "footnote"every citation as a footnote
Other
optional
The role of the lines that follow, for #var-table.
role: "result"the lines listed among the results
role: "data"the lines listed among the data
optional
The level of the lines that state none.
level: 3full detail for the lines that follow
level: 1the lines alone, no label
optional
The unit of a dimension, as #unit sets it.
unit: "kN"computed forces in kN
unit: "kN/m²"stresses in kN/m²
Written by name
Each setting is written by name; ..defaults takes them all.

Lines to copy

Minimal call

#calc-defaults()

Complete call

#calc-defaults(scope: "next")

Examples

Example 1
#calc-defaults(norm-position: "line-right", scope: "document")
#var("gamma_M", 1.7, norm: "SIA 265", norm-section: "2.2.5", level: 3)
#var("k_mod", 0.8, norm: "SIA 265", norm-section: "Tabelle 7", level: 3)
The page calc-defaults produces, level 2
Example 2
#domain("P1", label: "Poutre P1")[
  #calc-defaults(level: 3, label-position: "before", scope: "domain")
  #var("b", 140, "mm", label: "Largeur")
  #var("h", 400, "mm", label: "Hauteur", level: 1)
]
The page calc-defaults produces, level 2

Defined in lib/formula.typ:1844