<commit_before>local plain = SILE.require("book", "classes")
local triglot = plain { id = "triglot" }

function triglot:init ()
  SILE.require("packages/counters")
  SILE.scratch.counters.folio = { value = 1, display = "arabic" }
  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())
  return plain.init(self)
end

return triglot<commit_msg>chore(classes): Redo triglot class with Penlight class model<commit_after>local book = require("classes.book")
local triglot = pl.class(book)
triglot._name = "triglot"

function triglot:_init (options)
  if self._legacy and not self._deprecated then return self:_deprecator(book) end
  book._init(self, options)
  self:loadPackage("counters")
  SILE.scratch.counters.folio = { value = 1, display = "arabic" }
  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())
  -- Avoid calling this (yet) if we're the parent of some child class
  if self._name == "triglot" then self:post_init() end
  return self
end

return triglot
{'fraction_non_alphanumeric': 0.18780166739798157, 'fraction_numerical': 0.020184291355857833, 'mean_word_length': 3.2857142857142856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6230924', 'n_tokens_mistral': 827, 'n_tokens_neox': 781, 'n_words': 171}