ok, I give up. I get this error with only tex4ht and not with pdflatex and I am not able to figure where it coming from. It says /usr/local/texlive/2015/texmf-dist/tex/latex/caption/ltcaption.sty just before the error, and then it says:
*geometry* driver: auto-detecting
*geometry* detected driver: dvips
! Missing $ inserted.
<inserted text>
$
l.273 \EndPreamble
but when I look at my latex file, at line 273, I do not see any problem there. there is not even any math there. This is line 273 in my latex