From 8ef298a65809c2ff5a34abc55aed800bfe5bdd77 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Sun, 3 Nov 2024 02:00:22 +0300 Subject: [PATCH] chore(core): Fix typos in code across project --- packages/lists/init.lua | 2 +- packages/math/base-elements.lua | 12 ++++++------ sile-lua.1.in | 4 ++-- src/cli.rs | 4 ++-- src/embed.rs.in | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/lists/init.lua b/packages/lists/init.lua index 18c38bafe..bc9b11f45 100644 --- a/packages/lists/init.lua +++ b/packages/lists/init.lua @@ -36,7 +36,7 @@ package._name = "lists" -- This is still in L1.1} -- \end{itemize} -- But personally, for simple lists, I prefer the first "more readable" one. --- Lists from Mardown, obviously, due to their structure, would need the +-- Lists from Markdown, obviously, due to their structure, would need the -- second technique. -- diff --git a/packages/math/base-elements.lua b/packages/math/base-elements.lua index 1ad91c2a2..f3cd31e55 100644 --- a/packages/math/base-elements.lua +++ b/packages/math/base-elements.lua @@ -699,16 +699,16 @@ function elements.underOver:_stretchyReshapeToBase (part) end elseif part:is_a(elements.underOver) then -- Big assumption here: only considering one level of stacked under/over. - local hasStreched = false + local hasStretched = false for _, elt in ipairs(part.children) do if elt.is_a(elements.text) and elt.kind == "operator" and SU.boolean(elt.stretchy, false) then local stretched = elt:_horizStretchyReshape(self.base.width) if stretched then - hasStreched = true + hasStretched = true end end end - if hasStreched then + if hasStretched then -- We need to re-calculate the shape so positions are re-calculated on each -- of its own parts. -- (Added after seeing that Mozilla test f19 was not rendering correctly.) @@ -722,9 +722,9 @@ function elements.underOver:shape () if not (self.mode == mathMode.display or self.mode == mathMode.displayCramped) and isBaseLargeOp then -- FIXME -- Added the "largeop" condition, but it's kind of a workaround: - -- It should rather be the "moveablelimits" propery in MathML, but we do not have that yet. + -- It should rather be the "moveablelimits" property in MathML, but we do not have that yet. -- When the base is a moveable limit, the under/over scripts are not placed under/over the base, - -- but ather to the right of it, when display mode is not used. + -- but other to the right of it, when display mode is not used. -- Notable effects: -- Mozilla MathML test 19 (on "k times" > overbrace > base) -- Maxwell's Equations in MathML3 Test Suite "complex1" (on the vectors in fractions) @@ -1496,7 +1496,7 @@ function elements.sqrt:shape () end -- Position the radicand self.radicand.relX = self.symbolWidth + self.offsetX - -- Compute the dimentions of the whole radical + -- Compute the dimensions of the whole radical self.width = self.radicand.width + self.symbolWidth + self.offsetX self.height = self.symbolHeight + self.radicalVerticalGap + self.extraAscender self.depth = self.radicand.depth diff --git a/sile-lua.1.in b/sile-lua.1.in index b48e9191c..6bf43a15b 100644 --- a/sile-lua.1.in +++ b/sile-lua.1.in @@ -6,9 +6,9 @@ .B [\fIoptions\fR] .B [\fIINPUT\fR] .SH DESCRIPTION -The SILE Typesetter reads input file(s) and typesets the content into a rendered documument format, typically PDF. +The SILE Typesetter reads input file(s) and typesets the content into a rendered document format, typically PDF. .LP -By default, input files may be in declarative SIL markup, structured XML, or programatic Lua. +By default, input files may be in declarative SIL markup, structured XML, or programmatic Lua. The input format is automatically detected by the active modules. By default, the output will be a file with the same name as the first input file with the extension changed to .pdf. The output filename can be overridden with the \fB\-\-output\fR argument. diff --git a/src/cli.rs b/src/cli.rs index fb766e0d3..e0a8f4b4c 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,10 +1,10 @@ use clap::Parser; use std::path::PathBuf; -/// The SILE Typesetter reads input file(s) and typesets the content into a rendered documument +/// The SILE Typesetter reads input file(s) and typesets the content into a rendered document /// format, typically PDF. /// -/// By default, input files may be in declarative SIL markup, structured XML, or programatic Lua. +/// By default, input files may be in declarative SIL markup, structured XML, or programmatic Lua. /// The input format is automatically detected by the active modules. By default, the output will /// be a file with the same name as the first input file with the extension changed to .pdf. The /// output filename can be overridden with the `--output` argument. Using `--backend` one can diff --git a/src/embed.rs.in b/src/embed.rs.in index 2b7e7e6c4..b4a86d61b 100644 --- a/src/embed.rs.in +++ b/src/embed.rs.in @@ -69,7 +69,7 @@ pub fn inject_embedded_loaders(lua: &Lua) { "rusile" => lua .create_function(move |lua, _: ()| crate::get_rusile_exports(lua)) .map(LuaValue::Function), - _ => format!("Module '{module}' is embeded in Rust binary").into_lua(lua), + _ => format!("Module '{module}' is embedded in Rust binary").into_lua(lua), }) .unwrap(); loaders.push(embedded_rusile_loader).unwrap();