Add documentation on how to access math functions in code (#458)

This commit is contained in:
user202729 2023-04-02 16:14:45 +07:00 committed by GitHub
parent 92d4450c44
commit 100e9d6085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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