Skip to content

Commit

Permalink
feat(packages): Adjust \book:numbering override to handle Fluent mess…
Browse files Browse the repository at this point in the history
…ages like SILE
  • Loading branch information
alerque committed Nov 3, 2023
1 parent 87bd685 commit 1886475
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/cabook-commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,17 @@ function package:registerCommands ()
if SILE.Commands["book:chapter:precounter"] then SILE.call("book:chapter:precounter") end
SILE.call(options.prenumber)
end
SILE.call("show-multilevel-counter", {
id = "sectioning",
display = options.display,
minlevel = level,
level = level
})
if options.msg then
local number = SU.formatNumber(counters.value[level], options.display)
SILE.call("fluent", { number = number }, { options.msg })
else
SILE.call("show-multilevel-counter", {
id = "sectioning",
display = options.display,
minlevel = level,
level = level
})
end
if options.postnumber and SILE.Commands[options.postnumber] then
SILE.call(options.postnumber)
end
Expand Down

0 comments on commit 1886475

Please sign in to comment.