Skip to content

Commit

Permalink
Merge branch 'sile-typesetter:master' into numbered_equations
Browse files Browse the repository at this point in the history
  • Loading branch information
leorosa authored Aug 23, 2023
2 parents faaaf0c + fa84d15 commit a42c9c6
Show file tree
Hide file tree
Showing 30 changed files with 472 additions and 182 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install fonts-sil-gentiumplus libarchive-tools libfontconfig1-dev libharfbuzz-dev libicu-dev liblua5.3-dev libpng-dev lua5.3 lua-sec lua-socket lua-zlib-dev luarocks poppler-utils
sudo apt-get install fonts-sil-gentiumplus ghostscript graphviz libarchive-tools libfontconfig1-dev libharfbuzz-dev libicu-dev liblua5.3-dev libpng-dev lua5.3 lua-sec lua-socket lua-zlib-dev luarocks poppler-utils
- name: Configure
run: |
./bootstrap.sh
Expand All @@ -55,7 +55,7 @@ jobs:
path: sile-${{ env.VERSION }}.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
if: github.repository == 'sile-typesetter/sile' && startsWith(github.ref, 'refs/tags/v')
with:
body_path: sile-${{ env.VERSION }}.md
files: |
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.14.11](https://github.com/sile-typesetter/sile/compare/v0.14.10...v0.14.11) (2023-08-23)


### Bug Fixes

* **core:** Leave legacy masterFilename alone but use first input filename internally ([29667a7](https://github.com/sile-typesetter/sile/commit/29667a752181dd40abe18672f6175fe10a9c5546))
* **core:** Make masterFilename actually a filename ([759131e](https://github.com/sile-typesetter/sile/commit/759131e6c87517b56a433dccde29658dbe6df023))
* **packages:** Avoid mix-and-matching indents in fixed-width specimin blocks ([de41cac](https://github.com/sile-typesetter/sile/commit/de41cac06a911e7c56f0ba4d1248a6da5999e6f3))
* **utilities:** Use real semver parser for deprecation warnings ([5f0fed5](https://github.com/sile-typesetter/sile/commit/5f0fed51b2a9597272da62f00c15f8836f8c7bd1))

## [0.14.10](https://github.com/sile-typesetter/sile/compare/v0.14.9...v0.14.10) (2023-07-11)


### Features

* **cli:** Allow more than one input document ([d20cbd8](https://github.com/sile-typesetter/sile/commit/d20cbd8a0b7a197ca87ca1dd1a39640fa746e301))
* **i18n:** Add localized strings for Cantonese and Chinese ([cb67d36](https://github.com/sile-typesetter/sile/commit/cb67d3686117258adaca546298063d23c66135f9))
* **packages:** Add document class styling in autodoc ([e70fa50](https://github.com/sile-typesetter/sile/commit/e70fa509673c32977a1e1f0545373229198c8aa8))
* **packages:** Provide API for registering raw handlers linked to packages ([45cd3ac](https://github.com/sile-typesetter/sile/commit/45cd3ac96acbe3f2dd572ce0c3c72c7599090e6b))


### Bug Fixes

* **build:** Avoid build artifacts being listed for installation ([29c2ccd](https://github.com/sile-typesetter/sile/commit/29c2ccd227774caa4accb90bb0d23825aafccfd1))
* **core:** Avoid stack overflow in Harfbuzz module ([#1793](https://github.com/sile-typesetter/sile/issues/1793)) ([5001efe](https://github.com/sile-typesetter/sile/commit/5001efe0cfeb421ce5796f8303bf046bb68c8326))
* **outputters:** Setup --makedeps to play along without explicit --output ([6ff2e16](https://github.com/sile-typesetter/sile/commit/6ff2e16f24224bc2781edc38be8cb9e1418fb30e))
* **packages:** Converters package no longer worked after 0.13.0 ([433795c](https://github.com/sile-typesetter/sile/commit/433795c3979688469a098a9966a595a4b0d34818))
* **packages:** Correct chord line height and chord font use ([65961c6](https://github.com/sile-typesetter/sile/commit/65961c6629244817220bac8a6f386a9a738b7f0b)), closes [#1351](https://github.com/sile-typesetter/sile/issues/1351)

## [0.14.9](https://github.com/sile-typesetter/sile/compare/v0.14.8...v0.14.9) (2023-04-11)


Expand Down
11 changes: 10 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,18 @@ TESTPREVIEWS ?= $(addsuffix .pdf,$(basename $(filter-out $(_DISABLEDSRCS),$(_TES
# BUILT_SOURCES and EXTRA_DIST) this doesn't induce a race.
include $(wildcard Makefile-distfiles)

FIGURES = documentation/fig-input-to-output.pdf

MANUAL := documentation/sile.pdf
SILE := $(PACKAGE_NAME)

if MANUAL
_MANUAL = $(MANUAL)

endif

$(MANUAL): $(FIGURES)

nobase_dist_pkgdata_DATA = $(SILEDATA) $(LUALIBRARIES)
nobase_nodist_pkgdata_DATA = core/features.lua core/pathsetup.lua core/version.lua $(LUAMODULES)
dist_man_MANS = sile.1
Expand All @@ -62,7 +67,7 @@ EXTRA_DIST += build-aux/action-updater.js build-aux/decore-automake.sh build-aux
EXTRA_DIST += Dockerfile build-aux/docker-bootstrap.sh build-aux/docker-fontconfig.conf hooks/build
EXTRA_DIST += default.nix flake.nix flake.lock shell.nix
EXTRA_DIST += package.json # imported by both Nix and Docker
EXTRA_DIST += $(MANUAL)
EXTRA_DIST += $(MANUAL) $(FIGURES)

BUILT_SOURCES = .version core/features.lua core/pathsetup.lua core/version.lua Makefile-distfiles

Expand Down Expand Up @@ -196,6 +201,10 @@ patterndeps = $(_FORCED) $(_TEST_DEPS) $(_DOCS_DEPS) | $(DEPDIRS) $(LUAMODLOCK)
%.pdf: %.nil $$(patterndeps)
$(runsile)

%.pdf: %.dot
$(DOT) -Tpdf $< -o $@.gs
$(GS) -q -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -o $@ $@.gs

.PHONY: force
force: ;

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
default: ""
runs:
using: docker
image: docker://ghcr.io/sile-typesetter/sile:v0.14.9
image: docker://ghcr.io/sile-typesetter/sile:v0.14.11
entrypoint: sh
args:
- -c
Expand Down
6 changes: 3 additions & 3 deletions classes/base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,9 @@ function class:finish ()
end
SILE.typesetter:runHooks("pageend") -- normally run by the typesetter
self:endPage()
if SILE.typesetter then
assert(SILE.typesetter:isQueueEmpty(), "queues not empty")
end
if SILE.typesetter then
assert(SILE.typesetter:isQueueEmpty(), "queues not empty")
end
SILE.outputter:finish()
self:runHooks("finish")
end
Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ AM_COND_IF([DEPENDENCY_CHECKS], [
AX_FONT(Gentium Plus)
AM_COND_IF([MANUAL], [
AC_PATH_PROG([DOT], [dot])
AC_PATH_PROG([GS], [gs])
])
AC_PATH_PROG([PDFINFO], [pdfinfo])
AC_MSG_CHECKING([for OS X])
Expand Down
2 changes: 1 addition & 1 deletion core/makedeps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ local makeDeps = {
write = function (self)
self:add_modules()
if type(self.filename) ~= "string" then
self.filename = SILE.masterFilename .. ".d"
self.filename = pl.path.splitext(SILE.input.filenames[1]) .. ".d"
end
local depfile, err = io.open(self.filename, "w")
if not depfile then return SU.error(err) end
Expand Down
14 changes: 6 additions & 8 deletions core/sile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function SILE.processString (doc, format, filename, options)
-- a specific inputter to use, use it at the exclusion of all content type
-- detection
local inputter
if filename and pl.path.splitext(pl.path.normcase(filename)) == SILE.masterFilename and SILE.inputter then
if filename and pl.path.normcase(pl.path.normpath(filename)) == pl.path.normcase(SILE.input.filenames[1]) and SILE.inputter then
inputter = SILE.inputter
else
format = format or detectFormat(doc, filename)
Expand All @@ -301,7 +301,7 @@ function SILE.processString (doc, format, filename, options)
inputter = SILE.inputters[format](options)
-- If we did content detection *and* this is the master file, save the
-- inputter for posterity and postambles
if filename and pl.path.splitext(pl.path.normcase(filename)) == SILE.masterFilename then
if filename and pl.path.normcase(filename) == pl.path.normcase(SILE.input.filenames[1]:gsub("^-$", "STDIN")) then
SILE.inputter = inputter
end
end
Expand All @@ -315,17 +315,15 @@ function SILE.processFile (filename, format, options)
local doc
if filename == "-" then
filename = "STDIN"
SILE.masterFilename = "STDIN"
doc = io.stdin:read("*a")
else
-- Turn slashes around in the event we get passed a path from a Windows shell
filename = filename:gsub("\\", "/")
if not SILE.masterFilename then
-- Strip extension
SILE.masterFilename = string.match(filename, "(.+)%..-$") or filename
SILE.masterFilename = pl.path.splitext(pl.path.normpath(filename))
end
if SILE.masterFilename and not SILE.masterDir then
SILE.masterDir = SILE.masterFilename:match("(.-)[^%/]+$")
if SILE.input.filenames[1] and not SILE.masterDir then
SILE.masterDir = pl.path.dirname(SILE.input.filenames[1])
end
if SILE.masterDir and SILE.masterDir:len() >= 1 then
_G.extendSilePath(SILE.masterDir)
Expand Down Expand Up @@ -463,7 +461,7 @@ function SILE.finish ()
end
if SU.debugging("profile") then
ProFi:stop()
ProFi:writeReport(SILE.masterFilename..'.profile.txt')
ProFi:writeReport(pl.path.splitext(SILE.input.filenames[1]) .. '.profile.txt')
end
if SU.debugging("versions") then
SILE.shaper:debugVersions()
Expand Down
10 changes: 6 additions & 4 deletions core/utilities.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local bitshim = require("bitshim")
local luautf8 = require("lua-utf8")
local semver = require("semver")

local utilities = {}

Expand Down Expand Up @@ -89,18 +90,19 @@ utilities.gtoke = function (string, pattern)
end

utilities.deprecated = function (old, new, warnat, errorat, extra)
warnat, errorat = semver(warnat or 0), semver(errorat or 0)
local current = SILE.version and semver(SILE.version:match("v([0-9]*.[0-9]*.[0-9]*)")) or warnat
-- SILE.version is defined *after* most of SILE loads. It’s available at
-- 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.
local brackets = old:sub(1,1) == '\\' and "" or "()"
local _semver = SILE.version and SILE.version:match("v([0-9]*.[0-9]*.[0-9]*)") or warnat
local _new = new and "Please use " .. (new .. brackets) .. " instead." or "Plase don't use it."
local msg = (old .. brackets) .. " was deprecated in SILE v" .. warnat .. ". " .. _new .. (extra and "\n" .. extra .. "\n\n" or "")
if errorat and _semver >= errorat then
local msg = (old .. brackets) .. " was deprecated in SILE v" .. tostring(warnat) .. ". " .. _new .. (extra and "\n" .. extra .. "\n\n" or "")
if errorat and current >= errorat then
SU.error(msg)
elseif warnat and _semver >= warnat then
elseif warnat and current >= warnat then
SU.warn(msg)
end
end
Expand Down
Loading

0 comments on commit a42c9c6

Please sign in to comment.