summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-12-23 00:33:22 +0100
committerLaurenz <laurmaedje@gmail.com>2022-12-23 00:34:17 +0100
commit1a9bcaccec411cbc50a5d1ff64f266afaa63a29c (patch)
tree3d63a07659ca159c72d87b465699049301628c89
parentfd787317a858f0f6d9a3ac551d3fecb93286a0af (diff)
Fix typos
-rw-r--r--library/src/basics/enum.rs2
-rw-r--r--library/src/basics/list.rs2
-rw-r--r--library/src/basics/table.rs2
-rw-r--r--library/src/basics/terms.rs2
-rw-r--r--library/src/compute/construct.rs2
-rw-r--r--library/src/layout/flow.rs4
-rw-r--r--library/src/layout/mod.rs2
-rw-r--r--library/src/layout/par.rs15
-rw-r--r--library/src/math/style.rs2
-rw-r--r--library/src/meta/outline.rs2
-rw-r--r--library/src/text/misc.rs6
-rw-r--r--library/src/text/quotes.rs2
-rw-r--r--library/src/text/shift.rs2
13 files changed, 20 insertions, 25 deletions
diff --git a/library/src/basics/enum.rs b/library/src/basics/enum.rs
index 81a36b61..f1784a7e 100644
--- a/library/src/basics/enum.rs
+++ b/library/src/basics/enum.rs
@@ -42,7 +42,7 @@ use crate::text::TextNode;
/// - items: Content (positional, variadic)
/// 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.
///
/// ### Example
diff --git a/library/src/basics/list.rs b/library/src/basics/list.rs
index 24c7b21c..fc666586 100644
--- a/library/src/basics/list.rs
+++ b/library/src/basics/list.rs
@@ -38,7 +38,7 @@ use crate::text::TextNode;
/// - items: Content (positional, variadic)
/// 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.
///
/// ### Example
diff --git a/library/src/basics/table.rs b/library/src/basics/table.rs
index 411a31fc..01b16898 100644
--- a/library/src/basics/table.rs
+++ b/library/src/basics/table.rs
@@ -4,7 +4,7 @@ use crate::prelude::*;
/// # Table
/// 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.
/// Because tables are just grids with configurable cell properties, refer to
/// the [grid documentation](@grid) for more information on how to size the
diff --git a/library/src/basics/terms.rs b/library/src/basics/terms.rs
index 1570d177..1409350a 100644
--- a/library/src/basics/terms.rs
+++ b/library/src/basics/terms.rs
@@ -24,7 +24,7 @@ use crate::text::{SpaceNode, TextNode};
/// - items: Content (positional, variadic)
/// 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.
///
/// ### Example
diff --git a/library/src/compute/construct.rs b/library/src/compute/construct.rs
index 81a8b990..821a1416 100644
--- a/library/src/compute/construct.rs
+++ b/library/src/compute/construct.rs
@@ -126,7 +126,7 @@ pub fn luma(args: &mut Args) -> SourceResult<Value> {
///
/// ## Parameters
/// - hex: EcoString (positional)
-/// The color in hexademical notation.
+/// The color in hexadecimal notation.
///
/// Accepts three, four, six or eight hexadecimal digits and optionally
/// a leading hashtag.
diff --git a/library/src/layout/flow.rs b/library/src/layout/flow.rs
index 611e9ee1..4a8bed85 100644
--- a/library/src/layout/flow.rs
+++ b/library/src/layout/flow.rs
@@ -5,7 +5,7 @@ use crate::prelude::*;
/// 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.
#[capable(Layout)]
#[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.
let mut size = self.expand.select(self.full, used);
diff --git a/library/src/layout/mod.rs b/library/src/layout/mod.rs
index 67b53e1b..91822be8 100644
--- a/library/src/layout/mod.rs
+++ b/library/src/layout/mod.rs
@@ -227,7 +227,7 @@ impl<'a> Regions<'a> {
/// An iterator that returns the sizes of the first and all following
/// regions, equivalently to what would be produced by calling
/// [`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> + '_ {
let first = std::iter::once(self.first);
let backlog = self.backlog.iter();
diff --git a/library/src/layout/par.rs b/library/src/layout/par.rs
index 25372bb6..aa4e0fd9 100644
--- a/library/src/layout/par.rs
+++ b/library/src/layout/par.rs
@@ -198,17 +198,17 @@ impl Resolve for HorizontalAlign {
/// How to determine line breaks in a paragraph.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum Linebreaks {
- /// Determine the linebreaks in a simple first-fit style.
+ /// Determine the line breaks in a simple first-fit style.
Simple,
- /// Optimize the linebreaks for the whole paragraph.
+ /// Optimize the line breaks for the whole paragraph.
Optimized,
}
castable! {
Linebreaks,
- /// Determine the linebreaks in a simple first-fit style.
+ /// Determine the line breaks in a simple first-fit style.
"simple" => Self::Simple,
- /// Optimize the linebreaks for the whole paragraph.
+ /// Optimize the line breaks for the whole paragraph.
///
/// Typst will try to produce more evenly filled lines of text by
/// considering the whole paragraph when calculating line breaks.
@@ -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
// inactive since no line can span above the mandatory break.
active = k;
- MIN_COST
- + if attempt.justify {
- ratio.powi(3).abs()
- } else {
- 0.0
- }
+ MIN_COST + if attempt.justify { ratio.powi(3).abs() } else { 0.0 }
} else {
// Normal line with cost of |ratio^3|.
ratio.powi(3).abs()
diff --git a/library/src/math/style.rs b/library/src/math/style.rs
index d272bc94..0ec6853a 100644
--- a/library/src/math/style.rs
+++ b/library/src/math/style.rs
@@ -253,7 +253,7 @@ impl Texify for MonoNode {
}
}
-/// # Doublestruck
+/// # Blackboard Bold
/// Blackboard bold (double-struck) font style in math.
///
/// For uppercase latin letters, blackboard bold is additionally available
diff --git a/library/src/meta/outline.rs b/library/src/meta/outline.rs
index 9e4f616e..c3d17196 100644
--- a/library/src/meta/outline.rs
+++ b/library/src/meta/outline.rs
@@ -40,7 +40,7 @@ impl OutlineNode {
pub const TITLE: Option<Smart<Content>> = Some(Smart::Auto);
/// 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;
/// Whether to indent the subheadings to align the start of their numbering
diff --git a/library/src/text/misc.rs b/library/src/text/misc.rs
index d05bf3ec..75194a86 100644
--- a/library/src/text/misc.rs
+++ b/library/src/text/misc.rs
@@ -29,7 +29,7 @@ impl Behave for SpaceNode {
/// # Line Break
/// Inserts a line break.
///
-/// Advances the paragraph to the next line. A single trailing linebreak at the
+/// Advances the paragraph to the next line. A single trailing line break at the
/// end of a paragraph is ignored, but more than one creates additional empty
/// lines.
///
@@ -41,7 +41,7 @@ impl Behave for SpaceNode {
/// ```
///
/// ## Syntax
-/// This function also has dedicated syntax: To insert a linebreak, simply write
+/// This function also has dedicated syntax: To insert a line break, simply write
/// a backslash followed by whitespace. This always creates an unjustified
/// break.
///
@@ -58,7 +58,7 @@ impl Behave for SpaceNode {
/// #let jb = linebreak(justify: true)
///
/// I have manually tuned the #jb
-/// linebreaks in this paragraph #jb
+/// line breaks in this paragraph #jb
/// for an _interesting_ result. #jb
/// ```
///
diff --git a/library/src/text/quotes.rs b/library/src/text/quotes.rs
index 88278718..fa376b68 100644
--- a/library/src/text/quotes.rs
+++ b/library/src/text/quotes.rs
@@ -64,7 +64,7 @@ impl SmartQuoteNode {
}
}
-/// State machine for smart quote subtitution.
+/// State machine for smart quote substitution.
#[derive(Debug, Clone)]
pub struct Quoter {
/// How many quotes have been opened.
diff --git a/library/src/text/shift.rs b/library/src/text/shift.rs
index 1d78d857..611ed455 100644
--- a/library/src/text/shift.rs
+++ b/library/src/text/shift.rs
@@ -42,7 +42,7 @@ impl SubNode {
/// N#sub(typographic: false)[1]
/// ```
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
/// given `body`.
pub const BASELINE: Length = Em::new(0.2).into();