Skip to content

Commit

Permalink
chore(classes): Avoid unnecessary setting wrappers in book class
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Nov 16, 2024
1 parent 2f36a89 commit c1e3669
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions classes/book.lua
Original file line number Diff line number Diff line change
Expand Up @@ -256,20 +256,15 @@ function class:registerCommands ()
end, "Begin a new subsection")

self:registerCommand("book:chapterfont", function (_, content)
SILE.settings:temporarily(function ()
SILE.call("font", { weight = 800, size = "22pt" }, content)
end)
SILE.call("font", { weight = 800, size = "22pt" }, content)
end)

self:registerCommand("book:sectionfont", function (_, content)
SILE.settings:temporarily(function ()
SILE.call("font", { weight = 800, size = "15pt" }, content)
end)
SILE.call("font", { weight = 800, size = "15pt" }, content)
end)

self:registerCommand("book:subsectionfont", function (_, content)
SILE.settings:temporarily(function ()
SILE.call("font", { weight = 800, size = "12pt" }, content)
end)
SILE.call("font", { weight = 800, size = "12pt" }, content)
end)
end

Expand Down

0 comments on commit c1e3669

Please sign in to comment.