summaryrefslogtreecommitdiff
path: root/docs/reference/syntax.md
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-02-27 11:05:16 +0100
committerGitHub <noreply@github.com>2024-02-27 10:05:16 +0000
commit145723b1ef4fa23f1f6665b8907dfe79d0bf83cf (patch)
tree02a7de661ddd5dafa75dfce3e3c8b45a7333b9dc /docs/reference/syntax.md
parente9ee00a7c0df083663ff5ccca162238b88525e14 (diff)
New context system (#3497)
Diffstat (limited to 'docs/reference/syntax.md')
-rw-r--r--docs/reference/syntax.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/reference/syntax.md b/docs/reference/syntax.md
index 643dc954..40213fe9 100644
--- a/docs/reference/syntax.md
+++ b/docs/reference/syntax.md
@@ -12,7 +12,7 @@ All this is backed by a tightly integrated scripting language with built-in and
user-defined functions.
## Modes
-Typst has three syntactical modes: Markup, math, and code. Markup mode is the
+Typst has three syntactical modes: Markup, math, and code. Markup mode is the
default in a Typst document, math mode lets you write mathematical formulas, and
code mode lets you use Typst's scripting features.
@@ -111,6 +111,7 @@ a table listing all syntax that is available in code mode:
| Show-set rule | `{show par: set block(..)}` | [Styling]($styling/#show-rules) |
| Show rule with function | `{show raw: it => {..}}` | [Styling]($styling/#show-rules) |
| Show-everything rule | `{show: columns.with(2)}` | [Styling]($styling/#show-rules) |
+| Context expression | `{context text.lang}` | [Context]($context) |
| Conditional | `{if x == 1 {..} else {..}}` | [Scripting]($scripting/#conditionals) |
| For loop | `{for x in (1, 2, 3) {..}}` | [Scripting]($scripting/#loops) |
| While loop | `{while x < 10 {..}}` | [Scripting]($scripting/#loops) |