From 145723b1ef4fa23f1f6665b8907dfe79d0bf83cf Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 27 Feb 2024 11:05:16 +0100 Subject: New context system (#3497) --- docs/reference/styling.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'docs/reference/styling.md') diff --git a/docs/reference/styling.md b/docs/reference/styling.md index 687fed79..1c3fd173 100644 --- a/docs/reference/styling.md +++ b/docs/reference/styling.md @@ -81,9 +81,9 @@ in Typst. For maximum flexibility, you can instead write a show rule that defines how to format an element from scratch. To write such a show rule, replace the set rule after the colon with an arbitrary [function]($function). This function receives the element in question and can return arbitrary content. -Different [fields]($scripting/#fields) are available on the element passed to -the function. Below, we define a show rule that formats headings for a fantasy -encyclopedia. +The available [fields]($scripting/#fields) on the element passed to the function +again match the parameters of the respective element function. Below, we define +a show rule that formats headings for a fantasy encyclopedia. ```example #set heading(numbering: "(I)") @@ -91,7 +91,9 @@ encyclopedia. #set align(center) #set text(font: "Inria Serif") \~ #emph(it.body) - #counter(heading).display() \~ + #counter(heading).display( + it.numbering + ) \~ ] = Dragon -- cgit v1.2.3