summaryrefslogtreecommitdiff
path: root/library/src/math
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-01-30 18:29:09 +0100
committerLaurenz <laurmaedje@gmail.com>2023-01-30 18:29:09 +0100
commit3a4c5ae4b96ff5c2cd17a2f41a67398f21da0373 (patch)
tree8ac95426ccfe6bb0843a146878864919a8f55c04 /library/src/math
parent1d86f418315a2dd632016c32bfedfcf2af1b0369 (diff)
Highlighting and docs fixes
Diffstat (limited to 'library/src/math')
-rw-r--r--library/src/math/matrix.rs6
-rw-r--r--library/src/math/mod.rs38
2 files changed, 15 insertions, 29 deletions
diff --git a/library/src/math/matrix.rs b/library/src/math/matrix.rs
index ca2fb9fd..527cf315 100644
--- a/library/src/math/matrix.rs
+++ b/library/src/math/matrix.rs
@@ -55,9 +55,9 @@ impl LayoutMath for VecNode {
///
/// The elements of a row should be separated by commas, while the rows
/// themselves should be separated by semicolons. The semicolon syntax merges
-/// preceding arguments separated by commas into a array arguments. You
-/// can also use this special syntax of math function calls to define custom
-/// functions that take 2D data.
+/// preceding arguments separated by commas into an array. You can also use this
+/// special syntax of math function calls to define custom functions that take
+/// 2D data.
///
/// Content in cells that are in the same row can be aligned with the `&` symbol.
///
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs
index f24b8078..ab1fab13 100644
--- a/library/src/math/mod.rs
+++ b/library/src/math/mod.rs
@@ -107,26 +107,7 @@ pub fn module(sym: &Module) -> Module {
/// # Formula
/// A mathematical formula.
///
-/// ## Syntax
-/// This function also has dedicated syntax: Write mathematical markup within
-/// dollar signs to create a formula. Starting and ending the formula with at
-/// least one space lifts it into a separate block that is centered
-/// horizontally.
-///
-/// In math, single letters are always displayed as is. Multiple letters,
-/// however, are interpreted as variables, symbols or functions. To display
-/// multiple letters verbatim, you can place them into quotes. Math mode also
-/// supports extra shorthands to easily type various arrows and other symbols.
-/// The [text](/docs/reference/text/) and [math](/docs/reference/math/) sections
-/// list all of them.
-///
-/// When a variable and a symbol share the same name, the variable is preferred.
-/// To force the symbol, surround it with colons. To access a variable with a
-/// single letter name, you can prefix it with a `#`.
-///
-/// In math mode, the arguments to a function call are always parsed as
-/// mathematical content. To work with other kinds of values, you first need to
-/// enter a code block using the `[$#{..}$]` syntax.
+/// Can be displayed inline with text or as a separate block.
///
/// ## Example
/// ```
@@ -139,16 +120,21 @@ pub fn module(sym: &Module) -> Module {
///
/// Prove by induction:
/// $ sum_(k=1)^n k = (n(n+1)) / 2 $
-///
-/// We define the following set:
-/// $ cal(A) :=
-/// { x in RR | x "is natural" } $
/// ```
///
+/// ## Syntax
+/// This function also has dedicated syntax: Write mathematical markup within
+/// dollar signs to create a formula. Starting and ending the formula with at
+/// least one space lifts it into a separate block that is centered
+/// horizontally. For more details about math syntax, see the
+/// [main math page](/docs/reference/math).
+///
/// ## Parameters
-/// - body: Content (positional, required) The contents of the formula.
+/// - body: Content (positional, required)
+/// The contents of the formula.
///
-/// - block: bool (named) Whether the formula is displayed as a separate block.
+/// - block: bool (named)
+/// Whether the formula is displayed as a separate block.
///
/// ## Category
/// math