Documentation
Commands
Every command a Woodcore report can call, with its arguments, the calls to copy and compiled examples — the documentation of Woodcore's «Commands» tab.
#import "../commands.typ": *Every file of the report starts with this line: it makes every command below available.
Calculating in the report
Write a calculation in the report itself: variables, formulas evaluated with their units, checks.
varNotes a value, prints it in the sentence and makes it usable by the calculations below.eqWrites a calculation: the formula in letters, in numbers, and the answer, computed with its units.unitSets the unit computed answers of one dimension are printed in.verifyChecks a relation between two values and prints it: green ✔ where it holds, red ✘ where not.calc-defaultsSets how the following lines are printed, where they say nothing themselves.domainGroups lines under a name: their variables stay apart, and readable further on with #var(…, domain:).from-levelPrints what it holds from a level on only: a figure only the most detailed report shows.var-tablePrints a table of the variables of one role — data, computed values or results — read from the report, never copied.distancePrints SIA 265:2021's minimum spacings and timber thicknesses for a fastener, computed in mm for its diameter.Printing a drawing or an object
Print what the project draws and describes: plans, static models, schemas, norm excerpts, title blocks, annexes and positions.
image-positions-planPrints a position plan as an image: the architect's plan faded, the STE symbols and numbers over it.image-fire-planPrints a fire-protection plan as an image: the concept over the architect's plan, in the VKF's colours.image-static-modelPrints a static model as an image: the system drawn in Woodcore, its supports, loads and dimensions.image-schemaPrints a schema as an image: a detail drawn in Woodcore's «Schemas» tab.image-extractPrints an excerpt of an annex as an image: the region of a source page framed in the «Annexes» tab.image-polar-momentPrints a polar moment as an image: the exported connection and, over it, the forces in each fastener.image-sectionPrints a schematic section as an image: the section drawn in Woodcore, the sheet's storey highlighted.image-legendPrints a sheet's legend as an image: the symbols of the sheet's plans, each once, in a frame.image-titleblockPrints a sheet's title block as an image: each field the project's own, but what the call writes.show-annexesPrints the report's annexes: for each source, a cover page, then its pages, whole and at their own size.positionPrints one position on a line: its id in its box, as the plan draws it, then the fields chosen.Reading the project's data
Read the project's exported data, to calculate with it, include it or loop over it.
findLists what a call can name: the domains and their keys, or the variables of one of them.syncKeeps a value in step in a document written in raw Typst: Woodcore finds it by its id and rewrites it.domain-fileGives the path of the file Woodcore wrote for a calculation domain, to include it without ever writing it by hand.idsGives the ids of every object of one kind the export carries: positions, plans, checks…project-infoGives the project as its .woodcore file describes it, and what produced the export.plans-ofGives the plans a position is drawn on, in the order of their files.journal-entriesGives a document's revisions, newest first, each with its index, date and label.getReads one field of a variable already read or declared: its value, unit, symbol, label…The document and its citations
The document itself: its language and words, its citations and bibliography, its settings and its level.
show-bibliographyPrints every norm and document the report cites in full: designation, title, edition and publisher, in three blocks.cite-normCites a norm in the prose, as the right-hand column cites one, and registers it for the bibliography.show-norm-listPrints the norms and documents a section names in full: designation, title, publisher and edition.set-report-languageSets the language the engine prints its own words in: labels, captions, footnotes.report-languageThe state holding the report's language; every word of the engine follows it, the engineer's prose does not.report-langGives the language in force here: «de», «fr» or «en».woodcore-documentGives the PDF its metadata from the project: title, authors, Woodcore's version and the document's revision.caption-rulesSets the captions the office's way: «Table 1 — The reference documents».doc-tablesSets hand-written tables the engine's way: only the rules the table writes, the caption above.tPrints one of the engine's words in the report's language, for a caller in the text.tlPrints a word the data carries in the report's language, for a caller in the text.t-strGives one of the engine's words as a string, in the report's language: what the engine calls wherever it prints.tl-strGives a word the data carries as a string, in the report's language: for a formula or a drawing too.t-labelGives one of the engine's words followed by its colon, set as each language sets one.t-patternGives a glossary template with its holes left standing, to set math in them.t-ofGives one of the engine's words in the language given, whatever the report's.tl-ofGives a word of the data in the language given: a glossary term, else the word as it is.report-levelThe state holding the report's level of detail, 1, 2 or 3; a call wins with its level:.uniform-levelThe state forcing a level on every call, written level: included, or none.show-maskedThe state printing every line a domain hides all the same, pale and marked.Writing templates
The building blocks of a template of your own: numbers, values, symbols, formulas and sentences, formatted as Woodcore prints them.
fmt-numberFormats a number and its unit as the report prints them: «1.902 kN/m²».fmt-valueFormats a var object's value with its unit: «26.916 kNm».fmt-decimalsWrites a number with at most so many decimals, no trailing zeros: 1.7291232 → «1.729».render-symbolSets a var object's symbol as real math: a subscript, a Greek letter.render-formulaSets the formula of a domain's step as real math.render-prosePrints a sentence of the data with its symbols as real math, written between dollars.