diff --git a/crates/typst-docs/src/model.rs b/crates/typst-docs/src/model.rs index 46d979a27..580ae0d3c 100644 --- a/crates/typst-docs/src/model.rs +++ b/crates/typst-docs/src/model.rs @@ -88,7 +88,7 @@ pub struct FuncModel { pub element: bool, pub details: Html, /// This example is only for nested function models. Others can have - /// their example directly in their detals. + /// their example directly in their details. pub example: Option, #[serde(rename = "self")] pub self_: bool, diff --git a/crates/typst-library/src/layout/par.rs b/crates/typst-library/src/layout/par.rs index cfc204164..10f78ef2a 100644 --- a/crates/typst-library/src/layout/par.rs +++ b/crates/typst-library/src/layout/par.rs @@ -808,7 +808,7 @@ fn shape_range<'a>( let mut cursor = range.start; // Group by embedding level and script. If the text's script is explicitly - // set (rather than inferred from the glpyhs), we keep the script at an + // set (rather than inferred from the glyphs), we keep the script at an // unchanging `Script::Unknown` so that only level changes cause breaks. for i in range.clone() { if !bidi.text.is_char_boundary(i) { diff --git a/crates/typst-library/src/layout/spacing.rs b/crates/typst-library/src/layout/spacing.rs index cf69f6d90..9af542372 100644 --- a/crates/typst-library/src/layout/spacing.rs +++ b/crates/typst-library/src/layout/spacing.rs @@ -31,7 +31,7 @@ pub struct HElem { /// next to weak spacing, you can explicitly write `[#" "]` (for a normal /// space) or `[~]` (for a non-breaking space). The latter can be useful to /// create a construct that always attaches to the preceding word with one - /// non-breaking space, independently of wether a markup space existed in + /// non-breaking space, independently of whether a markup space existed in /// front or not. /// /// ```example diff --git a/crates/typst-library/src/meta/figure.rs b/crates/typst-library/src/meta/figure.rs index 0a02df570..bed2071a0 100644 --- a/crates/typst-library/src/meta/figure.rs +++ b/crates/typst-library/src/meta/figure.rs @@ -61,7 +61,7 @@ use crate::visualize::ImageElem; /// breakable and non-breakable blocks. /// /// # Caption customization -/// You can modify the apperance of the figure's caption with its associated +/// You can modify the appearance of the figure's caption with its associated /// [`caption`]($figure.caption) function. In the example below, we emphasize /// all captions: /// diff --git a/crates/typst-library/src/text/quote.rs b/crates/typst-library/src/text/quote.rs index 13a954365..01d941144 100644 --- a/crates/typst-library/src/text/quote.rs +++ b/crates/typst-library/src/text/quote.rs @@ -8,7 +8,7 @@ use crate::prelude::*; /// # Example /// ```example /// Plato is often misquoted as the author of #quote[I know that I know -/// nothing], however, this is a derivation form his orginal quote: +/// nothing], however, this is a derivation form his original quote: /// #set quote(block: true) /// #quote(attribution: [Plato])[ /// ... ἔοικα γοῦν τούτου γε σμικρῷ τινι αὐτῷ τούτῳ σοφώτερος εἶναι, ὅτι @@ -92,7 +92,7 @@ pub struct QuoteElem { /// ``` /// /// Note that bilbiography styles which do not include the author in the - /// citation (label, numberic and notes) currently produce attributions such + /// citation (label, numeric and notes) currently produce attributions such /// as `[---#super[1]]` or `[--- [1]]`, this will be fixed soon with CSL /// support. In the mean time you can simply cite yourself: /// ```example @@ -161,7 +161,7 @@ impl Show for QuoteElem { // TODO: these should use the citation-format attribute, once CSL // is implemented and retrieve the authors for non-author formats - // themeselves, see: + // themselves, see: // - https://github.com/typst/typst/pull/2252#issuecomment-1741146989 // - https://github.com/typst/typst/pull/2252#issuecomment-1744634132 Ok(match bib.style(styles) { diff --git a/crates/typst-library/src/visualize/image.rs b/crates/typst-library/src/visualize/image.rs index 05a9c352f..931e38c63 100644 --- a/crates/typst-library/src/visualize/image.rs +++ b/crates/typst-library/src/visualize/image.rs @@ -128,7 +128,7 @@ impl Layout for ImageElem { styles: StyleChain, regions: Regions, ) -> SourceResult { - // Take the format that was explicitly defined, or parse the extention, + // Take the format that was explicitly defined, or parse the extension, // or try to detect the format. let data = self.data(); let format = match self.format(styles) { diff --git a/crates/typst-macros/src/func.rs b/crates/typst-macros/src/func.rs index b67fb9094..916cf4195 100644 --- a/crates/typst-macros/src/func.rs +++ b/crates/typst-macros/src/func.rs @@ -119,7 +119,7 @@ fn parse(stream: TokenStream, item: &syn::ItemFn) -> Result { }) } -/// Parse details about a functino parameter. +/// Parse details about a function parameter. fn parse_param( special: &mut SpecialParams, params: &mut Vec, diff --git a/crates/typst-syntax/src/node.rs b/crates/typst-syntax/src/node.rs index 9b73dd7f0..d9c80a244 100644 --- a/crates/typst-syntax/src/node.rs +++ b/crates/typst-syntax/src/node.rs @@ -650,7 +650,7 @@ pub struct SyntaxError { pub span: Span, /// The error message. pub message: EcoString, - /// Additonal hints to the user, indicating how this error could be avoided + /// Additional hints to the user, indicating how this error could be avoided /// or worked around. pub hints: EcoVec, } diff --git a/crates/typst/src/diag.rs b/crates/typst/src/diag.rs index 9342606ec..d55896782 100644 --- a/crates/typst/src/diag.rs +++ b/crates/typst/src/diag.rs @@ -92,7 +92,7 @@ pub struct SourceDiagnostic { pub message: EcoString, /// The trace of function calls leading to the problem. pub trace: EcoVec>, - /// Additonal hints to the user, indicating how this problem could be avoided + /// Additional hints to the user, indicating how this problem could be avoided /// or worked around. pub hints: EcoVec, } @@ -256,7 +256,7 @@ pub type HintedStrResult = Result; pub struct HintedString { /// A diagnostic message describing the problem. pub message: EcoString, - /// Additonal hints to the user, indicating how this error could be avoided + /// Additional hints to the user, indicating how this error could be avoided /// or worked around. pub hints: Vec, } @@ -382,7 +382,7 @@ impl From for EcoString { /// A result type with a package-related error. pub type PackageResult = Result; -/// An error that occured while trying to load a package. +/// An error that occurred while trying to load a package. /// /// Some variants have an optional string can give more details, if available. #[derive(Debug, Clone, Eq, PartialEq, Hash)] diff --git a/crates/typst/src/eval/mod.rs b/crates/typst/src/eval/mod.rs index b527bed1e..3dea512e1 100644 --- a/crates/typst/src/eval/mod.rs +++ b/crates/typst/src/eval/mod.rs @@ -1187,7 +1187,7 @@ impl Eval for ast::FuncCall<'_> { // allowed for functions, types, modules (because they are scopes), // and symbols (because they have modifiers). // - // For dictionaries, it is not allowed because it would be ambigious + // For dictionaries, it is not allowed because it would be ambiguous // (prioritizing associated functions would make an addition of a // new associated function a breaking change and prioritizing fields // would break associated functions for certain dictionaries). diff --git a/crates/typst/src/model/content.rs b/crates/typst/src/model/content.rs index 9205f4d86..c5aa4e58a 100644 --- a/crates/typst/src/model/content.rs +++ b/crates/typst/src/model/content.rs @@ -135,8 +135,8 @@ impl Content { /// Also auto expands sequence of sequences into flat sequence pub fn sequence_recursive_for_each(&self, f: &mut impl FnMut(&Self)) { - if let Some(childs) = self.to_sequence() { - childs.for_each(|c| c.sequence_recursive_for_each(f)); + if let Some(children) = self.to_sequence() { + children.for_each(|c| c.sequence_recursive_for_each(f)); } else { f(self); } diff --git a/docs/guides/guide-for-latex-users.md b/docs/guides/guide-for-latex-users.md index d0fb92cb2..0ac263093 100644 --- a/docs/guides/guide-for-latex-users.md +++ b/docs/guides/guide-for-latex-users.md @@ -486,7 +486,7 @@ $ f(x) = (x + 1) / x $ to include more than one value in a sub- or superscript, enclose their contents in parentheses: `{$x_(a -> epsilon)$}`. -Since variables in math mode do not need to be preprended with a `#` or a `/`, +Since variables in math mode do not need to be prepended with a `#` or a `/`, you can also call functions without these special characters: ```example @@ -545,7 +545,7 @@ The example below - sets wide [margins]($page.margin) - enables [justification]($par.justify), [tighter lines]($par.leading) and [first-line-indent]($par.first-line-indent) -- [sets the font]($text.font) to "New Computer Modern", an OpenType derivate of +- [sets the font]($text.font) to "New Computer Modern", an OpenType derivative of Computer Modern for both text and [code blocks]($raw) - disables paragraph [spacing]($block.spacing) - increases [spacing]($block.spacing) around [headings]($heading) diff --git a/tests/ref/layout/pagebreak-parity.png b/tests/ref/layout/pagebreak-parity.png index 8c05dc92d..0dbabe7ae 100644 Binary files a/tests/ref/layout/pagebreak-parity.png and b/tests/ref/layout/pagebreak-parity.png differ diff --git a/tests/typ/layout/pagebreak-parity.typ b/tests/typ/layout/pagebreak-parity.typ index 1cfbd450e..4dbf723e7 100644 --- a/tests/typ/layout/pagebreak-parity.typ +++ b/tests/typ/layout/pagebreak-parity.typ @@ -12,7 +12,7 @@ Sixth #pagebreak() Seventh #pagebreak(to: "odd") -#page[Nineth] +#page[Ninth] --- #set page(width: auto, height: auto)