From 100e9d60850424cd3863fca688adde83f8fa7b35 Mon Sep 17 00:00:00 2001 From: user202729 <25191436+user202729@users.noreply.github.com> Date: Sun, 2 Apr 2023 16:14:45 +0700 Subject: [PATCH] Add documentation on how to access math functions in code (#458) --- docs/src/reference/details.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/src/reference/details.yml b/docs/src/reference/details.yml index dcce41ea5..5d740336c 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.