diff --git a/classes/bible.lua b/classes/bible.lua index 1eb162a9f..22c50f3d9 100644 --- a/classes/bible.lua +++ b/classes/bible.lua @@ -6,10 +6,6 @@ local plain = require("classes.plain") local class = pl.class(plain) class._name = "bible" -if not SILE.scratch.headers then - SILE.scratch.headers = {} -end - class.defaultFrameset = { content = { left = "8.3%pw", diff --git a/classes/book.lua b/classes/book.lua index 13aa4e4f9..30171827e 100644 --- a/classes/book.lua +++ b/classes/book.lua @@ -52,9 +52,6 @@ function class:_init (options) insertInto = "footnotes", stealFrom = { "content" }, }) - if not SILE.scratch.headers then - SILE.scratch.headers = {} - end end function class:endPage () diff --git a/packages/twoside/init.lua b/packages/twoside/init.lua index e418c253e..f494f4eeb 100644 --- a/packages/twoside/init.lua +++ b/packages/twoside/init.lua @@ -72,6 +72,9 @@ function package:_init (options) end) self.class:registerHook("newpage", spreadHook) self.class:registerHook("newpage", switchPage) + if not SILE.scratch.headers then + SILE.scratch.headers = {} + end end function package:registerCommands ()