Minor edits in the scripting documentation

This commit is contained in:
Ullrich Koethe 2025-03-04 21:51:54 +01:00 committed by GitHub
parent db7ba6fe69
commit e4286fbe9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 \