diff options
Diffstat (limited to 'library/src/compute/construct.rs')
| -rw-r--r-- | library/src/compute/construct.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/library/src/compute/construct.rs b/library/src/compute/construct.rs index 4ba73a73..1c5775e5 100644 --- a/library/src/compute/construct.rs +++ b/library/src/compute/construct.rs @@ -11,7 +11,7 @@ use crate::prelude::*; /// - Floats are floored to the next 64-bit integer. /// - Strings are parsed in base 10. /// -/// ## Example +/// ## Example { #example } /// ```example /// #int(false) \ /// #int(true) \ @@ -49,7 +49,7 @@ cast_from_value! { /// - Strings are parsed in base 10 to the closest 64-bit float. /// Exponential notation is supported. /// -/// ## Example +/// ## Example { #example } /// ```example /// #float(false) \ /// #float(true) \ @@ -84,7 +84,7 @@ cast_from_value! { /// Create a grayscale color. /// -/// ## Example +/// ## Example { #example } /// ```example /// #for x in range(250, step: 50) { /// box(square(fill: luma(x))) @@ -110,7 +110,7 @@ pub fn luma( /// render them correctly, the PDF export does not handle them properly at the /// moment. This will be fixed in the future. /// -/// ## Example +/// ## Example { #example } /// ```example /// #square(fill: rgb("#b1f2eb")) /// #square(fill: rgb(87, 127, 230)) @@ -190,7 +190,7 @@ cast_from_value! { /// to RGB for display preview might differ from how your printer reproduces /// the color. /// -/// ## Example +/// ## Example { #example } /// ```example /// #square( /// fill: cmyk(27%, 0%, 3%, 5%) @@ -228,7 +228,7 @@ cast_from_value! { /// Create a custom symbol with modifiers. /// -/// ## Example +/// ## Example { #example } /// ```example /// #let envelope = symbol( /// "🖂", @@ -294,7 +294,7 @@ cast_from_value! { /// - Floats are formatted in base 10 and never in exponential notation. /// - From labels the name is extracted. /// -/// ## Example +/// ## Example { #example } /// ```example /// #str(10) \ /// #str(2.7) \ @@ -330,7 +330,7 @@ cast_from_value! { /// that is not a space. Then, the element can be [referenced]($func/ref) and /// styled through the label. /// -/// ## Example +/// ## Example { #example } /// ```example /// #show <a>: set text(blue) /// #show label("b"): set text(red) @@ -339,7 +339,7 @@ cast_from_value! { /// *Strong* #label("b") /// ``` /// -/// ## Syntax +/// ## Syntax { #syntax } /// This function also has dedicated syntax: You can create a label by enclosing /// its name in angle brackets. This works both in markup and code. /// @@ -363,7 +363,7 @@ pub fn label( /// [See here](https://docs.rs/regex/latest/regex/#syntax) for a specification /// of the supported syntax. /// -/// ## Example +/// ## Example { #example } /// ```example /// // Works with show rules. /// #show regex("\d+"): set text(red) @@ -401,7 +401,7 @@ pub fn regex( /// the range. If you pass two, they describe the `start` and `end` of the /// range. /// -/// ## Example +/// ## Example { #example } /// ```example /// #range(5) \ /// #range(2, 5) \ |
