Fix typos

This commit is contained in:
Laurenz 2022-12-23 00:33:22 +01:00
parent fd787317a8
commit 1a9bcaccec
13 changed files with 20 additions and 25 deletions

View File

@ -42,7 +42,7 @@ use crate::text::TextNode;
/// - items: Content (positional, variadic) /// - items: Content (positional, variadic)
/// The enumeration's children. /// The enumeration's children.
/// ///
/// When using the enum syntax, adjacents items are automatically collected /// When using the enum syntax, adjacent items are automatically collected
/// into enumerations, even through constructs like for loops. /// into enumerations, even through constructs like for loops.
/// ///
/// ### Example /// ### Example

View File

@ -38,7 +38,7 @@ use crate::text::TextNode;
/// - items: Content (positional, variadic) /// - items: Content (positional, variadic)
/// The list's children. /// The list's children.
/// ///
/// When using the list syntax, adjacents items are automatically collected /// When using the list syntax, adjacent items are automatically collected
/// into lists, even through constructs like for loops. /// into lists, even through constructs like for loops.
/// ///
/// ### Example /// ### Example

View File

@ -4,7 +4,7 @@ use crate::prelude::*;
/// # Table /// # Table
/// A table of items. /// A table of items.
/// ///
/// Tables are used to arrange content in cells. Cells can contain arbitray /// Tables are used to arrange content in cells. Cells can contain arbitrary
/// content, including multiple paragraphs and are specified in row-major order. /// content, including multiple paragraphs and are specified in row-major order.
/// Because tables are just grids with configurable cell properties, refer to /// Because tables are just grids with configurable cell properties, refer to
/// the [grid documentation](@grid) for more information on how to size the /// the [grid documentation](@grid) for more information on how to size the

View File

@ -24,7 +24,7 @@ use crate::text::{SpaceNode, TextNode};
/// - items: Content (positional, variadic) /// - items: Content (positional, variadic)
/// The term list's children. /// The term list's children.
/// ///
/// When using the term list syntax, adjacents items are automatically /// When using the term list syntax, adjacent items are automatically
/// collected into term lists, even through constructs like for loops. /// collected into term lists, even through constructs like for loops.
/// ///
/// ### Example /// ### Example

View File

@ -126,7 +126,7 @@ pub fn luma(args: &mut Args) -> SourceResult<Value> {
/// ///
/// ## Parameters /// ## Parameters
/// - hex: EcoString (positional) /// - hex: EcoString (positional)
/// The color in hexademical notation. /// The color in hexadecimal notation.
/// ///
/// Accepts three, four, six or eight hexadecimal digits and optionally /// Accepts three, four, six or eight hexadecimal digits and optionally
/// a leading hashtag. /// a leading hashtag.

View File

@ -5,7 +5,7 @@ use crate::prelude::*;
/// Arrange spacing, paragraphs and block-level nodes into a flow. /// Arrange spacing, paragraphs and block-level nodes into a flow.
/// ///
/// This node is reponsible for layouting both the top-level content flow and /// This node is responsible for layouting both the top-level content flow and
/// the contents of boxes. /// the contents of boxes.
#[capable(Layout)] #[capable(Layout)]
#[derive(Hash)] #[derive(Hash)]
@ -244,7 +244,7 @@ impl<'a> FlowLayouter<'a> {
} }
} }
// Determine the size of the flow in this region dependening on whether // Determine the size of the flow in this region depending on whether
// the region expands. // the region expands.
let mut size = self.expand.select(self.full, used); let mut size = self.expand.select(self.full, used);

View File

@ -227,7 +227,7 @@ impl<'a> Regions<'a> {
/// An iterator that returns the sizes of the first and all following /// An iterator that returns the sizes of the first and all following
/// regions, equivalently to what would be produced by calling /// regions, equivalently to what would be produced by calling
/// [`next()`](Self::next) repeatedly until all regions are exhausted. /// [`next()`](Self::next) repeatedly until all regions are exhausted.
/// This iterater may be infinite. /// This iterator may be infinite.
pub fn iter(&self) -> impl Iterator<Item = Size> + '_ { pub fn iter(&self) -> impl Iterator<Item = Size> + '_ {
let first = std::iter::once(self.first); let first = std::iter::once(self.first);
let backlog = self.backlog.iter(); let backlog = self.backlog.iter();

View File

@ -861,12 +861,7 @@ fn linebreak_optimized<'a>(vt: &Vt, p: &'a Preparation<'a>, width: Abs) -> Vec<L
// has minimum cost. All breakpoints before this one become // has minimum cost. All breakpoints before this one become
// inactive since no line can span above the mandatory break. // inactive since no line can span above the mandatory break.
active = k; active = k;
MIN_COST MIN_COST + if attempt.justify { ratio.powi(3).abs() } else { 0.0 }
+ if attempt.justify {
ratio.powi(3).abs()
} else {
0.0
}
} else { } else {
// Normal line with cost of |ratio^3|. // Normal line with cost of |ratio^3|.
ratio.powi(3).abs() ratio.powi(3).abs()

View File

@ -253,7 +253,7 @@ impl Texify for MonoNode {
} }
} }
/// # Doublestruck /// # Blackboard Bold
/// Blackboard bold (double-struck) font style in math. /// Blackboard bold (double-struck) font style in math.
/// ///
/// For uppercase latin letters, blackboard bold is additionally available /// For uppercase latin letters, blackboard bold is additionally available

View File

@ -40,7 +40,7 @@ impl OutlineNode {
pub const TITLE: Option<Smart<Content>> = Some(Smart::Auto); pub const TITLE: Option<Smart<Content>> = Some(Smart::Auto);
/// The maximum depth up to which headings are included in the outline. When /// The maximum depth up to which headings are included in the outline. When
/// this arguement is `{none}`, all headings are included. /// this argument is `{none}`, all headings are included.
pub const DEPTH: Option<NonZeroUsize> = None; pub const DEPTH: Option<NonZeroUsize> = None;
/// Whether to indent the subheadings to align the start of their numbering /// Whether to indent the subheadings to align the start of their numbering

View File

@ -64,7 +64,7 @@ impl SmartQuoteNode {
} }
} }
/// State machine for smart quote subtitution. /// State machine for smart quote substitution.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct Quoter { pub struct Quoter {
/// How many quotes have been opened. /// How many quotes have been opened.

View File

@ -42,7 +42,7 @@ impl SubNode {
/// N#sub(typographic: false)[1] /// N#sub(typographic: false)[1]
/// ``` /// ```
pub const TYPOGRAPHIC: bool = true; pub const TYPOGRAPHIC: bool = true;
/// The baseline shift for synthetic subcripts. Does not apply if /// The baseline shift for synthetic subscripts. Does not apply if
/// `typographic` is true and the font has subscript codepoints for the /// `typographic` is true and the font has subscript codepoints for the
/// given `body`. /// given `body`.
pub const BASELINE: Length = Em::new(0.2).into(); pub const BASELINE: Length = Em::new(0.2).into();