Someone mentioned that pandoc works decently for this.
for input in *.tex; do
pandoc "${input}" \
--from latex \
--to html \
--pdf-engine=latexmk \
--css="styles/texstyle.css" \
--standalone \
--mathjax \
--toc \
--number-sections \
--output="${input%".tex"}.html" ;
done
My pandoc version is: pandoc 3.1.9
Features: +server +lua
Scripting engine: Lua 5.4