diff --git a/classes/diglot.lua b/classes/diglot.lua index ee63d5afe..402679a4b 100644 --- a/classes/diglot.lua +++ b/classes/diglot.lua @@ -6,13 +6,36 @@ class._name = "diglot" function class:_init (options) plain._init(self, options) self:loadPackage("counters") + 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 = "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" + } + }) + end return class diff --git a/classes/triglot.lua b/classes/triglot.lua index eb4204c74..eaf1bc4be 100644 --- a/classes/triglot.lua +++ b/classes/triglot.lua @@ -6,16 +6,46 @@ class._name = "triglot" function class:_init (options) book._init(self, options) self:loadPackage("counters") + self:registerPostinit(function () SILE.scratch.counters.folio = { value = 1, display = "arabic" } end) - self:declareFrame("a", {left = "5%pw", right = "28%pw", top = "11.6%ph", bottom = "80%ph" }) - self:declareFrame("b", {left = "33%pw", right = "60%pw", top = "top(a)", bottom = "bottom(a)" }) - self:declareFrame("c", {left = "66%pw", right = "95%pw", top = "top(a)", bottom = "bottom(a)" }) - self:declareFrame("folio",{left = "left(a)", right = "right(b)", top = "bottom(a)+3%pw",bottom = "bottom(a)+8%ph" }) - self:loadPackage("parallel", { frames = { left = "a", middle = "b", right= "c" } }) + + self:declareFrame("a", { + left = "5%pw", + right = "28%pw", + top = "11.6%ph", + bottom = "80%ph" + }) + self:declareFrame("b", { + left = "33%pw", + right = "60%pw", + top = "top(a)", + bottom = "bottom(a)" + }) + self:declareFrame("c", { + left = "66%pw", + right = "95%pw", + top = "top(a)", + bottom = "bottom(a)" + }) + self:declareFrame("folio", { + left = "left(a)", + right = "right(b)", + top = "bottom(a)+3%pw", + bottom = "bottom(a)+8%ph" + }) + self:loadPackage("parallel", { + frames = { + left = "a", + middle = "b", + right= "c" + } + }) + SILE.settings:set("linebreak.tolerance", 5000) SILE.settings:set("document.parindent", SILE.nodefactory.glue()) + end return class