I wrote a math paper in LaTeX that uses a custom .sty
file I wrote (defines some math commands, basically, and imports packages with math symbols and fonts) and I want to convert it into a standalone, uncomplicated HTML file. I've tried many converters, such as lwarp, LateXML, latex2html, and htlatex, and I'm not satisfied. Mostly it's because they don't make the math look right. lwarp was close because it saved math as SVGs but for some reason the images looked terrible, with lots of clipping, and there was lots of HTML code for some reason. latex2html did a good job but the resulting HTML looks complicated. My end goal is to post the HTML in a WordPress.com post, so I was worried that the resulting HTML would not be accepted for some reason. (I'm aware of a program called latex2wp but reading the README suggests that it might not work since I use align
.)
There is a combination that gets really close to what I want: pandoc and GladTeX. Pandoc can convert the .tex
file into a GladTeX-friendly HTML file, and then I can run GladTeX to get formulas that appear as images, and the images look good. Admittedly there's problems with centering of display-style formulas, but that can easily be fixed and even if not it's not a big deal.
What I have a problem with is that there is no formula numbering; pandoc inserts ugly, opaque links that are not reader-friendly and don't appear to work whenevery I have a reference to a formula (in the style of "and if you look at (1) you see that x=1", or something). The other converters get numbering right, but not pandoc. There are things you can put specifically into pandoc to try and get numbering, but then the document is not truly latex anymore.
So is there a good converter of latex to HTML that does everything but formulas, and which will produce a GladTeX-friendly HTML file for me to run GladTeX on?