diff --git a/.husky/commit-msg b/.husky/commit-msg
index b56767669..91b60d544 100755
--- a/.husky/commit-msg
+++ b/.husky/commit-msg
@@ -1,4 +1,3 @@
#!/usr/bin/env sh
-. "$(dirname -- "$0")/_/husky.sh"
npx --no -- commitlint --edit "$1"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 29aee0ab7..1243b3d84 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,25 @@
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
+## [0.15.9](https://github.com/sile-typesetter/sile/compare/v0.15.8...v0.15.9) (2025-01-04)
+
+
+### New Features
+
+* **outputters:** Add a method to handle empty PDFs vs. cleanup after error ([5a7694d](https://github.com/sile-typesetter/sile/commit/5a7694dfff369c820e1c5ef79336776efc6cf645))
+
+
+### Bug Fixes
+
+* **build:** Bundle XML and CSL resources with bibtex package ([#2201](https://github.com/sile-typesetter/sile/issues/2201)) ([73ffcd5](https://github.com/sile-typesetter/sile/commit/73ffcd537954175d30d0e0114389bbbc70db9482))
+* **build:** Correct dependencies in non-embedded mode ([5805cd4](https://github.com/sile-typesetter/sile/commit/5805cd47abb89eef1b27b411341b4599b7622813))
+* **build:** Re-organize rules so sources don't have platform detection artifacts ([15a20e0](https://github.com/sile-typesetter/sile/commit/15a20e034c10f31af8316aec75829a0febe0ffc0))
+* **build:** Set correct final permissions on intermediary shell completion artifacts ([a3de042](https://github.com/sile-typesetter/sile/commit/a3de0423417101e204bd584c4e7865b4568e9bdd))
+* **classes:** Avoid assuming legacy script tags will return a table ([d596d53](https://github.com/sile-typesetter/sile/commit/d596d5312dd9300dc9eb21c4b19d9827553cb633))
+* **deps:** Bump luautf8 dependency to restore building against latest LuaJIT ([206f4b7](https://github.com/sile-typesetter/sile/commit/206f4b72e839b799c4f6f901dc47a8ddf117a14e))
+* **docker:** Package bootstrap script so Docker images can be built from source tarballs ([15a18c0](https://github.com/sile-typesetter/sile/commit/15a18c0a4749d76190d0ecf4818f1221b4bba220))
+* **packages:** CSL subsequent-author-substitute is optional ([680df8c](https://github.com/sile-typesetter/sile/commit/680df8cf4cb8038b034a564269687b13efae9cbb))
+
## [0.15.8](https://github.com/sile-typesetter/sile/compare/v0.15.7...v0.15.8) (2024-12-12)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f362b3ba..037abcc05 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -210,7 +210,7 @@ target_link_options(svg PUBLIC /EXPORT:luaopen_svg)
set(LUA "luajit.exe")
set(SILE_PATH "debug.getinfo(1, 'S').source:match('@?.*[/\\\\]') or '.'")
set(SILE_LIB_PATH "debug.getinfo(1, 'S').source:match('@?.*[/\\\\]') or '.'")
-set(SHARED_LIB_EXT "dll")
+set(LIBEXT "dll")
configure_file(sile.in sile.lua)
if (WIN32)
diff --git a/Cargo.lock b/Cargo.lock
index 2b1b40eeb..4dd6e4391 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -86,9 +86,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.94"
+version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7"
+checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
[[package]]
name = "arc-swap"
@@ -125,9 +125,9 @@ dependencies = [
[[package]]
name = "bstr"
-version = "1.11.1"
+version = "1.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "786a307d683a5bf92e6fd5fd69a7eb613751668d1d8d67d802846dfe367c62c8"
+checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0"
dependencies = [
"memchr",
"regex-automata",
@@ -168,9 +168,9 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.2.3"
+version = "1.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d"
+checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7"
dependencies = [
"shlex",
]
@@ -206,9 +206,9 @@ dependencies = [
[[package]]
name = "clap_complete"
-version = "4.5.38"
+version = "4.5.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01"
+checksum = "ac2e663e3e3bed2d32d065a8404024dad306e699a04263ec59919529f803aee9"
dependencies = [
"clap",
]
@@ -551,6 +551,17 @@ dependencies = [
"version_check",
]
+[[package]]
+name = "getrandom"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi",
+]
+
[[package]]
name = "gix"
version = "0.68.0"
@@ -674,9 +685,9 @@ dependencies = [
[[package]]
name = "gix-date"
-version = "0.9.2"
+version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "691142b1a34d18e8ed6e6114bc1a2736516c5ad60ef3aa9bd1b694886e3ca92d"
+checksum = "c57c477b645ee248b173bb1176b52dd528872f12c50375801a58aaf5ae91113f"
dependencies = [
"bstr",
"itoa",
@@ -733,9 +744,9 @@ dependencies = [
[[package]]
name = "gix-fs"
-version = "0.12.0"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34740384d8d763975858fa2c176b68652a6fcc09f616e24e3ce967b0d370e4d8"
+checksum = "3b3d4fac505a621f97e5ce2c69fdc425742af00c0920363ca4074f0eb48b1db9"
dependencies = [
"fastrand",
"gix-features",
@@ -816,9 +827,9 @@ dependencies = [
[[package]]
name = "gix-object"
-version = "0.46.0"
+version = "0.46.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65d93e2bbfa83a307e47f45e45de7b6c04d7375a8bd5907b215f4bf45237d879"
+checksum = "e42d58010183ef033f31088479b4eb92b44fe341b35b62d39eb8b185573d77ea"
dependencies = [
"bstr",
"gix-actor",
@@ -826,6 +837,7 @@ dependencies = [
"gix-features",
"gix-hash",
"gix-hashtable",
+ "gix-path",
"gix-utils",
"gix-validate",
"itoa",
@@ -899,9 +911,9 @@ dependencies = [
[[package]]
name = "gix-ref"
-version = "0.49.0"
+version = "0.49.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1eae462723686272a58f49501015ef7c0d67c3e042c20049d8dd9c7eff92efde"
+checksum = "a91b61776c839d0f1b7114901179afb0947aa7f4d30793ca1c56d335dfef485f"
dependencies = [
"gix-actor",
"gix-features",
@@ -934,9 +946,9 @@ dependencies = [
[[package]]
name = "gix-revision"
-version = "0.31.0"
+version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44488e0380847967bc3e3cacd8b22652e02ea1eb58afb60edd91847695cd2d8d"
+checksum = "61e1ddc474405a68d2ce8485705dd72fe6ce959f2f5fe718601ead5da2c8f9e7"
dependencies = [
"bitflags 2.6.0",
"bstr",
@@ -1000,9 +1012,9 @@ checksum = "04bdde120c29f1fc23a24d3e115aeeea3d60d8e65bab92cc5f9d90d9302eb952"
[[package]]
name = "gix-traverse"
-version = "0.43.0"
+version = "0.43.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ff2ec9f779680f795363db1c563168b32b8d6728ec58564c628e85c92d29faf"
+checksum = "6ed47d648619e23e93f971d2bba0d10c1100e54ef95d2981d609907a8cabac89"
dependencies = [
"bitflags 2.6.0",
"gix-commitgraph",
@@ -1017,13 +1029,14 @@ dependencies = [
[[package]]
name = "gix-url"
-version = "0.28.1"
+version = "0.28.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e09f97db3618fb8e473d7d97e77296b50aaee0ddcd6a867f07443e3e87391099"
+checksum = "d096fb733ba6bd3f5403dba8bd72bdd8809fe2b347b57844040b8f49c93492d9"
dependencies = [
"bstr",
"gix-features",
"gix-path",
+ "percent-encoding",
"thiserror",
"url",
]
@@ -1094,11 +1107,11 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "home"
-version = "0.5.9"
+version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
+checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
dependencies = [
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -1269,11 +1282,15 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
[[package]]
name = "jiff"
-version = "0.1.15"
+version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db69f08d4fb10524cacdb074c10b296299d71274ddbc830a8ee65666867002e9"
+checksum = "943611a469f78ab9afdac9022e473a80fca16a9deca6c5be3eb566d872231e76"
dependencies = [
"jiff-tzdb-platform",
+ "log",
+ "portable-atomic",
+ "portable-atomic-util",
+ "serde",
"windows-sys 0.59.0",
]
@@ -1294,9 +1311,9 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.168"
+version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
+checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "libredox"
@@ -1373,9 +1390,9 @@ dependencies = [
[[package]]
name = "miniz_oxide"
-version = "0.8.0"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394"
dependencies = [
"adler2",
]
@@ -1489,6 +1506,21 @@ version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+[[package]]
+name = "portable-atomic"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6"
+
+[[package]]
+name = "portable-atomic-util"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507"
+dependencies = [
+ "portable-atomic",
+]
+
[[package]]
name = "powerfmt"
version = "0.2.0"
@@ -1538,9 +1570,9 @@ dependencies = [
[[package]]
name = "quote"
-version = "1.0.37"
+version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
@@ -1591,7 +1623,7 @@ checksum = "88f8660c1ff60292143c98d08fc6e2f654d722db50410e3f3797d40baaf9d8f3"
[[package]]
name = "rusile"
-version = "0.15.8"
+version = "0.15.9"
dependencies = [
"mlua",
"sile",
@@ -1662,9 +1694,9 @@ dependencies = [
[[package]]
name = "rustversion"
-version = "1.0.18"
+version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
+checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
[[package]]
name = "ryu"
@@ -1689,27 +1721,27 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "semver"
-version = "1.0.23"
+version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
+checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba"
dependencies = [
"serde",
]
[[package]]
name = "serde"
-version = "1.0.216"
+version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
+checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.216"
+version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
+checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
dependencies = [
"proc-macro2",
"quote",
@@ -1718,9 +1750,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.133"
+version = "1.0.134"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
+checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d"
dependencies = [
"itoa",
"memchr",
@@ -1772,7 +1804,7 @@ dependencies = [
[[package]]
name = "sile"
-version = "0.15.8"
+version = "0.15.9"
dependencies = [
"anyhow",
"clap",
@@ -1827,9 +1859,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
-version = "2.0.90"
+version = "2.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
+checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3"
dependencies = [
"proc-macro2",
"quote",
@@ -1849,12 +1881,13 @@ dependencies = [
[[package]]
name = "tempfile"
-version = "3.14.0"
+version = "3.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
+checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704"
dependencies = [
"cfg-if",
"fastrand",
+ "getrandom",
"once_cell",
"rustix",
"windows-sys 0.59.0",
@@ -1872,18 +1905,18 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "2.0.6"
+version = "2.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47"
+checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "2.0.6"
+version = "2.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312"
+checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4"
dependencies = [
"proc-macro2",
"quote",
@@ -1935,9 +1968,9 @@ dependencies = [
[[package]]
name = "tinyvec"
-version = "1.8.0"
+version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938"
+checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8"
dependencies = [
"tinyvec_macros",
]
@@ -2062,6 +2095,12 @@ dependencies = [
"winapi-util",
]
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
[[package]]
name = "which"
version = "6.0.3"
@@ -2189,9 +2228,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winnow"
-version = "0.6.20"
+version = "0.6.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b"
+checksum = "e6f5bb5257f2407a5425c6e749bfd9692192a73e70a6060516ac04f889087d68"
dependencies = [
"memchr",
]
diff --git a/Cargo.toml b/Cargo.toml
index 79b71126b..f3e98b167 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,10 +3,10 @@ name = "sile"
description = "Simon’s Improved Layout Engine"
readme = "README.md"
build = "build-aux/build.rs"
-version = "0.15.8"
+version = "0.15.9"
[workspace.package]
-version = "0.15.8"
+version = "0.15.9"
edition = "2021"
rust-version = "1.71.0"
authors = [
@@ -73,7 +73,7 @@ features = ["anyhow"]
[workspace.dependencies.sile]
path = "."
-version = "0.15.8"
+version = "0.15.9"
[dependencies.anyhow]
version = "1.0"
diff --git a/Makefile.am b/Makefile.am
index 19ba5b72f..64b25523e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -59,6 +59,7 @@ BUILT_SOURCES_LUA = core/features.lua core/pathsetup.lua core/version.lua
bin_PROGRAMS = sile
bin_SCRIPTS = sile-lua
+pkglib_LIBRARIES =
nodist_man_MANS =
dist_man_MANS = sile-lua.1
sile_SOURCES = src/bin/sile.rs src/lib.rs src/cli.rs src/types.rs src/types/semver.rs
@@ -72,7 +73,7 @@ dist_pdf_DATA = $(_MANUAL)
dist_license_DATA = LICENSE.md
EXTRA_DIST = spec tests documentation sile-dev-1.rockspec rusile-dev-1.rockspec fontconfig.conf
EXTRA_DIST += build-aux/action-updater.js build-aux/cargo-updater.js build-aux/config.ld build-aux/decore-automake.sh build-aux/git-version-gen
-EXTRA_DIST += Dockerfile build-aux/docker-bootstrap.sh build-aux/docker-fontconfig.conf hooks/build
+EXTRA_DIST += Dockerfile bootstrap.sh build-aux/docker-bootstrap.sh build-aux/docker-fontconfig.conf hooks/build
EXTRA_DIST += build-aux/xml-entities-to-lua.xsl
EXTRA_DIST += default.nix flake.nix flake.lock shell.nix build-aux/pkg.nix
EXTRA_DIST += package.json # imported by both Nix and Docker
@@ -133,9 +134,6 @@ $(CARGO_BIN): justenough/.libs/justenoughicu.a
$(CARGO_BIN): justenough/.libs/justenoughlibtexpdf.a
$(CARGO_BIN): justenough/.libs/svg.a
$(CARGO_BIN): libtexpdf/.libs/libtexpdf.a
-if !EMBEDDED_RESOURCES
-$(CARGO_BIN): rusile.$(SHARED_LIB_EXT)
-endif !EMBEDDED_RESOURCES
src/embed-includes.rs: Makefile-distfiles
{
@@ -153,7 +151,10 @@ src/embed.rs: src/embed.rs.in src/embed-includes.rs
-e '/@EMBEDDED_INCLUDE_LIST@/r $(word 2,$^)' \
-e '/@EMBEDDED_INCLUDE_LIST@/d' \
$< > $@
-endif EMBEDDED_RESOURCES
+
+else !EMBEDDED_RESOURCES
+$(CARGO_BIN): $(pkglib_LIBRARIES)
+endif !EMBEDDED_RESOURCES
if LUAJIT
MLUAVER = luajit
@@ -268,13 +269,13 @@ _DOCS_DEPS = $(and $$(filter documentation/%,$@),$(addprefix .fonts/,$(DOCSFONTF
_SUBDIR_TELLS =
if SHARED
-_SUBDIR_TELLS += justenough/.libs/fontmetrics.$(SHARED_LIB_EXT) \
- justenough/.libs/justenoughfontconfig.$(SHARED_LIB_EXT) \
- justenough/.libs/justenoughharfbuzz.$(SHARED_LIB_EXT) \
- justenough/.libs/justenoughicu.$(SHARED_LIB_EXT) \
- justenough/.libs/justenoughlibtexpdf.$(SHARED_LIB_EXT) \
- justenough/.libs/svg.$(SHARED_LIB_EXT) \
- libtexpdf/.libs/libtexpdf.$(SHARED_LIB_EXT).0.0.0
+_SUBDIR_TELLS += justenough/.libs/fontmetrics$(LIBEXT) \
+ justenough/.libs/justenoughfontconfig$(LIBEXT) \
+ justenough/.libs/justenoughharfbuzz$(LIBEXT) \
+ justenough/.libs/justenoughicu$(LIBEXT) \
+ justenough/.libs/justenoughlibtexpdf$(LIBEXT) \
+ justenough/.libs/svg$(LIBEXT) \
+ libtexpdf/.libs/libtexpdf$(LIBEXT).0.0.0
endif
if STATIC
@@ -382,10 +383,10 @@ typos:
busted: $(SILELUA) $(addprefix .fonts/,$(TESTFONTFILES)) $(BUSTEDSPECS)
set -f; IFS=';'
packagepath=(./{,lua-libraries/}?{,/init}.lua)
- packagecpath=(./{,core/,{libtexpdf,justenough}/.libs/}?.$(SHARED_LIB_EXT))
+ packagecpath=(./{,core/,{libtexpdf,justenough}/.libs/}?$(LIBEXT))
if !SYSTEM_LUAROCKS
packagepath+=(./lua_modules/share/lua/$(LUA_VERSION)/?{,/init}.lua)
- packagecpath+=(./lua_modules/lib/lua/$(LUA_VERSION)/?.$(SHARED_LIB_EXT))
+ packagecpath+=(./lua_modules/lib/lua/$(LUA_VERSION)/?$(LIBEXT))
endif
# Note: Busted tests can't run with out static build since the Rusile module is
# only available embedded into it. We can test on the dynamic builds where it
diff --git a/action.yml b/action.yml
index ea4dbbf86..e0c30dc2e 100644
--- a/action.yml
+++ b/action.yml
@@ -7,7 +7,7 @@ inputs:
default: ""
runs:
using: docker
- image: docker://ghcr.io/sile-typesetter/sile:v0.15.8
+ image: docker://ghcr.io/sile-typesetter/sile:v0.15.9
entrypoint: sh
args:
- -c
diff --git a/bootstrap.sh b/bootstrap.sh
index 2bb636c3a..f305cca6b 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -47,13 +47,4 @@ touch aminclude.am
autoreconf --install
-# See discussion in https://github.com/sile-typesetter/sile/issues/82 and
-# https://web.archive.org/web/20170111053341/http://blog.gaku.net/autoconf/
-case $(uname) in
- Darwin*)
- glibtoolize -W none
- autoreconf --force -W none
- ;;
-esac
-
build-aux/decore-automake.sh
diff --git a/build-aux/list-distfiles.sh.in b/build-aux/list-distfiles.sh.in
index 451dece6c..b785edee3 100755
--- a/build-aux/list-distfiles.sh.in
+++ b/build-aux/list-distfiles.sh.in
@@ -20,7 +20,9 @@ printf '%s =' SILEDATA
finder core -name '*.lua' -not -name '*_spec.lua' -not -name 'version.lua' -not -name 'features.lua' -not -name 'pathsetup.lua'
finder classes inputters languages outputters packages shapers types typesetters pagebuilders -name '*.lua' -not -name '*_spec.lua'
finder classes languages packages -name '*.ftl'
+finder packages -name '*.csl'
finder packages -name '*.svg'
+finder packages -name '*.xml'
printf '\n\n%s =' LUALIBRARIES
finder lua-libraries -name '*.lua'
diff --git a/build-aux/que_libext.m4 b/build-aux/que_libext.m4
new file mode 100644
index 000000000..f1ff2b16a
--- /dev/null
+++ b/build-aux/que_libext.m4
@@ -0,0 +1,18 @@
+dnl Note: requires AC_CANONICAL_TARGET to run before AC_INIT
+AC_DEFUN_ONCE([QUE_LIBEXT], [
+ case $target_os in
+ darwin*)
+ LIBEXT=.dylib
+ ;;
+ cygwin*|mingw*)
+ LIBEXT=.dll
+ ;;
+ *)
+ LIBEXT=.so
+ ;;
+ esac
+ AM_CONDITIONAL([LIB_IS_SO], [test $LIBEXT = .so])
+ AM_CONDITIONAL([LIB_IS_DYLIB], [test $LIBEXT = .dylib])
+ AM_CONDITIONAL([LIB_IS_DLL], [test $LIBEXT = .dll])
+ AC_SUBST([LIBEXT])
+])
diff --git a/build-aux/que_rust_boilerplate.am b/build-aux/que_rust_boilerplate.am
index 26de4ef58..d95968f90 100644
--- a/build-aux/que_rust_boilerplate.am
+++ b/build-aux/que_rust_boilerplate.am
@@ -40,19 +40,19 @@ $(PACKAGE_NAME).1: $(CARGO_BIN)
$(INSTALL) -m644 $$(cat $(_RUST_OUT))/$@ $@
$(COMPLETIONS_OUT_DIR)/$(TRANSFORMED_PACKAGE_NAME): $(CARGO_BIN) | $(COMPLETIONS_OUT_DIR)
- $(INSTALL) -m755 $$(cat $(_RUST_OUT))/$(COMPLETIONS_OUT_DIR)/$(PACKAGE_NAME).bash $@
+ $(INSTALL) -m644 $$(cat $(_RUST_OUT))/$(COMPLETIONS_OUT_DIR)/$(PACKAGE_NAME).bash $@
$(COMPLETIONS_OUT_DIR)/$(TRANSFORMED_PACKAGE_NAME).elv: $(CARGO_BIN) | $(COMPLETIONS_OUT_DIR)
- $(INSTALL) -m755 $$(cat $(_RUST_OUT))/$(COMPLETIONS_OUT_DIR)/$(PACKAGE_NAME).elv $@
+ $(INSTALL) -m644 $$(cat $(_RUST_OUT))/$(COMPLETIONS_OUT_DIR)/$(PACKAGE_NAME).elv $@
$(COMPLETIONS_OUT_DIR)/$(TRANSFORMED_PACKAGE_NAME).fish: $(CARGO_BIN) | $(COMPLETIONS_OUT_DIR)
- $(INSTALL) -m755 $$(cat $(_RUST_OUT))/$(COMPLETIONS_OUT_DIR)/$(PACKAGE_NAME).fish $@
+ $(INSTALL) -m644 $$(cat $(_RUST_OUT))/$(COMPLETIONS_OUT_DIR)/$(PACKAGE_NAME).fish $@
$(COMPLETIONS_OUT_DIR)/_$(TRANSFORMED_PACKAGE_NAME).ps1: $(CARGO_BIN) | $(COMPLETIONS_OUT_DIR)
- $(INSTALL) -m755 $$(cat $(_RUST_OUT))/$(COMPLETIONS_OUT_DIR)/_$(PACKAGE_NAME).ps1 $@
+ $(INSTALL) -m644 $$(cat $(_RUST_OUT))/$(COMPLETIONS_OUT_DIR)/_$(PACKAGE_NAME).ps1 $@
$(COMPLETIONS_OUT_DIR)/_$(TRANSFORMED_PACKAGE_NAME): $(CARGO_BIN) | $(COMPLETIONS_OUT_DIR)
- $(INSTALL) -m755 $$(cat $(_RUST_OUT))/$(COMPLETIONS_OUT_DIR)/_$(PACKAGE_NAME) $@
+ $(INSTALL) -m644 $$(cat $(_RUST_OUT))/$(COMPLETIONS_OUT_DIR)/_$(PACKAGE_NAME) $@
$(_RUST_OUT) $(CARGO_BIN): $(@PACKAGE_VAR@_SOURCES) $(nodist_@PACKAGE_VAR@_SOURCES) $(EXTRA_@PACKAGE_VAR@_SOURCES)
set -e
diff --git a/build-aux/que_rust_boilerplate.m4 b/build-aux/que_rust_boilerplate.m4
index b9f63f802..f1fe47214 100644
--- a/build-aux/que_rust_boilerplate.m4
+++ b/build-aux/que_rust_boilerplate.m4
@@ -47,11 +47,13 @@ $($SED -E "s/@PACKAGE_VAR@/$PACKAGE_VAR/g;s/@PACKAGE_NAME@/$PACKAGE_NAME/g" buil
AC_DEFUN([QUE_RUST_MODULE], [
+ QUE_LIBEXT
AC_REQUIRE([AX_AM_MACROS])
+
AX_ADD_AM_MACRO([dnl
EXTRA_DIST += build-aux/que_rust_module.am
-$($SED -E "s/@MODULE@/$1/g;s/@SHARED_LIB_EXT@/$SHARED_LIB_EXT/g" build-aux/que_rust_module.am)
+$($SED -E "s/@MODULE@/$1/g" build-aux/que_rust_module.am)
])dnl
])
diff --git a/build-aux/que_rust_module.am b/build-aux/que_rust_module.am
index 708b6a12b..2760f99d8 100644
--- a/build-aux/que_rust_module.am
+++ b/build-aux/que_rust_module.am
@@ -1,8 +1,40 @@
-pkglib_LIBRARIES = @MODULE@.@SHARED_LIB_EXT@
-@MODULE@_@SHARED_LIB_EXT@_SOURCES = @MODULE@/Cargo.toml @MODULE@/src/lib.rs build-aux/module.rs
+@MODULE@_srcs = @MODULE@/Cargo.toml @MODULE@/src/lib.rs @MODULE@/build.rs
-@builddir@/target/@RUST_TARGET_SUBDIR@/lib@MODULE@.@SHARED_LIB_EXT@: $(@MODULE@_@SHARED_LIB_EXT@_SOURCES)
+if LIB_IS_SO
+pkglib_LIBRARIES += rusile.so
+@MODULE@_so_SOURCES = $(@MODULE@_srcs)
+endif
+
+if LIB_IS_DYLIB
+pkglib_LIBRARIES += rusile.dylib
+@MODULE@_dylib_SOURCES = $(@MODULE@_srcs)
+endif
+
+if LIB_IS_DLL
+pkglib_LIBRARIES += rusile.dll
+@MODULE@_dll_SOURCES = $(@MODULE@_srcs)
+endif
+
+@MODULE@_so_AR = :
+@MODULE@_so_RANLIB = :
+@MODULE@_so_LINK = :
+
+@MODULE@_dylib_AR = :
+@MODULE@_dylib_RANLIB = :
+@MODULE@_dylib_LINK = :
+
+@MODULE@_dll_AR = :
+@MODULE@_dll_RANLIB = :
+@MODULE@_dll_LINK = :
+
+@builddir@/target/@RUST_TARGET_SUBDIR@/lib@MODULE@.so @builddir@/target/@RUST_TARGET_SUBDIR@/lib@MODULE@.dylib @builddir@/target/@RUST_TARGET_SUBDIR@/lib@MODULE@.dll: $(@MODULE@_srcs)
$(CARGO_ENV) $(CARGO) build $(CARGO_VERBOSE) --target $(CARGO_TARGET_TRIPLE) $(@MODULE@_FEATURE_ARGS) $(CARGO_RELEASE_ARGS) -p @MODULE@
-@MODULE@.@SHARED_LIB_EXT@: @builddir@/target/@RUST_TARGET_SUBDIR@/lib@MODULE@.@SHARED_LIB_EXT@
+@MODULE@.so: @builddir@/target/@RUST_TARGET_SUBDIR@/lib@MODULE@.so
+ $(INSTALL) $< $@
+
+@MODULE@.dylib: @builddir@/target/@RUST_TARGET_SUBDIR@/lib@MODULE@.dylib
+ $(INSTALL) $< $@
+
+@MODULE@.dll: @builddir@/target/@RUST_TARGET_SUBDIR@/lib@MODULE@.dll
$(INSTALL) $< $@
diff --git a/classes/base.lua b/classes/base.lua
index f51818b70..c22e13fe0 100644
--- a/classes/base.lua
+++ b/classes/base.lua
@@ -479,7 +479,9 @@ function class:registerCommands ()
local module = options.src:gsub("%/", ".")
local original = (("\\script[src=%s]"):format(options.src))
local result = SILE.require(options.src)
- local suggested = (result._name and "\\use[module=%s]" or "\\lua[require=%s]"):format(module)
+ local suggested = (type(result) == "table" and result._name and "\\use[module=%s]" or "\\lua[require=%s]"):format(
+ module
+ )
_deprecated(original, suggested)
return result
else
diff --git a/configure.ac b/configure.ac
index 72473ee63..22713e306 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_INIT([sile], [m4_esyscmd(build-aux/git-version-gen .tarball-version)], [caleb
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux])
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE([foreign tar-pax dist-zstd dist-zip no-dist-gzip color-tests subdir-objects])
+AM_INIT_AUTOMAKE([foreign tar-pax dist-zstd dist-zip no-dist-gzip no-dependencies color-tests subdir-objects])
AM_SILENT_RULES([yes])
# Load up re-usable m4 bits shared across Caleb's projects
@@ -11,6 +11,7 @@ QUE_GIT_VERSION
QUE_TRANSFORM_PACKAGE_NAME
QUE_DEVELOPER_MODE
QUE_DIST_CHECKSUMS
+QUE_LIBEXT
# Extend the QUE checksums feature with support for the PDF manual
SILE_DIST_CHECKSUMS
@@ -38,22 +39,8 @@ RANLIB=:
LT_PREREQ([2.2])
LT_INIT([dlopen])
-QUE_RUST_BOILERPLATE
QUE_DOCKER_BOILERPLATE
-
-# Load Rust module bits, early since it stuffs rules in aminclude.am
-case $target_os in
- darwin*)
- SHARED_LIB_EXT="dylib"
- ;;
- cygwin*|mingw*)
- SHARED_LIB_EXT="dll"
- ;;
- *)
- SHARED_LIB_EXT="so"
- ;;
-esac
-AC_SUBST([SHARED_LIB_EXT])
+QUE_RUST_BOILERPLATE
QUE_RUST_MODULE([rusile])
AM_CONDITIONAL([SHARED], [test "x$enable_shared" = "xyes"])
diff --git a/core/pathsetup.lua.in b/core/pathsetup.lua.in
index 3ad11b287..9c7ec4c41 100644
--- a/core/pathsetup.lua.in
+++ b/core/pathsetup.lua.in
@@ -42,8 +42,8 @@ end
-- Prepend paths specifically for C modules.
local function prependCPath (path)
- package.cpath = prepend_and_dedup(path .. "/?.@SHARED_LIB_EXT@", package.cpath)
- if "@SHARED_LIB_EXT@" ~= "so" then
+ package.cpath = prepend_and_dedup(path .. "/?@LIBEXT@", package.cpath)
+ if "@LIBEXT@" ~= "so" then
package.cpath = prepend_and_dedup(path .. "/?.so", package.cpath)
end
end
diff --git a/core/utilities/init.lua b/core/utilities/init.lua
index a7b0805d8..9c86b3322 100644
--- a/core/utilities/init.lua
+++ b/core/utilities/init.lua
@@ -332,7 +332,7 @@ function utilities.error (message, isbug)
utilities.warn(message, isbug)
_skip_traceback_levels = 2
io.stderr:flush()
- SILE.outputter:finish()
+ SILE.outputter:abort()
SILE.scratch.caughterror = true
error("", 2)
end
diff --git a/flake.lock b/flake.lock
index a6d254f45..625f696c7 100644
--- a/flake.lock
+++ b/flake.lock
@@ -72,11 +72,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1733749988,
- "narHash": "sha256-+5qdtgXceqhK5ZR1YbP1fAUsweBIrhL38726oIEAtDs=",
+ "lastModified": 1735821806,
+ "narHash": "sha256-cuNapx/uQeCgeuhUhdck3JKbgpsml259sjUQnWM7zW8=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "bc27f0fde01ce4e1bfec1ab122d72b7380278e68",
+ "rev": "d6973081434f88088e5321f83ebafe9a1167c367",
"type": "github"
},
"original": {
diff --git a/outputters/base.lua b/outputters/base.lua
index 3ea3335e1..ee6cd33d0 100644
--- a/outputters/base.lua
+++ b/outputters/base.lua
@@ -29,6 +29,10 @@ end
function outputter.newPage () end
+function outputter:abort ()
+ return self:finish() -- unless otherwise defined
+end
+
function outputter:finish ()
self:runHooks("prefinish")
end
diff --git a/outputters/debug.lua b/outputters/debug.lua
index c731d4172..1c50ed7c8 100644
--- a/outputters/debug.lua
+++ b/outputters/debug.lua
@@ -46,6 +46,14 @@ function outputter:newPage ()
self:_writeline("New page")
end
+function outputter:abort ()
+ if started then
+ self:_writeline("Aborted")
+ outfile:close()
+ started = false
+ end
+end
+
function outputter:finish ()
if SILE.status.unsupported then
self:_writeline("UNSUPPORTED")
@@ -54,6 +62,7 @@ function outputter:finish ()
self:runHooks("prefinish")
self:_writeline("Finish")
outfile:close()
+ started = false
end
function outputter.getCursor (_)
diff --git a/outputters/libtexpdf.lua b/outputters/libtexpdf.lua
index 878cf8ab7..7625215c6 100644
--- a/outputters/libtexpdf.lua
+++ b/outputters/libtexpdf.lua
@@ -67,16 +67,25 @@ end
-- pdf structure package needs a tie in here
function outputter._endHook (_) end
-function outputter:finish ()
+function outputter.abort ()
if started then
pdf.endpage()
- self:runHooks("prefinish")
pdf.finish()
started = false
- lastkey = nil
+ lastkey = false
end
end
+function outputter:finish ()
+ -- allows generation of empty PDFs
+ self:_ensureInit()
+ pdf.endpage()
+ self:runHooks("prefinish")
+ pdf.finish()
+ started = false
+ lastkey = false
+end
+
function outputter.getCursor (_)
return cursorX, cursorY
end
diff --git a/outputters/text.lua b/outputters/text.lua
index 786d2fd36..e1bf9a208 100644
--- a/outputters/text.lua
+++ b/outputters/text.lua
@@ -15,7 +15,8 @@ outputter.extension = "txt"
-- function outputter:_init () end
function outputter:_ensureInit ()
- if not outfile then
+ if not started then
+ started = true
local fname = self:getOutputFilename()
outfile = fname == "-" and io.stdout or io.open(fname, "w+")
end
@@ -34,10 +35,17 @@ function outputter:newPage ()
outfile:write("")
end
+function outputter.abort ()
+ if started then
+ outfile:close()
+ started = false
+ end
+end
function outputter:finish ()
self:_ensureInit()
self:runHooks("prefinish")
outfile:close()
+ started = false
end
function outputter.getCursor (_)
@@ -79,7 +87,6 @@ function outputter:drawHbox (value, width)
end
self:_writeline(value.text)
if width > 0 then
- started = true
cursorX = cursorX + width
end
end
diff --git a/package.json b/package.json
index e11af429d..824ec1c98 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "sile",
- "version": "0.15.8",
+ "version": "0.15.9",
"description": "The SILE Typesetter",
"main": "sile",
"scripts": {
@@ -28,7 +28,7 @@
"conventional-changelog-cli": "^5.0",
"husky": "^9.1",
"commit-and-tag-version": "^12.5",
- "yaml": "^2.6"
+ "yaml": "^2.7"
},
"config": {
"commitizen": {
diff --git a/packages/bibtex/csl/engine.lua b/packages/bibtex/csl/engine.lua
index 013f2d9fb..5c4824441 100644
--- a/packages/bibtex/csl/engine.lua
+++ b/packages/bibtex/csl/engine.lua
@@ -103,14 +103,16 @@ function CslEngine:_init (style, locale, extras)
}
self.subsequentAuthorSubstitute = self.inheritable["bibliography"]["subsequent-author-substitute"]
- local _, count = luautf8.gsub(self.subsequentAuthorSubstitute, "[%-_–—]", "") -- naive count
- if count > 0 then
- -- With many fonts, a sequence of dashes is not looking that great.
- -- So replace them with a command, and let the typesetter decide for a better rendering.
- -- NOTE: Avoid (quoted) attributes and dashes in tags, as some global
- -- substitutions might affect quotes...So we use a simple "wrapper" command.
- local trail = luautf8.gsub(self.subsequentAuthorSubstitute, "^[%-–—_]+", "")
- self.subsequentAuthorSubstitute = "" .. count .. "" .. trail
+ if self.subsequentAuthorSubstitute then
+ local _, count = luautf8.gsub(self.subsequentAuthorSubstitute, "[%-_–—]", "") -- naive count
+ if count > 0 then
+ -- With many fonts, a sequence of dashes is not looking that great.
+ -- So replace them with a command, and let the typesetter decide for a better rendering.
+ -- NOTE: Avoid (quoted) attributes and dashes in tags, as some global
+ -- substitutions might affect quotes...So we use a simple "wrapper" command.
+ local trail = luautf8.gsub(self.subsequentAuthorSubstitute, "^[%-–—_]+", "")
+ self.subsequentAuthorSubstitute = "" .. count .. "" .. trail
+ end
end
end
@@ -1490,7 +1492,7 @@ function CslEngine:_process (entries, mode)
end
--- Generate a citation string.
--- @tparam table entry List of CSL entries
+-- @tparam table entries List of CSL entries
-- @treturn string The XML citation string
function CslEngine:cite (entries)
entries = type(entries) == "table" and not entries.type and entries or { entries }
@@ -1498,7 +1500,7 @@ function CslEngine:cite (entries)
end
--- Generate a reference string.
--- @tparam table entry List of CSL entries
+-- @tparam table entries List of CSL entries
-- @treturn string The XML reference string
function CslEngine:reference (entries)
entries = type(entries) == "table" and not entries.type and entries or { entries }
diff --git a/packages/bibtex/csl/locale.lua b/packages/bibtex/csl/locale.lua
index 98944b434..43f924164 100644
--- a/packages/bibtex/csl/locale.lua
+++ b/packages/bibtex/csl/locale.lua
@@ -181,7 +181,6 @@ end
--- Lookup an ordinal term in the locale.
-- Reserved for ordinal terms.
-- @tparam number number The numeric value to be formatted
--- @tparam string name The name of the term
-- @tparam string form The form of the term (default: "short")
-- @tparam string genderf The gender-form of the term (default: "neuter")
-- @tparam boolean plural Whether to return the plural form (default: false)
diff --git a/packages/bibtex/csl/utils/casing.lua b/packages/bibtex/csl/utils/casing.lua
index 501b80e93..3485c87a4 100644
--- a/packages/bibtex/csl/utils/casing.lua
+++ b/packages/bibtex/csl/utils/casing.lua
@@ -15,8 +15,6 @@ local capitalizeFirst = function (text, lang)
return icu.case(first, lang, "upper") .. rest
end
---- Text casing methods for CSL.
--- @table casing methods for lower, upper, capitalize-first, capitalize-all, title, sentence
local casing = {
-- Straightforward
["lowercase"] = function (text, lang)
diff --git a/rusile/Cargo.toml b/rusile/Cargo.toml
index 3f108ec59..6cde89f84 100644
--- a/rusile/Cargo.toml
+++ b/rusile/Cargo.toml
@@ -9,7 +9,7 @@ authors.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
-build = "../build-aux/module.rs"
+build = "build.rs"
[lib]
crate-type = ["rlib", "cdylib", "staticlib"]
diff --git a/build-aux/module.rs b/rusile/build.rs
similarity index 100%
rename from build-aux/module.rs
rename to rusile/build.rs
diff --git a/sile.rockspec.in b/sile.rockspec.in
index e82459dd0..e50c7e493 100644
--- a/sile.rockspec.in
+++ b/sile.rockspec.in
@@ -41,7 +41,7 @@ dependencies = {
"luarepl == 0.10-1",
"luasec == 1.3.2-1",
"luasocket == 3.1.0-1",
- "luautf8 == 0.1.5-2",
+ "luautf8 == 0.1.6-1",
"penlight == 1.14.0-2",
"vstruct == 2.1.1-1",
}