I have a simple *.tex file for this question:
\documentclass[12pt,letterpaper]{article}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\begin{document}
\title{A test \LaTeX to HTML page}
\section{Section One}
Hello world. Here is some mathematics:
\begin{equation}
x + y = 3
\end{equation}
\end{document}
The answer to this question taught me how to fix image quality issues (for equations, etc.) that I was having when using htlatex. So, when I run:
htlatex test_article.tex,
I get nice HTML output.
Now I am interested in doing the same thing, except with make4ht, but I have some questions after reading the documentation:
1) Why is htlatex() command repeated twice in the filters example?
local filter = require "make4ht-filter"
local process = filter{"cleanspan", "fixligatures", "hruletohr"}
Make:htlatex() <--- first time
Make:htlatex() <--- second time?
Make:match("html$",process)
2) Image conversion: the documentation recommends a command like this:
Make:image("png$",
"dvipng -bg Transparent -T tight -o ${output} -pp ${page} ${source}")
How will ${output}, ${page} and ${source} be figured out? Is this automatic, or is this assuming that I have supplied these parameters somewhere? If the second, where should I supply these parameters?
So far, I have written the following in test_article.mk4:
local filter = require "make4ht-filter"
local process = filter{"cleanspan", "fixligatures", "hruletohr"}
Make:htlatex()
Make:htlatex()
Make:image("png$",
"dvipng -bg Transparent -T tight -o ${output} -pp ${page} ${source}")
Make:match("html$",process)
Make:match("html$", "tidy -m -xml -utf8 -q -i ${filename}")
I run the following command (-n for disable tex4ht):
make4ht "test_article.tex" -n
...but then get the following error:
----------------------------
t4ht.c (2012-07-25-19:28 kpathsea)
t4ht -p
test_article.dvi
(a:/texlive/2015/texmf-dist/tex4ht/base/win32/tex4ht.env)
--- warning --- Can't find/open file `test_article.lg'
Parse LG
Cannot read log file: test_article.lg
Hopefully, this error is related to some of my questions that I have asked above.
make4ht, and your answer! You're right, I don't want the-noption, I misread it as the option to disable tex4ht from processing the image files -- how do I do that disabling (or is it automatic with theimagefunction)? – bzm3r Jan 08 '16 at 22:01imagefunction automatically.-noption should be passed tot4ht, you can pass it usingmak4ht filename "" "" " -n", but you don't need it – michal.h21 Jan 08 '16 at 22:07