summaryrefslogtreecommitdiff
path: root/docs/reference/groups.yml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference/groups.yml')
-rw-r--r--docs/reference/groups.yml60
1 files changed, 50 insertions, 10 deletions
diff --git a/docs/reference/groups.yml b/docs/reference/groups.yml
index 3bc80339..cbf9cfec 100644
--- a/docs/reference/groups.yml
+++ b/docs/reference/groups.yml
@@ -3,24 +3,27 @@
- name: variants
display: Variants
+ category: math
functions: ["serif", "sans", "frak", "mono", "bb", "cal"]
description: |
Alternate typefaces within formulas.
- These functions are distinct from the [`text`]($func/text) function because
- math fonts contain multiple variants of each letter.
+ These functions are distinct from the [`text`]($text) function because math
+ fonts contain multiple variants of each letter.
- name: styles
display: Styles
+ category: math
functions: ["upright", "italic", "bold"]
description: |
Alternate letterforms within formulas.
- These functions are distinct from the [`text`]($func/text) function because
- math fonts contain multiple variants of each letter.
+ These functions are distinct from the [`text`]($text) function because math
+ fonts contain multiple variants of each letter.
- name: sizes
display: Sizes
+ category: math
functions: ["display", "inline", "script", "sscript"]
description: |
Forced size styles for expressions within formulas.
@@ -31,6 +34,7 @@
- name: underover
display: Under/Over
+ category: math
functions: [
"underline",
"overline",
@@ -47,23 +51,41 @@
- name: roots
display: Roots
+ category: math
functions: ["root", "sqrt"]
- description: Square and non-square roots.
+ description: |
+ Square and non-square roots.
+
+ # Example
+ ```example
+ $ sqrt(3 - 2 sqrt(2)) = sqrt(2) - 1 $
+ $ root(3, x) $
+ ```
- name: attach
display: Attach
+ category: math
functions: ["attach", "scripts", "limits"]
description: |
Subscript, superscripts, and limits.
- The `attach` function backs the `[$a_b^c$]` syntax that adds top and bottom
- attachments to a part of an equation. Attachments can be displayed either as
- sub/superscripts, or limits. Typst automatically decides which is more
- suitable depending on the base, but you can also control this manually with
- the `scripts` and `limits` functions.
+ Attachments can be displayed either as sub/superscripts, or limits. Typst
+ automatically decides which is more suitable depending on the base, but you
+ can also control this manually with the `scripts` and `limits` functions.
+
+ # Example
+ ```example
+ $ sum_(i=0)^n a_i = 2^(1+i) $
+ ```
+
+ # Syntax
+ This function also has dedicated syntax for attachments after the base: Use
+ the underscore (`_`) to indicate a subscript i.e. bottom attachment and the
+ hat (`^`) to indicate a superscript i.e. top attachment.
- name: lr
display: Left/Right
+ category: math
functions: ["lr", "abs", "norm", "floor", "ceil", "round"]
description: |
Delimiter matching.
@@ -74,3 +96,21 @@
and control their size exactly. Apart from the `lr` function, Typst provides
a few more functions that create delimiter pairings for absolute, ceiled,
and floored values as well as norms.
+
+ # Example
+ ```example
+ $ [a, b/2] $
+ $ lr(]sum_(x=1)^n] x, size: #50%) $
+ $ abs((x + y) / 2) $
+ ```
+
+- name: calc
+ display: Calculation
+ category: foundations
+ path: ["calc"]
+ description: |
+ Calculations and processing of numeric values.
+
+ These functions are part of the `calc` module and not imported by default.
+ In addition to the functions listed below, the `calc` module also defines
+ the constants `pi`, `tau`, `e`, `inf`, and `nan`.