Skip to content

Commit

Permalink
Merge pull request #1885 from sile-typesetter/spell
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Oct 10, 2023
2 parents 93dee89 + ab665cc commit b75b51e
Show file tree
Hide file tree
Showing 29 changed files with 46 additions and 49 deletions.
9 changes: 3 additions & 6 deletions README.md
Expand Up @@ -65,9 +65,8 @@ Arch Linux has a prebuilt [SILE package][arch-sile] in the official package repo
$ pacman -S sile
```

The official package uses Lua 5.4.
Alternatively, a package that uses LuaJIT may be built manually from the [Arch User Repository][aur] using [sile-luajit][aur-sile-luajit].
A VCS package is also available as [sile-git][aur-sile-git] to build from the latest Git commit.
The official package uses LuaJIT.
If you install LuaRocks for use with SILE via `pacman`, use the `lua51-*` variants to match LuaJIT.

#### Fedora

Expand Down Expand Up @@ -197,7 +196,7 @@ If you try to `brew link` and you get a series of messages including something l
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

Optionally you may install the Lua libraries listed in the [rockspec][] to your system (using either your system's package manager or [luarocks][] (`luarocks install --only-deps sile-dev-1.rockspec`).
By default all the required Lua libraries will be downloaded and bundled alongside the SILE the instalation.
By default all the required Lua libraries will be downloaded and bundled alongside the SILE the installation.
If you downloaded a source tarball these dependencies are included, if you are using a git clone of the source repository the build system will require `luarocks` to fetch them during build.
Note that OpenSSL development headers will be required for one of the Lua modules to compile¹.
If your system has all the required packages already you may add `--with-system-luarocks` to the `./configure` command to avoid bundling them.
Expand Down Expand Up @@ -351,8 +350,6 @@ SILE is distributed under the [MIT licence][license].
[libtexpdf]: https://github.com/sile-typesetter/libtexpdf
[arch-sile]: https://archlinux.org/packages/community/x86_64/sile/
[aur]: https://wiki.archlinux.org/index.php/Arch_User_Repository
[aur-sile-luajit]: https://aur.archlinux.org/packages/sile-luajit/
[aur-sile-git]: https://aur.archlinux.org/packages/sile-git/
[typesetting]: https://en.wikipedia.org/wiki/Typesetting
[tex]: https://en.wikipedia.org/wiki/TeX
[indesign]: https://en.wikipedia.org/wiki/Adobe_InDesign
Expand Down
2 changes: 1 addition & 1 deletion classes/docbook.lua
Expand Up @@ -21,7 +21,7 @@ function class:_init (options)
self:loadPackage("footnotes")
-- SILE sensibly does not define a pixels unit because it has no meaning in its frame of reference. However the
-- Docbook standard requires them and even defaults to them for bare numbers, even while warning against their use.
-- Here we define a px arbitrarily to be the equivilent point unit if output was 300 DPI.
-- Here we define a px arbitrarily to be the equivalent point unit if output was 300 DPI.
SILE.units.px = {
definition = "0.24pt"
}
Expand Down
2 changes: 1 addition & 1 deletion classes/plain.lua
Expand Up @@ -76,7 +76,7 @@ function class:registerCommands ()

self:registerCommand("noindent", function (_, content)
if #SILE.typesetter.state.nodes ~= 0 then
SU.warn("\\noindent called after nodes already recieved in a paragraph, the setting will have no effect because the parindent (if any) has already been output")
SU.warn("\\noindent called after nodes already received in a paragraph, the setting will have no effect because the parindent (if any) has already been output")
end
SILE.settings:set("current.parindent", SILE.nodefactory.glue())
SILE.process(content)
Expand Down
2 changes: 1 addition & 1 deletion classes/tplain.lua
Expand Up @@ -14,7 +14,7 @@ class.defaultFrameset.content = {
}

-- The classes tplain and tbook inherit from plain and book respectively but also
-- have this bit in common; this makes it accessable
-- have this bit in common; this makes it accessible
function class:_t_common ()
self:loadPackage("font-fallback")
self:loadPackage("hanmenkyoshi")
Expand Down
4 changes: 2 additions & 2 deletions core/break.lua
Expand Up @@ -91,7 +91,7 @@ end
-- up to the that total. Returning values that don't add up may produce
-- unexpected results.
--
-- TeX wizards shall also note that this is slighty different from
-- TeX wizards shall also note that this is slightly different from
-- Knuth's definition "nline l1 i1 l2 i2 ... lN iN".
function lineBreak:parShape(_)
return 0, self.hsize, 0
Expand Down Expand Up @@ -176,7 +176,7 @@ function lineBreak:tryBreak() -- 855
end
-- 861
if self.r.lineNumber > self.old_l then
if debugging then SU.debug("break", "Mimimum demerits = " .. self.minimumDemerits) end
if debugging then SU.debug("break", "Minimum demerits = " .. self.minimumDemerits) end
if self.minimumDemerits < awful_bad and (self.old_l ~= self.easy_line or self.r == self.activeListHead) then
self:createNewActiveNodes(breakType)
end
Expand Down
2 changes: 1 addition & 1 deletion core/nodefactory.lua
Expand Up @@ -255,7 +255,7 @@ end
getmetatable(nodefactory.unshaped).__index = function (_, _)
-- if k == "width" then SU.error("Can't get width of unshaped node", true) end
-- TODO: No idea why porting to proper Penlight classes this ^^^^^^ started
-- killing everything. Perhaps becaus this function started working and would
-- killing everything. Perhaps because this function started working and would
-- actually need to return rawget(self, k) or something?
end

Expand Down
6 changes: 3 additions & 3 deletions core/sile.lua
Expand Up @@ -59,8 +59,8 @@ SILE.documentState = {}
SILE.rawHandlers = {}

-- User input values, currently from CLI options, potentially all the inuts
-- needed for a user to use a SILE-as-a-library verion to produce documents
-- programatically.
-- needed for a user to use a SILE-as-a-library version to produce documents
-- programmatically.
SILE.input = {
filenames = {},
evaluates = {},
Expand Down Expand Up @@ -97,7 +97,7 @@ SILE.nodefactory = require("core.nodefactory")

-- NOTE:
-- See remainaing internal libraries loaded at the end of this file because
-- they run core SILE functions on load istead of waiting to be called (or
-- they run core SILE functions on load instead of waiting to be called (or
-- depend on others that do).

local function runEvals (evals, arg)
Expand Down
2 changes: 1 addition & 1 deletion core/utilities-numbers.lua
Expand Up @@ -60,7 +60,7 @@ local icuFormat = function (num, lang, options)
-- ICU locale: see https://unicode-org.github.io/icu/userguide/locale/
-- Ex. "en", "en-US", "sr-Latn"...
local iculocale = lang or ""
-- ICU keywork for a numbering system specifier: @numbers=xxxx
-- ICU keyword for a numbering system specifier: @numbers=xxxx
-- The specifiers are defined here:
-- https://github.com/unicode-org/cldr/blob/main/common/bcp47/number.xml
if options.system then
Expand Down
2 changes: 1 addition & 1 deletion core/utilities.lua
Expand Up @@ -101,7 +101,7 @@ utilities.deprecated = function (old, new, warnat, errorat, extra)
-- runtime but not useful if we encounter deprecated code in core code. Users
-- will never encounter this failure, but as a developer it’s hard to test a
-- deprecation when core code refactoring is an all-or-nothing proposition.
-- Hence we fake it ‘till we make it, all deprecations internally are warings.
-- Hence we fake it ‘till we make it, all deprecations internally are warnings.
local brackets = old:sub(1,1) == '\\' and "" or "()"
local _new = new and "Please use " .. (new .. brackets) .. " instead." or "Plase don't use it."
local msg = (old .. brackets) .. " was deprecated in SILE v" .. tostring(warnat) .. ". " .. _new .. (extra and "\n" .. extra .. "\n\n" or "")
Expand Down
2 changes: 1 addition & 1 deletion documentation/c02-gettingstarted.sil
Expand Up @@ -256,7 +256,7 @@ This can be done with:
Now the \code{sile} command will be available from any directory.

\begin{autodoc:note}
If you wish you, can skip the install step and use the compiled SILE executable diretly from the source directory.
If you wish you, can skip the install step and use the compiled SILE executable directly from the source directory.
As configured above, this will only work from a shell with the CWD set to the SILE source.
To make it usable from anywhere, you can configure it with the source directory baked in as the installation location.

Expand Down
2 changes: 1 addition & 1 deletion documentation/c03-input.sil
Expand Up @@ -8,7 +8,7 @@ It is even less true now that 3rd party plugins can add their own input formats.

Hence this chanpter has been renamed.
The original chapter title was "SILE’s Input Language", as if there was only one.
The truth is there \em{is} an input syntax we call "SIL", but even that is perhaps best thought of as a structured data systax rather than a unique language.
The truth is there \em{is} an input syntax we call "SIL", but even that is perhaps best thought of as a structured data syntax rather than a unique language.
The input strings \code{\\em\{foo\}} in SIL input syntax is 100\% equivalent to \code{<em>foo</em>} in XML input syntax.
The SIL input syntax is provided as an easier to type alternative than XML which can be a bit verbose and tedious to work with by hand.
On the other hand if you're handling data written by some other program, XML might be a much better solution.
Expand Down
2 changes: 1 addition & 1 deletion documentation/c05-packages.sil
Expand Up @@ -98,7 +98,7 @@ As well as processing text, SILE can also include images.

\section{Text & Characters}

This section covers a range of diffent topics from initial capitals to text transforms, through URL formatting.
This section covers a range of different topics from initial capitals to text transforms, through URL formatting.

\subsection{dropcaps}
\status:high
Expand Down
2 changes: 1 addition & 1 deletion documentation/c06-macroscommands.sil
Expand Up @@ -17,7 +17,7 @@ that you need to keep entering again and again.
\define[command=SILE]{\font[family=Gentium Plus]{% Book Basic has no +smcp, but readers don't need to know, since we're only using Book Basic as a holdover from old SILE which did.
S\lower[height=0.5ex]{I}L\kern[width=-.2em]\raise[height=0.6ex]{\font[features=+smcp]{e}}}}
For instance, let’s suppose that we want to design a nice little
“bumpy road” logo for SILE. (Afficionados of T\kern[width=-.1667em]\lower[height=0.5ex]{E}\kern[width=-.125em]X and friends will be familiar with the concept of
“bumpy road” logo for SILE. (Aficionados of T\kern[width=-.1667em]\lower[height=0.5ex]{E}\kern[width=-.125em]X and friends will be familiar with the concept of
bumpy road logos.) Our logo will look like this: \SILE. It’s not a great
logo, but we’ll use it as \SILE’s logo for the purposes of this section.

Expand Down
6 changes: 3 additions & 3 deletions documentation/c08-language.sil
Expand Up @@ -25,7 +25,7 @@ Language support may include:
\item{frame advance and writing direction}
\item{spacing}
\item{choice of glyphs within a font}
\item{localization of programatically inserted strings}
\item{localization of programmatically inserted strings}
\end{itemize}

For example, Sindhi and Urdu users will expect the Arabic letter \em{heh} (\font[family=LateefGR]{ه}) to combine with other letters in different ways to standard Arabic shaping.
Expand Down Expand Up @@ -95,7 +95,7 @@ To implement hyphenation for a new language, first check to see if TeX hyphenati

\section{Localization}

A small handful of strings may be programatically added to documents depending on language, context, and options.
A small handful of strings may be programmatically added to documents depending on language, context, and options.
For example by default in English the \autodoc:class{book} class will prepend “Chapter ” before chapter numbers output by the \autodoc:command{\chapter} command.
These localized strings are managed internally using the Fluent localization system.%
\footnote{See Project Fluent (\url{https://projectfluent.org}) for details on the data format and uses.}
Expand Down Expand Up @@ -180,7 +180,7 @@ SILE aims to conform with the W3G document “Requirements for Japanese Text Lay
Breaking rules \em{(kinzoku shori)} and intercharacter spacing is fully supported on selecting the Japanese language.
The easiest way to set up the other elements of Japanese typesetting such as the \em{hanmen} grid and optional vertical typesetting support is by using the \autodoc:class{jplain} or \autodoc:class{jbook} classes.
For other languages with similar layout requirements, more generic \autodoc:class{tplain} and \autodoc:class{tbook} classes are available that setup the layout elements without also setting the default language and font to Japanese specific values.
These are also good condidates to use as base classes and extend for more language-specific classes.
These are also good candidates to use as base classes and extend for more language-specific classes.

\package-documentation{hanmenkyoshi}

Expand Down
2 changes: 1 addition & 1 deletion documentation/c10-classdesign.sil
Expand Up @@ -169,7 +169,7 @@ end

\subsection{Defining raw handlers}

“Raw handlers” allow packages to register new handlers (or callbacks) for use with the \autodoc:environment{raw} environment, which content is read as-is by SILE, without being interpretated.
“Raw handlers” allow packages to register new handlers (or callbacks) for use with the \autodoc:environment{raw} environment, which content is read as-is by SILE, without being interpreted.
This is intended for advanced use cases where you may want to provide a way for users to embed arbitrary content (likely in another syntax), and you will provide the complete parsing and handling for it.\footnote{%
This may be used to implement a “clever” verbatim environment.
It is also used, for instance, by the \strong{markdown.sile} 3rd-party collection to embed Markdown or Djot content directly in a (SIL or XML) document.}
Expand Down
8 changes: 4 additions & 4 deletions documentation/c11-inputoutput.sil
Expand Up @@ -75,7 +75,7 @@ We must code up a few real functions now.
\subsection{Content appropriation}

What we first need is to tell SILE how to choose our inputter when it is given a file in our input format.
The \code{appropriate()} method of our inputter is reponsible for providing the corresponding logic.
The \code{appropriate()} method of our inputter is responsible for providing the corresponding logic.
It is a static method (so it does not have a \code{self} argument), and it takes up to three arguments:
\begin{itemize}
\item{the round, an integer between 1 and 3.}
Expand All @@ -87,10 +87,10 @@ It is expected to return a boolean value, \code{true} if this handler is appropr
Earlier, we said that inputters were checked in their priority order.
This was not fully complete.
Let’s add another piece to our puzzle: Inputters are actually checked orderly indeed, but three times.
This allows for quick compatiblitity checks to supercede resource-intensive ones.
This allows for quick compatiblitity checks to supersede resource-intensive ones.
\begin{itemize}
\item{Round 1 expects the file name to be checked: for instance, we could base our decision on recognized file extensions.}
\item{Round 2 expects some portion of the content string to be checked: for instance, we could base our decision on sniffing for some sequence of characters expected to occurr early in the document (or any other content inspection strategy).}
\item{Round 2 expects some portion of the content string to be checked: for instance, we could base our decision on sniffing for some sequence of characters expected to occur early in the document (or any other content inspection strategy).}
\item{Round 3 expects the entire content to be successfully parsed.}
\end{itemize}

Expand Down Expand Up @@ -178,7 +178,7 @@ In particular, options passed to the \autodoc:command{\include} commands are pas

Outputters usually live somewhere in the \code{outputters/} subdirectory of either where your first input file is located, your current working directory, or your SILE path.

All ouput handlers inherit from a \autodoc:package{base} outputter.
All output handlers inherit from a \autodoc:package{base} outputter.
It is an abstract class, providing just one concrete method, and defining a bunch of methods that any actual outputter has to override for the specifics of its target format.

We first need to declare the name of our new outputter, as well as the default file extension for the output file, which will be appended to the base name of the main input file if the user does not provide an explicit output file name on their command line.
Expand Down
2 changes: 1 addition & 1 deletion documentation/c12-xmlproc.sil
Expand Up @@ -10,7 +10,7 @@ Since DocDook itself doesn’t specify anything about presentation such as paper
When you use the \code{-c docbook} command line option to SILE, SILE will use the \autodoc:class{docbook} class in spite of any document declaration.
In addition, options such as paper size could be set; for example, \code{-O papersize=legal}.

The class initalization for DocBoox isn’t too fancy; it just loads up a couple packages that will get used later.
The class initialization for DocBoox isn’t too fancy; it just loads up a couple packages that will get used later.

\begin{autodoc:note}
Much of the example code in this chapter is in SIL format using macros.
Expand Down
2 changes: 1 addition & 1 deletion inputters/base.lua
Expand Up @@ -23,7 +23,7 @@ function inputter:classInit (options)
class = constructor._name
end
class = SILE.input.class or class or options.class or "plain"
options.class = nil -- don't pass already consumed class option to contstructor
options.class = nil -- don't pass already consumed class option to constructor
constructor = self._docclass or constructor or SILE.require(class, "classes", true)
if constructor.id then
SU.deprecated("std.object", "pl.class", "0.13.0", "0.14.0", string.format(_deprecated, constructor.id))
Expand Down
2 changes: 1 addition & 1 deletion outputters/debug.lua
Expand Up @@ -15,7 +15,7 @@ local function _round (input)
-- just enough to fix the bias so our test suite works across interpreters.
-- Note that even a true rounding function here will fail because the bias is
-- inherent to the floating point type. Also note we are erroring in favor of
-- the *less* common option beacuse the LuaJIT VMS are hopelessly broken
-- the *less* common option because the LuaJIT VMS are hopelessly broken
-- whereas normal LUA VMs can be cooerced.
if input > 0 then input = input + .00000000000001 end
if input < 0 then input = input - .00000000000001 end
Expand Down
2 changes: 1 addition & 1 deletion outputters/libtexpdf.lua
Expand Up @@ -42,7 +42,7 @@ function outputter:newPage ()
pdf.beginpage()
end

-- pdf stucture package needs a tie in here
-- pdf structure package needs a tie in here
function outputter._endHook (_)
end

Expand Down
2 changes: 1 addition & 1 deletion packages/autodoc/init.lua
Expand Up @@ -356,7 +356,7 @@ function package:registerCommands ()
SILE.call("novbreak")
SILE.call("fullrule", { thickness = "0.5pt" })
SILE.call("novbreak")
end, "Ouputs a line used for surrounding code blocks (somewhat internal)")
end, "Outputs a line used for surrounding code blocks (somewhat internal)")

self:registerCommand("autodoc:example", function(_, content)
-- Loosely derived from the \examplefont command from the original SILE manual...
Expand Down
2 changes: 1 addition & 1 deletion packages/leaders/init.lua
Expand Up @@ -75,7 +75,7 @@ function leader:outputYourself (typesetter, line)
end
end
-- Return to our start (saved) position and move to the full leaders width.
-- (So we are sure to safely get the correct width, whathever we did above
-- (So we are sure to safely get the correct width, whatever we did above
-- with the remainder space and the leader repetitions).
typesetter.frame.state.cursorX = ox
typesetter.frame.state.cursorY = oy
Expand Down
2 changes: 1 addition & 1 deletion packages/lists/init.lua
Expand Up @@ -102,7 +102,7 @@ function package:doItem (options, content)

local stepback
if enumStyle.display then
-- The positionning is quite tentative... LaTeX would right justify the
-- The positioning is quite tentative... LaTeX would right justify the
-- number (at least for roman numerals), i.e.
-- i. Text
-- ii. Text
Expand Down

0 comments on commit b75b51e

Please sign in to comment.