From e4286fbe9b5fefb06899d153b7d8cecc92fadd49 Mon Sep 17 00:00:00 2001 From: Ullrich Koethe Date: Tue, 4 Mar 2025 21:51:54 +0100 Subject: [PATCH] Minor edits in the scripting documentation --- docs/reference/language/scripting.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/reference/language/scripting.md b/docs/reference/language/scripting.md index 5e0f1555e..7c66728ac 100644 --- a/docs/reference/language/scripting.md +++ b/docs/reference/language/scripting.md @@ -157,6 +157,8 @@ resulting from the else's body. ] ``` +Note that the opening brace or bracket of the body must be on the same +line as the `#if` (unlike in many other languages). Each branch can have a code or content block as its body. - `{if condition {..}}` @@ -187,6 +189,8 @@ together into one larger array. } ``` +Note that the opening brace or bracket of the body must be on the same +line as the `#for` or `#whilde` (unlike in many other languages). For loops can iterate over a variety of collections: - `{for value in array {..}}` \ @@ -245,6 +249,10 @@ The value in question can be either: [element function]($function/#element-functions) that were given when the element was constructed. +**Important:** Many fields of element functions are only visible and accessible +in a concrete context that disambiguates their meaning. Consult the chapter +on [Context] for more information. + ```example #let it = [= Heading] #it.body \