Skip to content

Commit

Permalink
Merge 128b78f into ddb6391
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Mar 29, 2023
2 parents ddb6391 + 128b78f commit a3b1467
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
44 changes: 27 additions & 17 deletions classes/book.lua
Expand Up @@ -113,6 +113,10 @@ function class:registerCommands ()
else
SILE.call("show-multilevel-counter", { id = "sectioning" })
end
else
-- https://github.com/sile-typesetter/sile/issues/1707
-- https://github.com/sile-typesetter/sile/issues/1751
SILE.call("hbox")
end
end)

Expand Down Expand Up @@ -149,14 +153,16 @@ function class:registerCommands ()
level = 1,
msg = "book-chapter-title"
}, content)
if SU.boolean(options.numbering, true) then
local lang = SILE.settings:get("document.language")
local postcmd = "book:chapter:post"
if SILE.Commands[postcmd .. ":" .. lang] then
postcmd = postcmd .. ":" .. lang
end
SILE.call(postcmd)
end
SILE.process(content)
end)
local lang = SILE.settings:get("document.language")
local postcmd = "book:chapter:post"
if SILE.Commands[postcmd .. ":" .. lang] then
postcmd = postcmd .. ":" .. lang
end
SILE.call(postcmd)
SILE.call("book:chapterfont", {}, content)
SILE.call("left-running-head", {}, function ()
SILE.settings:temporarily(function ()
SILE.call("book:left-running-head-font", {}, content)
Expand All @@ -177,12 +183,14 @@ function class:registerCommands ()
toc = options.toc,
level = 2
}, content)
local lang = SILE.settings:get("document.language")
local postcmd = "book:section:post"
if SILE.Commands[postcmd .. ":" .. lang] then
postcmd = postcmd .. ":" .. lang
if SU.boolean(options.numbering, true) then
local lang = SILE.settings:get("document.language")
local postcmd = "book:section:post"
if SILE.Commands[postcmd .. ":" .. lang] then
postcmd = postcmd .. ":" .. lang
end
SILE.call(postcmd)
end
SILE.call(postcmd)
SILE.process(content)
end)
if not SILE.scratch.counters.folio.off then
Expand Down Expand Up @@ -217,12 +225,14 @@ function class:registerCommands ()
toc = options.toc,
level = 3
}, content)
local lang = SILE.settings:get("document.language")
local postcmd = "book:subsection:post"
if SILE.Commands[postcmd .. ":" .. lang] then
postcmd = postcmd .. ":" .. lang
if SU.boolean(options.numbering, true) then
local lang = SILE.settings:get("document.language")
local postcmd = "book:subsection:post"
if SILE.Commands[postcmd .. ":" .. lang] then
postcmd = postcmd .. ":" .. lang
end
SILE.call(postcmd)
end
SILE.call(postcmd)
SILE.process(content)
end)
SILE.typesetter:leaveHmode()
Expand Down
8 changes: 2 additions & 6 deletions packages/infonode/init.lua
Expand Up @@ -9,12 +9,8 @@ package._name = "infonode"
-- Check out SILE.scratch.info.thispage in your end-of-page routine and see what nodes
-- are there.

local _info = pl.class(SILE.nodefactory.hbox)

_info.type ="special"
_info.category = ""
_info.value = nil
_info.width = SILE.length()
local _info = pl.class(SILE.nodefactory.zerohbox)
_info.type = "info"

function _info:__tostring ()
return "I<" .. self.category .. "|" .. tostring(self.value) .. ">"
Expand Down

0 comments on commit a3b1467

Please sign in to comment.