typst/tests/lang/typ/values.typ
Laurenz 89eb8bae49 New syntax 💎
- Everything everywhere!
  - Blocks with curly braces: {}
  - Templates with brackets: []
  - Function templates with hashtag: `#[f]`
- Headings with equals sign: `= Introduction`
2021-01-30 12:09:26 +01:00

41 lines
506 B
Typst
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Test representation of values in the document.
#let name = "Typst"
#let ke-bab = "Kebab!"
#let α = "Alpha"
// Variables.
{name} \
{ke-bab} \
{α} \
// Error: 1:2-1:3 unknown variable
{_}
// Literal values.
{none} (empty) \
{true} \
{false} \
// Numerical values.
{1} \
{1.0e-4} \
{3.15} \
{1e-10} \
{50.368%} \
{0.0000012345pt} \
{4.5cm} \
{12e1pt} \
{2.5rad} \
{45deg} \
// Colors.
{#f7a20500} \
// Strings and escaping.
{"hi"} \
{"a\n[]\"\u{1F680}string"} \
// Templates.
{[*{"Hi"} #[f 1]*]}