summaryrefslogtreecommitdiff
path: root/docs/src/reference
diff options
context:
space:
mode:
authoruser202729 <25191436+user202729@users.noreply.github.com>2023-04-02 16:14:45 +0700
committerGitHub <noreply@github.com>2023-04-02 11:14:45 +0200
commit100e9d60850424cd3863fca688adde83f8fa7b35 (patch)
tree695e0461731691db82667dcc729becccb8679ba7 /docs/src/reference
parent92d4450c44fcf8894ca9847ddafc0cb206c0efbd (diff)
Add documentation on how to access math functions in code (#458)
Diffstat (limited to 'docs/src/reference')
-rw-r--r--docs/src/reference/details.yml11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/src/reference/details.yml b/docs/src/reference/details.yml
index dcce41ea..5d740336 100644
--- a/docs/src/reference/details.yml
+++ b/docs/src/reference/details.yml
@@ -85,6 +85,16 @@ math: |
Functions calls preceded by a hashtag are normal code function calls and not
affected by these rules.
+ All math functions are part of the `math` [module]($scripting/#modules), which
+ is available by default in equations. Outside of equations, they can be
+ accessed with the `math.` prefix. For example, to set the font used for
+ equations, write:
+
+ ```example
+ #show math.equation: set text(font: "Fira Math")
+ $ sum_(i in NN) 1 + i $
+ ```
+
layout: |
Arranging elements on the page in different ways.
@@ -124,6 +134,7 @@ sym: |
prefix.
The `d` in an integral's `dx` can be written as `[$dif x$]`.
+ Outside math formulas, `dif` can be accessed as `math.dif`.
emoji: |
Named emoji.