summaryrefslogtreecommitdiff
path: root/docs/reference/styling.md
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-03-04 15:51:22 +0100
committerGitHub <noreply@github.com>2024-03-04 14:51:22 +0000
commite3bd39c9d156a4a02a8b7398ed5769100a3d877a (patch)
treef793037b515289f158a2b69dce3b516127c6b3fa /docs/reference/styling.md
parentb005dc37e5f7e2f519edc1f607f6ba3ab810ec26 (diff)
Add support for shortcut links in docs (#3547)
Diffstat (limited to 'docs/reference/styling.md')
-rw-r--r--docs/reference/styling.md19
1 files changed, 9 insertions, 10 deletions
diff --git a/docs/reference/styling.md b/docs/reference/styling.md
index 1c3fd173..b0b7ab71 100644
--- a/docs/reference/styling.md
+++ b/docs/reference/styling.md
@@ -62,11 +62,10 @@ a _set-if_ rule.
## Show rules
With show rules, you can deeply customize the look of a type of element. The
most basic form of show rule is a _show-set rule._ Such a rule is written as the
-`{show}` keyword followed by a [selector]($selector), a colon and then a set
-rule. The most basic form of selector is an
-[element function]($function/#element-functions). This lets the set rule only
-apply to the selected element. In the example below, headings become dark blue
-while all other text stays black.
+`{show}` keyword followed by a [selector], a colon and then a set rule. The most
+basic form of selector is an [element function]($function/#element-functions).
+This lets the set rule only apply to the selected element. In the example below,
+headings become dark blue while all other text stays black.
```example
#show heading: set text(navy)
@@ -79,11 +78,11 @@ With show-set rules you can mix and match properties from different functions to
achieve many different effects. But they still limit you to what is predefined
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.
-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.
+replace the set rule after the colon with an arbitrary [function]. This function
+receives the element in question and can return arbitrary content. 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)")