Skip to content

Commit

Permalink
chore(packages): Declare SILE.scratch.headers in twoside only
Browse files Browse the repository at this point in the history
  • Loading branch information
jodros committed Jul 22, 2024
1 parent b738c1c commit 9411abc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions classes/bible.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 0 additions & 3 deletions classes/book.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
3 changes: 3 additions & 0 deletions packages/twoside/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down

0 comments on commit 9411abc

Please sign in to comment.