-
Notifications
You must be signed in to change notification settings - Fork 8
Variables
Giorgio Garofalo edited this page Jan 18, 2025
·
7 revisions
.var {name} {value}
defines a variable. value
is a dynamic value, meaning it may be of any type.
.var {name} {Quarkdown}
The variable can be accessed as a parameter-less function:
Hello, **.name**!
Hello, Quarkdown!
A variable can be reassigned, either via .myvar {newvalue}
or .var {myvar} {newvalue}
:
.var {num} {5}
.num
.num {.sum {.num} {1}}
<!-- Or, equivalently -->
.var {num} {.sum {.num} {1}}
.num
5
6
As mentioned in Syntax of a function call:
A body argument always refers to the last parameter of the signature [...]
This allows the variable's value to be either inline or block:
.var {myrow}
.row gap:{2cm}
A
B
C
.container background:{yellow} padding:{1cm}
.myrow
- Figures
- Image size
- TeX formulas
- Table caption
- Decorative headings
- Alerts (quote types)
- Quotation source
- Page breaks
- Text symbols (text replacement)
- Syntax of a function call
- Declaring functions
- Dynamic typing
- Localization
- Including other Quarkdown files
- Importing external libraries
- Document metadata
- Theme
- Page format
- Page margin content
- Page counter
- Automatic page break
- Numbering
- Table of contents
- Stacks (row, column, grid)
- Container
- Align
- Clip
- Box
- Collapsible
- Whitespace
- Variables
- Optionality
- Math
- Conditional statements
- Loops
- Let
- Destructuring
- String manipulation
- Generators
- String
- Number
- Markdown content
- Boolean
- None
- Enumeration entry
- Iterable
- Dictionary
- Range
- Lambda
- Size(s)
- Color
- Dynamic
- Paper: abstract, definitions, theorems, and more