diff --git a/.gitignore b/.gitignore index 3bf25a4..abb7df9 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,4 @@ luac.out *.ref tests/*.pdf tests/*.debug - +examples/*.pdf diff --git a/.luacheckrc b/.luacheckrc index f45e094..37a86fe 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,15 +1,11 @@ std = "min+sile" include_files = { "**/*.lua", - "sile.in", "*.rockspec", ".busted", ".luacheckrc" } exclude_files = { - "benchmark-*", - "compare-*", - "sile-*", "lua_modules", "lua-libraries", ".lua", diff --git a/README.md b/README.md index 8dbc2d6..670c471 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ box. The package offers various interesting options and goodies. ## Installation -These packages require SILE v0.14 or upper. +These packages require SILE v0.14.13 or upper. Installation relies on the **luarocks** package manager. diff --git a/packages/framebox/init.lua b/packages/framebox/init.lua index 0e7313a..de5d0e5 100644 --- a/packages/framebox/init.lua +++ b/packages/framebox/init.lua @@ -5,7 +5,6 @@ -- -- KNOWN ISSUE: RTL and BTT writing directions are not officialy supported yet (untested) -- -require("silex.compat") local base = require("packages.base") local package = pl.class(base) diff --git a/packages/parbox/init.lua b/packages/parbox/init.lua index c04d1c0..60a68cc 100644 --- a/packages/parbox/init.lua +++ b/packages/parbox/init.lua @@ -2,7 +2,7 @@ -- Paragraph blocks ("parbox") for SILE -- Or how to wrap width-contrained vboxes into an hbox: -- A building block for more advanced concepts. --- 2021-2022 Didier Willis +-- 2021-2023 Didier Willis -- License: MIT -- -- Known limitations: LTR-TTB writing direction is assumed. @@ -50,20 +50,11 @@ end -- Main function for parboxing content. -- Returns a list of vboxes. local function parboxFraming (options, content) - local oldTypesetter = SILE.typesetter - local parboxTypesetter - local innerVbox - SILE.settings:pushState() SILE.settings:toplevelState() - if not SILE.typesetters or not SILE.typesetters.base then - -- Compatibility shim for SILE 0.14.0..0.14.5 - parboxTypesetter = SILE.defaultTypesetter() - else - -- Breaking change for SILE 0.14.6 and upper - parboxTypesetter = SILE.typesetters.base() - end + local oldTypesetter = SILE.typesetter + local parboxTypesetter = SILE.typesetters.base() local hlist = {} local originalLeaveHmode = parboxTypesetter.leaveHmode @@ -80,7 +71,8 @@ local function parboxFraming (options, content) SILE.process(content) parboxTypesetter:leaveHmode(1) - innerVbox = parboxTypesetter.state.outputQueue + + local innerVbox = parboxTypesetter.state.outputQueue SILE.typesetter = oldTypesetter SILE.settings:popState() diff --git a/packages/ptable/init.lua b/packages/ptable/init.lua index 7744304..4c33901 100644 --- a/packages/ptable/init.lua +++ b/packages/ptable/init.lua @@ -4,7 +4,6 @@ -- 2021-2023 Didier Willis -- License: MIT -- -require("silex.compat") local base = require("packages.base") local makeParbox -- assigned at package initialization diff --git a/packages/struts/init.lua b/packages/struts/init.lua index ee670b3..97b1754 100644 --- a/packages/struts/init.lua +++ b/packages/struts/init.lua @@ -3,7 +3,6 @@ -- 2021-2023 Didier Willis -- License: MIT -- -require("silex.compat") local base = require("packages.base") local package = pl.class(base) diff --git a/ptable.sile-2.0.2-1.rockspec b/ptable.sile-2.0.2-1.rockspec new file mode 100644 index 0000000..f13105b --- /dev/null +++ b/ptable.sile-2.0.2-1.rockspec @@ -0,0 +1,31 @@ +rockspec_format = "3.0" +package = "ptable.sile" +version = "2.0.2-1" +source = { + url = "git+https://github.com/Omikhleia/ptable.sile.git", + tag = "v2.0.2", +} +description = { + summary = "Paragraph boxes, framed boxes and table packages for the SILE typesetting system.", + detailed = [[ + This package for the SILE typesetter provides struts, paragraph boxes + (parbox), framed boxes (framebox) and tables (ptable). + ]], + homepage = "https://github.com/Omikhleia/ptable.sile", + license = "MIT", +} +dependencies = { + "lua >= 5.1", +} +build = { + type = "builtin", + modules = { + ["sile.packages.struts"] = "packages/struts/init.lua", + ["sile.packages.parbox"] = "packages/parbox/init.lua", + ["sile.packages.ptable"] = "packages/ptable/init.lua", + ["sile.packages.framebox"] = "packages/framebox/init.lua", + ["sile.packages.framebox.graphics.prng"] = "packages/framebox/graphics/prng.lua", + ["sile.packages.framebox.graphics.renderer"] = "packages/framebox/graphics/renderer.lua", + ["sile.packages.framebox.graphics.rough"] = "packages/framebox/graphics/rough.lua", + } +} diff --git a/ptable.sile-dev-1.rockspec b/ptable.sile-dev-1.rockspec index 186fcf4..cf45ae3 100644 --- a/ptable.sile-dev-1.rockspec +++ b/ptable.sile-dev-1.rockspec @@ -14,7 +14,6 @@ description = { } dependencies = { "lua >= 5.1", - "silex.sile", } build = { type = "builtin", @@ -26,6 +25,5 @@ build = { ["sile.packages.framebox.graphics.prng"] = "packages/framebox/graphics/prng.lua", ["sile.packages.framebox.graphics.renderer"] = "packages/framebox/graphics/renderer.lua", ["sile.packages.framebox.graphics.rough"] = "packages/framebox/graphics/rough.lua", - ["sile.resilient-compat.hboxing"] = "resilient-compat/hboxing.lua", } } diff --git a/tests/framebox-004.sil b/tests/framebox-004.sil index 8caa5d7..9c4f7bf 100644 --- a/tests/framebox-004.sil +++ b/tests/framebox-004.sil @@ -1,6 +1,7 @@ -\begin[papersize=a6, class=resilient.book]{document} +\begin[papersize=a6, class=book]{document} \use[module=packages.framebox] \use[module=packages.struts] +\use[module=packages.parbox] \nofolios \neverindent % Test case: migrating content in framebox and colleagues.