diff options
Diffstat (limited to 'library/src/math')
| -rw-r--r-- | library/src/math/accent.rs | 2 | ||||
| -rw-r--r-- | library/src/math/attach.rs | 8 | ||||
| -rw-r--r-- | library/src/math/cancel.rs | 2 | ||||
| -rw-r--r-- | library/src/math/delimited.rs | 12 | ||||
| -rw-r--r-- | library/src/math/frac.rs | 6 | ||||
| -rw-r--r-- | library/src/math/matrix.rs | 6 | ||||
| -rw-r--r-- | library/src/math/mod.rs | 4 | ||||
| -rw-r--r-- | library/src/math/op.rs | 4 | ||||
| -rw-r--r-- | library/src/math/root.rs | 4 | ||||
| -rw-r--r-- | library/src/math/style.rs | 14 | ||||
| -rw-r--r-- | library/src/math/underover.rs | 12 |
11 files changed, 37 insertions, 37 deletions
diff --git a/library/src/math/accent.rs b/library/src/math/accent.rs index 2a650f2e..7878782b 100644 --- a/library/src/math/accent.rs +++ b/library/src/math/accent.rs @@ -5,7 +5,7 @@ const ACCENT_SHORT_FALL: Em = Em::new(0.5); /// Attach an accent to a base. /// -/// ## Example +/// ## Example { #example } /// ```example /// $grave(a) = accent(a, `)$ \ /// $arrow(a) = accent(a, arrow)$ \ diff --git a/library/src/math/attach.rs b/library/src/math/attach.rs index f9ac4aa0..67331908 100644 --- a/library/src/math/attach.rs +++ b/library/src/math/attach.rs @@ -2,7 +2,7 @@ use super::*; /// A base with optional attachments. /// -/// ## Example +/// ## Example { #example } /// ```example /// // With syntax. /// $ sum_(i=0)^n a_i = 2^(1+i) $ @@ -14,7 +14,7 @@ use super::*; /// ) $ /// ``` /// -/// ## Syntax +/// ## Syntax { #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. @@ -99,7 +99,7 @@ impl LayoutMath for AttachElem { /// Force a base to display attachments as scripts. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ scripts(sum)_1^2 != sum_1^2 $ /// ``` @@ -122,7 +122,7 @@ impl LayoutMath for ScriptsElem { /// Force a base to display attachments as limits. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ limits(A)_1^2 != A_1^2 $ /// ``` diff --git a/library/src/math/cancel.rs b/library/src/math/cancel.rs index 770f3c65..9a0ffb7a 100644 --- a/library/src/math/cancel.rs +++ b/library/src/math/cancel.rs @@ -4,7 +4,7 @@ use super::*; /// /// This is commonly used to show the eliminiation of a term. /// -/// ## Example +/// ## Example { #example } /// ```example /// >>> #set page(width: 140pt) /// Here, we can simplify: diff --git a/library/src/math/delimited.rs b/library/src/math/delimited.rs index 3726aa15..a4639de6 100644 --- a/library/src/math/delimited.rs +++ b/library/src/math/delimited.rs @@ -8,7 +8,7 @@ pub(super) const DELIM_SHORT_FALL: Em = Em::new(0.1); /// While matched delimiters scale by default, this can be used to scale /// unmatched delimiters and to control the delimiter scaling more precisely. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ lr(]a, b/2]) $ /// $ lr(]sum_(x=1)^n] x, size: #50%) $ @@ -108,7 +108,7 @@ fn scale( /// Floor an expression. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ floor(x/2) $ /// ``` @@ -126,7 +126,7 @@ pub fn floor( /// Ceil an expression. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ ceil(x/2) $ /// ``` @@ -144,7 +144,7 @@ pub fn ceil( /// Round an expression. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ round(x/2) $ /// ``` @@ -162,7 +162,7 @@ pub fn round( /// Take the absolute value of an expression. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ abs(x/2) $ /// ``` @@ -181,7 +181,7 @@ pub fn abs( /// Take the norm of an expression. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ norm(x/2) $ /// ``` diff --git a/library/src/math/frac.rs b/library/src/math/frac.rs index f93ee888..0e1f78cc 100644 --- a/library/src/math/frac.rs +++ b/library/src/math/frac.rs @@ -4,13 +4,13 @@ const FRAC_AROUND: Em = Em::new(0.1); /// A mathematical fraction. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ 1/2 < (x+1)/2 $ /// $ ((x+1)) / 2 = frac(a, b) $ /// ``` /// -/// ## Syntax +/// ## Syntax { #syntax } /// This function also has dedicated syntax: Use a slash to turn neighbouring /// expressions into a fraction. Multiple atoms can be grouped into a single /// expression using round grouping parenthesis. Such parentheses are removed @@ -38,7 +38,7 @@ impl LayoutMath for FracElem { /// A binomial expression. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ binom(n, k) $ /// ``` diff --git a/library/src/math/matrix.rs b/library/src/math/matrix.rs index eb465a43..84dcfd9b 100644 --- a/library/src/math/matrix.rs +++ b/library/src/math/matrix.rs @@ -8,7 +8,7 @@ const VERTICAL_PADDING: Ratio = Ratio::new(0.1); /// /// Content in the vector's elements can be aligned with the `&` symbol. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ vec(a, b, c) dot vec(1, 2, 3) /// = a + 2b + 3c $ @@ -57,7 +57,7 @@ impl LayoutMath for VecElem { /// /// Content in cells that are in the same row can be aligned with the `&` symbol. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ mat( /// 1, 2, ..., 10; @@ -134,7 +134,7 @@ impl LayoutMath for MatElem { /// /// Content across different branches can be aligned with the `&` symbol. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ f(x, y) := cases( /// 1 "if" (x dot y)/2 <= 0, diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs index 21e5d805..c4c18b87 100644 --- a/library/src/math/mod.rs +++ b/library/src/math/mod.rs @@ -117,7 +117,7 @@ pub fn module() -> Module { /// /// Can be displayed inline with text or as a separate block. /// -/// ## Example +/// ## Example { #example } /// ```example /// #set text(font: "New Computer Modern") /// @@ -130,7 +130,7 @@ pub fn module() -> Module { /// $ sum_(k=1)^n k = (n(n+1)) / 2 $ /// ``` /// -/// ## Syntax +/// ## Syntax { #syntax } /// This function also has dedicated syntax: Write mathematical markup within /// dollar signs to create an equation. Starting and ending the equation with at /// least one space lifts it into a separate block that is centered diff --git a/library/src/math/op.rs b/library/src/math/op.rs index 699d326a..1a3acaa3 100644 --- a/library/src/math/op.rs +++ b/library/src/math/op.rs @@ -4,14 +4,14 @@ use super::*; /// A text operator in an equation. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ tan x = (sin x)/(cos x) $ /// $ op("custom", /// limits: #true)_(n->oo) n $ /// ``` /// -/// ## Predefined Operators +/// ## Predefined Operators { #predefined } /// Typst predefines the operators `arccos`, `arcsin`, `arctan`, `arg`, /// `cos`, `cosh`, `cot`, `ctg`, `coth`, `csc`, `deg`, `det`, `dim`, /// `exp`, `gcd`, `hom`, `mod`, `inf`, `ker`, `lg`, `lim`, `ln`, `log`, diff --git a/library/src/math/root.rs b/library/src/math/root.rs index 7e00c45a..05f3a2a7 100644 --- a/library/src/math/root.rs +++ b/library/src/math/root.rs @@ -2,7 +2,7 @@ use super::*; /// A square root. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ sqrt(x^2) = x = sqrt(x)^2 $ /// ``` @@ -20,7 +20,7 @@ pub fn sqrt( /// A general root. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ root(3, x) $ /// ``` diff --git a/library/src/math/style.rs b/library/src/math/style.rs index eb6472ee..d65058e6 100644 --- a/library/src/math/style.rs +++ b/library/src/math/style.rs @@ -2,7 +2,7 @@ use super::*; /// Bold font style in math. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ bold(A) := B^+ $ /// ``` @@ -20,7 +20,7 @@ pub fn bold( /// Upright (non-italic) font style in math. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ upright(A) != A $ /// ``` @@ -70,7 +70,7 @@ pub fn serif( /// Sans-serif font style in math. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ sans(A B C) $ /// ``` @@ -91,7 +91,7 @@ pub fn sans( /// Calligraphic font style in math. /// -/// ## Example +/// ## Example { #example } /// ```example /// Let $cal(P)$ be the set of ... /// ``` @@ -112,7 +112,7 @@ pub fn cal( /// Fraktur font style in math. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ frak(P) $ /// ``` @@ -133,7 +133,7 @@ pub fn frak( /// Monospace font style in math. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ mono(x + y = z) $ /// ``` @@ -157,7 +157,7 @@ pub fn mono( /// For uppercase latin letters, blackboard bold is additionally available /// through [symbols]($category/symbols/sym) of the form `NN` and `RR`. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ bb(b) $ /// $ bb(N) = NN $ diff --git a/library/src/math/underover.rs b/library/src/math/underover.rs index 3ad2538c..9db79914 100644 --- a/library/src/math/underover.rs +++ b/library/src/math/underover.rs @@ -6,7 +6,7 @@ const BRACKET_GAP: Em = Em::new(0.25); /// A horizontal line under content. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ underline(1 + 2 + ... + 5) $ /// ``` @@ -29,7 +29,7 @@ impl LayoutMath for UnderlineElem { /// A horizontal line over content. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ overline(1 + 2 + ... + 5) $ /// ``` @@ -52,7 +52,7 @@ impl LayoutMath for OverlineElem { /// A horizontal brace under content, with an optional annotation below. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ underbrace(1 + 2 + ... + 5, "numbers") $ /// ``` @@ -87,7 +87,7 @@ impl LayoutMath for UnderbraceElem { /// A horizontal brace over content, with an optional annotation above. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ overbrace(1 + 2 + ... + 5, "numbers") $ /// ``` @@ -122,7 +122,7 @@ impl LayoutMath for OverbraceElem { /// A horizontal bracket under content, with an optional annotation below. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ underbracket(1 + 2 + ... + 5, "numbers") $ /// ``` @@ -157,7 +157,7 @@ impl LayoutMath for UnderbracketElem { /// A horizontal bracket over content, with an optional annotation above. /// -/// ## Example +/// ## Example { #example } /// ```example /// $ overbracket(1 + 2 + ... + 5, "numbers") $ /// ``` |
