From b1a091a236a1dbb16f61748828fabd8ec5210d0f Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 14 Jul 2025 15:26:10 +0200 Subject: [PATCH 1/3] Use "whitespace" instead of "space" to denote block-level equation in docs (#6591) --- crates/typst-library/src/math/equation.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/typst-library/src/math/equation.rs b/crates/typst-library/src/math/equation.rs index a2ae54471..db5253834 100644 --- a/crates/typst-library/src/math/equation.rs +++ b/crates/typst-library/src/math/equation.rs @@ -20,8 +20,8 @@ use crate::text::{FontFamily, FontList, FontWeight, LocalName, TextElem}; /// A mathematical equation. /// /// Can be displayed inline with text or as a separate block. An equation -/// becomes block-level through the presence of at least one space after the -/// opening dollar sign and one space before the closing dollar sign. +/// becomes block-level through the presence of whitespace after the opening +/// dollar sign and whitespace before the closing dollar sign. /// /// # Example /// ```example @@ -41,9 +41,9 @@ use crate::text::{FontFamily, FontList, FontWeight, LocalName, TextElem}; /// /// # 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 -/// horizontally. For more details about math syntax, see the +/// dollar signs to create an equation. Starting and ending the equation with +/// whitespace lifts it into a separate block that is centered horizontally. +/// For more details about math syntax, see the /// [main math page]($category/math). #[elem(Locatable, Synthesize, ShowSet, Count, LocalName, Refable, Outlinable)] pub struct EquationElem { From 0c12828c9a9bdb1a344b38e08fffcf2e47c0cfc0 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 14 Jul 2025 15:26:25 +0200 Subject: [PATCH 2/3] Fix minor typo in text docs (#6589) --- crates/typst-library/src/text/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/text/mod.rs b/crates/typst-library/src/text/mod.rs index 51663633f..c2efe210b 100644 --- a/crates/typst-library/src/text/mod.rs +++ b/crates/typst-library/src/text/mod.rs @@ -92,7 +92,7 @@ pub(super) fn define(global: &mut Scope) { /// ``` #[elem(Debug, Construct, PlainText, Repr)] pub struct TextElem { - /// A font family descriptor or priority list of font family descriptor. + /// A font family descriptor or priority list of font family descriptors. /// /// A font family descriptor can be a plain string representing the family /// name or a dictionary with the following keys: From f51cb4b03e9712b8eb404f8184a17ee4a63aaab2 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 14 Jul 2025 15:31:27 +0200 Subject: [PATCH 3/3] Rephrase docs for truncation of float/decimal to integer (#6543) --- crates/typst-library/src/foundations/int.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/foundations/int.rs b/crates/typst-library/src/foundations/int.rs index f65641ff1..13f457a11 100644 --- a/crates/typst-library/src/foundations/int.rs +++ b/crates/typst-library/src/foundations/int.rs @@ -46,7 +46,7 @@ impl i64 { /// or smaller than the minimum 64-bit signed integer. /// /// - Booleans are converted to `0` or `1`. - /// - Floats and decimals are truncated to the next 64-bit integer. + /// - Floats and decimals are rounded to the next 64-bit integer towards zero. /// - Strings are parsed in base 10. /// /// ```example