cre: adds in-page footnotes and alternative TOC hints tweaks

Adds 2 tweaks to allow displaying footnotes at the bottom of pages,
like it's done in some printed books. This will work only with
books with correctly specified footnotes with the adequate EPUB
attributes, and with Wikipedia EPUBs. But users may be able to
activate them for other books with some user style tweaks.

Adds a few tweaks to control the build of the alternative TOC.
With some user style tweaks, one may be able to build a usable
TOC for some badly formatted or converted books.

Also fixes 2 paragraphs tweaks.
This commit is contained in:
poire-z
2019-01-01 18:23:10 +01:00
committed by Frans de Jonge
parent d500a6ace5
commit 3fe6eeff71
3 changed files with 139 additions and 3 deletions

View File

@@ -430,6 +430,26 @@ You can enable individual tweaks on this book with a tap, or view more details a
end,
separator = item.separator,
})
elseif item.info_text then -- informative menu item
table.insert(menu, {
text = item.title or "### undefined menu title ###",
-- No check box.
-- Show the info text when either tap or hold
keep_menu_open = true,
callback = function()
UIManager:show(InfoMessage:new{
text = item.info_text,
face = Font:getFace(item.smaller_font and "x_smallinfofont" or "smallinfofont"),
})
end,
hold_callback = function()
UIManager:show(InfoMessage:new{
text = item.info_text,
face = Font:getFace(item.smaller_font and "x_smallinfofont" or "smallinfofont"),
})
end,
separator = item.separator,
})
else
table.insert(menu, {
text = item.if_empty_menu_title or _("This section is empty"),