Files
the-sourdough-framework/book/book.mk4
2023-07-06 09:01:35 +02:00

19 lines
645 B
Plaintext

local filter = require "make4ht-filter"
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(s))) end
local process = filter{removeFixedSettings}
local domfilter = require "make4ht-domfilter"
filter_settings "collapsetoc" {
toc_query = "nav.TOC"
}
local domprocess = domfilter{"collapsetoc"}
Make:latexmk {}
-- Make:htlatex {}
Make:match("html$",process)
Make:match("html$",domprocess)