Skip to content

Commit

Permalink
Merge pull request #47 from Omikhleia/fix-wrong-section-header
Browse files Browse the repository at this point in the history
fix: wrong section number level in odd page header
  • Loading branch information
Omikhleia committed May 18, 2023
2 parents 22fe0b2 + ade650a commit 82f39c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion classes/resilient/book.lua
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,10 @@ function class:registerCommands ()
and sty.sectioning.numberstyle.header
if numsty and sty.sectioning.counter.id then
local number = self.packages.counters:formatMultilevelCounter(
self:getMultilevelCounter(sty.sectioning.counter.id), { noleadingzeros = true }
self:getMultilevelCounter(sty.sectioning.counter.id), {
noleadingzeros = true,
level = sty.sectioning.counter.level -- up to the section level
}
)
SILE.call("style:apply:number", { name = numsty, text = number })
end
Expand Down

0 comments on commit 82f39c5

Please sign in to comment.