Skip to content

Commit

Permalink
Update diglot.lua
Browse files Browse the repository at this point in the history
Adjusted page layout and added footnote frames
  • Loading branch information
no-vici authored Jan 12, 2025
1 parent 8989767 commit 5fe88b2
Showing 1 changed file with 47 additions and 30 deletions.
77 changes: 47 additions & 30 deletions classes/diglot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,55 @@ local plain = require("classes.plain")
local class = pl.class(plain)
class._name = "diglot"

function class:_init (options)
plain._init(self, options)
self:loadPackage("counters")
function class:_init(options)
plain._init(self, options)

self:registerPostinit(function ()
SILE.scratch.counters.folio = { value = 1, display = "arabic" }
end)
self:registerPostinit(function()
SILE.scratch.counters.folio = { value = 1, display = "arabic" }
end)

self:declareFrame("a", {
left = "8.3%pw",
right = "48%pw",
top = "11.6%ph",
bottom = "80%ph",
})
self:declareFrame("b", {
left = "52%pw",
right = "100%pw-left(a)",
top = "top(a)",
bottom = "bottom(a)",
})
self:declareFrame("folio", {
left = "left(a)",
right = "right(b)",
top = "bottom(a)+3%ph",
bottom = "bottom(a)+8%ph",
})
self:loadPackage("parallel", {
frames = {
left = "a",
right = "b",
},
})
self:declareFrame("a", {
left = "2.5%pw",
right = "47.5%pw",
top = "3.5%ph",
-- bottom = "93.50%ph",
bottom = "85%ph",
})
self:declareFrame("b", {
left = "52.5%pw",
right = "100%pw-left(a)",
top = "top(a)",
bottom = "bottom(a)",
})
self:declareFrame("c", {
left = "left(a)",
right = "right(a)",
top = "bottom(a)",
bottom = "bottom(a)+10%ph", -- Adjust as needed for footnote space
})
self:declareFrame("d", {
left = "left(b)",
right = "right(b)",
top = "bottom(b)",
bottom = "bottom(b)+10%ph", -- Adjust as needed for footnote space
})
self:declareFrame("folio", {
left = "left(a)",
right = "right(b)",
top = "bottom(c)+1.5%ph",
bottom = "bottom(c)+4.75%ph",
})

self:loadPackage("parallel", {
frames = {
left = "a",
right = "b",
},
ftn_frames = {
ftn_left = "c",
ftn_right = "d",
},
})
end

return class

0 comments on commit 5fe88b2

Please sign in to comment.