typst/tests/typ/code/call-wide.typ
Laurenz 7e2c217cbc Rename some library arguments
- font
  - color -> fill
  - shorthands for families and size
- decoration functions
  - color -> stroke
  - strength -> thickness
  - position -> offset
  - invert offsets: now positive goes downwards just like the rest of typst
2021-07-08 21:42:36 +02:00

41 lines
639 B
Typst

// Test wide calls.
---
// Test multiple wide calls in separate expressions.
#font!(fill: eastern) - First
#font!(fill: forest) - Second
---
// Test in heading.
= A #align!(right) B
C
---
// Test evaluation semantics.
#let x = 1
#let f(x, body) = (x, body)
#f!(x)
{ x = 2 }
---
// Test multiple wide calls in one expression.
// Ref: false
#let f() = []
#let g(x, y) = []
// Error: 2-4 wide calls are only allowed directly in templates
{f!()}
// Test nested wide calls.
// Error: 5-7 wide calls are only allowed directly in templates
#g!(f!())
---
// Test missing parentheses.
// Ref: false
// Error: 4 expected argument list
#f!