Skip to content

Commit 263d8ce

Browse files
committed
chore(packages): Update deprecated SILE usage with current API
1 parent 67061ed commit 263d8ce

15 files changed

+96
-96
lines changed

classes/cabinding.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ local cabook = require("classes.cabook")
33
local class = pl.class(cabook)
44
class._name = "cabinding"
55

6-
local spineoffset = SILE.measurement(CASILE.spine):tonumber() / 2
6+
local spineoffset = SILE.types.measurement(CASILE.spine):tonumber() / 2
77

88
local spreadFrameset = {
99
front = {
@@ -93,7 +93,7 @@ function class:declareOptions ()
9393
self.defaultFrameset = posterFrameset
9494
SILE.documentState.paperSize = { parsed[1], parsed[2] }
9595
else
96-
local spread = parsed[1] * 2 + SILE.measurement(CASILE.spine):tonumber()
96+
local spread = parsed[1] * 2 + SILE.types.measurement(CASILE.spine):tonumber()
9797
SILE.documentState.paperSize = { spread, parsed[2] }
9898
end
9999
SILE.documentState.orgPaperSize = SILE.documentState.paperSize

classes/cabook.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ function class:_init (options)
4545
value = { 0, 0 },
4646
display = { "ORDINAL", "STRING" },
4747
}
48-
SILE.settings:set("typesetter.underfulltolerance", SILE.length("6ex"))
49-
SILE.settings:set("typesetter.overfulltolerance", SILE.length("0.2ex"))
48+
SILE.settings:set("typesetter.underfulltolerance", SILE.types.length("6ex"))
49+
SILE.settings:set("typesetter.overfulltolerance", SILE.types.length("0.2ex"))
5050
table.insert(SILE.input.preambles, function ()
5151
SILE.call("footnote:separator", {}, function ()
5252
SILE.call("rebox", { width = "6em", height = "2ex" }, function ()
@@ -56,9 +56,9 @@ function class:_init (options)
5656
end)
5757
end)
5858
SILE.settings:set("linespacing.method", "fit-font")
59-
SILE.settings:set("linespacing.fit-font.extra-space", SILE.length("0.6ex plus 0.2ex minus 0.2ex"))
59+
SILE.settings:set("linespacing.fit-font.extra-space", SILE.types.length("0.6ex plus 0.2ex minus 0.2ex"))
6060
SILE.settings:set("linebreak.hyphenPenalty", 300)
61-
SILE.scratch.insertions.classes.footnote.interInsertionSkip = SILE.length("0.7ex plus 0 minus 0")
61+
SILE.scratch.insertions.classes.footnote.interInsertionSkip = SILE.types.length("0.7ex plus 0 minus 0")
6262
SILE.scratch.last_was_ref = false
6363
SILE.typesetter:registerPageEndHook(function ()
6464
SILE.scratch.last_was_ref = false

layouts/app.lua

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ return function (class)
2929
return
3030
end
3131
SILE.typesetNaturally(SILE.getFrame("runningHead"), function ()
32-
SILE.settings:set("current.parindent", SILE.nodefactory.glue())
33-
SILE.settings:set("typesetter.parfillskip", SILE.nodefactory.glue())
34-
SILE.settings:set("document.lskip", SILE.nodefactory.glue())
35-
SILE.settings:set("document.rskip", SILE.nodefactory.glue())
32+
SILE.settings:set("current.parindent", SILE.types.node.glue())
33+
SILE.settings:set("typesetter.parfillskip", SILE.types.node.glue())
34+
SILE.settings:set("document.lskip", SILE.types.node.glue())
35+
SILE.settings:set("document.rskip", SILE.types.node.glue())
3636
SILE.call("cabook:font:right-header", {}, function ()
3737
SILE.call("center", {}, function ()
3838
SILE.call("meta:title")
@@ -80,10 +80,10 @@ return function (class)
8080
SILE.require("packages/background")
8181
SILE.call("background", { color = "#e1e2e6" })
8282

83-
local inkColor = SILE.colorparser("#19191A")
83+
local inkColor = SILE.types.color("#19191A")
8484
SILE.outputter:pushColor(inkColor)
8585
end
8686

87-
SILE.settings:set("linebreak.emergencyStretch", SILE.length("3em"))
87+
SILE.settings:set("linebreak.emergencyStretch", SILE.types.length("3em"))
8888
end
8989
end

layouts/businesscard.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ return function (class)
1313
}
1414

1515
class:loadPackage("crop", {
16-
bleed = SILE.length("2.5mm").length,
17-
trim = SILE.length("5mm").length,
16+
bleed = SILE.types.length("2.5mm").length,
17+
trim = SILE.types.length("5mm").length,
1818
})
1919

2020
class:registerCommand("output-right-running-head", function () end)

layouts/ekran.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ return function (class)
4444
return
4545
end
4646
SILE.typesetNaturally(SILE.getFrame("runningHead"), function ()
47-
SILE.settings:set("current.parindent", SILE.nodefactory.glue())
48-
SILE.settings:set("typesetter.parfillskip", SILE.nodefactory.glue())
49-
SILE.settings:set("document.lskip", SILE.nodefactory.glue())
50-
SILE.settings:set("document.rskip", SILE.nodefactory.glue())
47+
SILE.settings:set("current.parindent", SILE.types.node.glue())
48+
SILE.settings:set("typesetter.parfillskip", SILE.types.node.glue())
49+
SILE.settings:set("document.lskip", SILE.types.node.glue())
50+
SILE.settings:set("document.rskip", SILE.types.node.glue())
5151
SILE.call("cabook:font:right-header", {}, function ()
5252
SILE.call("center", {}, function ()
5353
SILE.call("meta:title")
@@ -88,7 +88,7 @@ return function (class)
8888
SILE.require("packages/background")
8989
SILE.call("background", { color = "#efe6bf" })
9090

91-
local inkColor = SILE.colorparser("#262d2c")
91+
local inkColor = SILE.types.color("#262d2c")
9292
SILE.outputter:pushColor(inkColor)
9393
end
9494
end

packages/cabook-block-styles.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function package:registerCommands ()
223223
SILE.call("novbreak")
224224
SILE.call("cabook:font:subparagraph", {}, function ()
225225
SILE.call("raggedleft", {}, function ()
226-
SILE.settings:set("document.rskip", SILE.nodefactory.glue("20pt"))
226+
SILE.settings:set("document.rskip", SILE.types.node.glue("20pt"))
227227
SILE.process(content)
228228
end)
229229
end)

0 commit comments

Comments
 (0)