- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 212
 
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}}
.num5
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 formulae
 - Table caption
 - Code caption
 - Decorative headings
 - Alerts (quote types)
 - Quotation source
 - Cross-references
 - Page breaks
 - Text symbols (text replacement)
 - Emojis
 
- Document metadata
 - Theme
 - CSS
 - Fonts
 - Page format
 - Page margin content
 - Page counter
 - Persistent headings
 - Automatic page break
 - Numbering
 - Paragraph style
 - Caption position
 - Table of contents
 - Bibliography
 - Footnotes
 
- Stacks (row, column, grid)
 - Container
 - Align
 - Float
 - Figure
 - Clip
 - Box
 - Collapsible
 - Landscape
 - Whitespace
 
- Variables
 - Optionality
 - Math
 - Conditional statements
 - Loops
 - Let
 - Destructuring
 - String manipulation
 - Table manipulation: sorting, computing, and more
 - Table generation
 
- String
 - Number
 - Markdown content
 - Boolean
 - None
 - Enumeration entry
 - Iterable
 - Dictionary
 - Range
 - Lambda
 - Size(s)
 - Color
 - Dynamic
 
- Paper: abstract, definitions, theorems, and more