I have the task to find a tool that converts LateX to HTML.

I already had a look at different tools like Hevea, pandoc, Hyperlatex. The best looking tool for my needs was Hevea but lacks support for images on Windows.

my requirements are:

  • working on windows (7)
  • scriptable (batch script or something similar)
  • splitting in multiple files on chapters
  • possibilty to name the splitted files per chapter (e.g. \chapter{Rights & Permissions} -> login.html
  • same .tex file should also be used to produce pdf

Have you tried tex4ht? It does easily support all your requirements, except renaming split chapter names (it could be done, but not easily and some stuff like cross-references might fail). Renaming can be done with some script replaces all hyperlinks to renamed file in all html files.

Try this command:

make4ht -u filename "xhtml,2"

the numeric parameter (2) directs which sectioning levels should be split to separate files. Possible variants are 1, 2, 3, 4.

  • I tried this but the effort to make it work with the filenames was bigger than the solution I found for Hevea. There is a hevea.sty file to make it compliant with Latex (hevea.inria.fr/doc/manual007.html). And I made the image conversion/renaming with a small java file, since it is a documentation for a Java web project and I'm a java developer. – Lars Miesner Apr 4 '16 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.