Ebook improvements (#103)

* Ebook improvements

Removes fixed height and width from the resulting HTML and adds an
additional css for the ebook formats.

* Update gitignore

* Strip tags
This commit is contained in:
Hendrik Kleinwaechter
2023-05-26 13:35:04 +02:00
committed by GitHub
parent 61c33e4b60
commit 5412aa6e50
5 changed files with 23 additions and 2 deletions

9
book/book.mk4 Normal file
View File

@@ -0,0 +1,9 @@
local filter = require "make4ht-filter"
local changePath = function(s) return s:gsub("%./images//","images/") end
local removeHeight = function(s) return s:gsub('height="%d+"', '') end
local removeWidth = function(s) return s:gsub('width="%d+"', '') end
local removeMaxWidth = function(s) return s:gsub(' max-width: %d+px;', '') end
local removeFixedSettings = function(s) return removeMaxWidth(removeWidth(removeHeight(changePath(s)))) end
local process = filter{removeFixedSettings}
Make:htlatex()
Make:match("html$",process)