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.
scopeoptional · default "next"How far the settings reach.
scopeoptional · default "next""next"the next line only"domain"the rest of the domain"document"the rest of the documentHover a value: its call and what it prints.
#domain("a", label: "A")[
#calc-defaults(display: "value-unit", scope: "next")
#var("b", 140, "mm")
#var("h", 400, "mm")
]
#var("t", 27, "mm")What it prints
#domain("a", label: "A")[
#calc-defaults(display: "value-unit", scope: "domain")
#var("b", 140, "mm")
#var("h", 400, "mm")
]
#var("t", 27, "mm")What it prints
#domain("a", label: "A")[
#calc-defaults(display: "value-unit", scope: "document")
#var("b", 140, "mm")
#var("h", 400, "mm")
]
#var("t", 27, "mm")What it prints
Compiled once by Woodcore's engine, on the examples' frozen data.
presetsoptional · default "inline"The family of presets the levels apply.
presetsoptional · default "inline""inline"the values in the sentence"block"one line a value, label after, citation on the rightHover a value: its call and what it prints.
#calc-defaults(presets: "inline")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(presets: "block")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Compiled once by Woodcore's engine, on the examples' frozen data.
displayoptional · default autoWhat the lines of
#var and #verify print.displayoptional · default autoautosets nothing: each line follows its level"none"nothing is printed"variable"the symbol alone"value"the number alone"value-unit"the number and its unit"variable-value-unit"symbol = number unitHover a value: its call and what it prints.
#calc-defaults(display: auto, scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as "variable-value-unit".
#calc-defaults(display: "none", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Nothing is printed.
#calc-defaults(display: "variable", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(display: "value", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(display: "value-unit", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(display: "variable-value-unit", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as auto.
Compiled once by Woodcore's engine, on the examples' frozen data.
display-formulaoptional · default autoWhat the
#eq that follow print of their formula.display-formulaoptional · default autoautosets nothing: each line follows its level"none"no formula"variable"the formula in letters"value"in numbers"value-unit"in numbers, with units"variable-value-unit"in letters, then in numbersHover a value: its call and what it prints.
#calc-defaults(display-formula: auto, scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
Prints the same as "variable".
#calc-defaults(display-formula: "none", scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
#calc-defaults(display-formula: "variable", scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
Prints the same as auto.
#calc-defaults(display-formula: "value", scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
#calc-defaults(display-formula: "value-unit", scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
#calc-defaults(display-formula: "variable-value-unit", scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
Compiled once by Woodcore's engine, on the examples' frozen data.
display-equationoptional · default autoWhat the
#eq that follow print of their name and answer.display-equationoptional · default autoautosets nothing: each line follows its level"none"nothing is printed"variable"the symbol alone"value"the number alone"value-unit"the number and its unit"variable-value-unit"symbol = number unitHover a value: its call and what it prints.
#calc-defaults(display-equation: auto, scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
Prints the same as "variable-value-unit".
#calc-defaults(display-equation: "none", scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
#calc-defaults(display-equation: "variable", scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
#calc-defaults(display-equation: "value", scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
#calc-defaults(display-equation: "value-unit", scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
#calc-defaults(display-equation: "variable-value-unit", scope: "document")
#var("q_d", 4.5, "kN/m", level: 0)
#var("l", 5, "m", level: 0)
#eq("M_d", `q_d dot l^2 / 8`)What it prints
Prints the same as auto.
Compiled once by Woodcore's engine, on the examples' frozen data.
styleoptional · default autoHow the lines that follow are emphasised.
styleoptional · default autoautosets nothing: each line follows its level"normal"normal"bold"bold"underline"underlined"double"ruled twiceHover a value: its call and what it prints.
#calc-defaults(style: auto, scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as "normal".
#calc-defaults(style: "normal", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as auto.
#calc-defaults(style: "bold", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(style: "underline", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(style: "double", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Compiled once by Woodcore's engine, on the examples' frozen data.
label-positionoptional · default autoWhere the labels of the lines that follow go.
label-positionoptional · default autoautosets nothing: each line follows its level"none"no label"before"before the line, then «:»"after"after the line, after a dash"footnote"as a footnoteHover a value: its call and what it prints.
#calc-defaults(label-position: auto, scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as "footnote".
#calc-defaults(label-position: "none", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(label-position: "before", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(label-position: "after", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(label-position: "footnote", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as auto.
Compiled once by Woodcore's engine, on the examples' frozen data.
descr-positionoptional · default autoWhere the descriptions of the lines that follow go.
descr-positionoptional · default autoautosets nothing: each line follows its level"none"no description"after"after the line, in brackets"footnote"as a footnoteHover a value: its call and what it prints.
#calc-defaults(descr-position: auto, scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as "none".
#calc-defaults(descr-position: "none", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as auto.
#calc-defaults(descr-position: "after", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(descr-position: "footnote", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Compiled once by Woodcore's engine, on the examples' frozen data.
norm-positionoptional · default autoWhere the citations of the lines that follow go.
norm-positionoptional · default autoautosets nothing: each line follows its level"none"no citation"in-line"after the line, in grey"line-right"in the right-hand column"footnote"as a footnoteHover a value: its call and what it prints.
#calc-defaults(norm-position: auto, scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as "none".
#calc-defaults(norm-position: "none", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as auto.
#calc-defaults(norm-position: "in-line", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(norm-position: "line-right", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(norm-position: "footnote", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Compiled once by Woodcore's engine, on the examples' frozen data.
roleoptional · default autoThe role of the lines that follow, for
#var-table.roleoptional · default autoautosets nothing: each command keeps its own"data"a datum"compute"an intermediate value"result"a resultHover a value: its call and what it prints.
#calc-defaults(role: auto, scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
The role does not change the line: it tells #var-table where to file it.
#calc-defaults(role: "data", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
The role does not change the line: it tells #var-table where to file it.
#calc-defaults(role: "compute", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
The role does not change the line: it tells #var-table where to file it.
#calc-defaults(role: "result", scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
The role does not change the line: it tells #var-table where to file it.
Compiled once by Woodcore's engine, on the examples' frozen data.
leveloptional · default autoThe level of the lines that state none.
leveloptional · default autoautosets nothing: each line follows its level0nothing printed; the values are stored1level 12level 23level 3Hover a value: its call and what it prints.
#calc-defaults(level: auto, scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as 2.
#calc-defaults(level: 0, scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Nothing is printed.
#calc-defaults(level: 1, scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
#calc-defaults(level: 2, scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Prints the same as auto.
#calc-defaults(level: 3, scope: "document")
#var("b", 140, "mm", label: "Width", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")
#var("h", 400, "mm", label: "Height", descr: "at midspan", norm: "SIA 265", norm-section: "4.2.3")What it prints
Compiled once by Woodcore's engine, on the examples' frozen data.
unitoptional · default noneThe unit of a dimension, as
#unit sets it.unitoptional · default nonenoneFree text, for example:
unit: "kN"The essentials
What winsThe line's own argument, then its
level:, then these.At the head of a domain
scope: "domain" holds for the whole domain and ends with it.As a block
presets: "block": one line a value, label after, citation on the right.Arguments
| Argument | Status | What it does, and examples |
|---|---|---|
| The line's arguments | ||
| optional | How far the settings reach. scope: "domain"the rest of the #domainscope: "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 domainspresets: "inline"the values in the sentence, as usual | |
| optional | What the lines of #var and #verify print.display: "value-unit"the values without their symbolsdisplay: "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 numbersdisplay-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 symboldisplay-equation: "variable-value-unit"name = answer unit | |
| optional | How the lines that follow are emphasised. style: "bold"every line in boldstyle: "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 linelabel-position: "after"every label after its line | |
| optional | Where the descriptions of the lines that follow go. descr-position: "after"in brackets, after every linedescr-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 rightnorm-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 resultsrole: "data"the lines listed among the data | |
| optional | The level of the lines that state none. level: 3full detail for the lines that followlevel: 1the lines alone, no label | |
| optional | The unit of a dimension, as #unit sets it.unit: "kN"computed forces in kNunit: "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
#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)#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)
]Defined in lib/formula.typ:1844