diff options
Diffstat (limited to 'crates/typst-library/src/math')
| -rw-r--r-- | crates/typst-library/src/math/class.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crates/typst-library/src/math/class.rs b/crates/typst-library/src/math/class.rs index 0d6a370b..69635c62 100644 --- a/crates/typst-library/src/math/class.rs +++ b/crates/typst-library/src/math/class.rs @@ -3,11 +3,16 @@ use super::*; /// Forced use of a certain math class. /// /// This is useful to treat certain symbols as if they were of a different -/// class, e.g. to make text behave like a binary operator. +/// class, e.g. to make a symbol behave like a relation. /// -/// # Example +/// ## Example { #example } /// ```example -/// $x class("relation", "<=") 5$ +/// #let loves = math.class( +/// "relation", +/// sym.suit.heart, +/// ) +/// +/// $x loves y and y loves 5$ /// ``` /// /// Display: Class |
