I think that, if you are able to import your html tables in Excel or OpenOffice Calc, these tools are what you need:
The first one is a macro you add to your Excel, and provides you with an extra button to create the LaTeX code for the table from a set of selected cells, ready to be pasted in your .tex source.
The second, is an extension of OO, but should work in the same way.
Edit: there is also html2LaTeX, but I never used it.
Happy TeXing!
What your best option would be depends on a lot on what your needs are. Are you only trying to import the structure, or exact look, or what? How important is it that the resulting document really be done properly?
Anyway, here are a number of things to try.
AbiWord: an open source word processor that can import HTML or similar formats and export LaTeX. (Be sure to install the extra export plugins when installing; the default install doesn't include a LaTeX export, but it can easily be chosen.)
Writer2LaTeX: An openoffice plugin for exporting to LaTeX; Open office supports HTML import of course (Though W2L can handle .odt to .tex even without Open Office installed; but then converting .html to .odt might be trickier.)
rtf2latex2e: as its name implies, converts RTF to LaTeX; so you'd need some way to convert HTML to RTF (though that's relatively easy, can be done with most any word processor).
pandoc: Haskell program for converting between various mark-up languages, including HTML and LaTeX
html2latex: Perl script for such conversions (I've never tried it but plan on doing so soon)
htmltolatex Java program along similar lines (Again, I haven't tried it.)
Even with all those options, however, personally, if it was something I truly cared about doing right, simply transferring over the plain text and redoing everything manually would still be my solution of choice. The above are just quick fixes for a document of relatively little importance, or when having it in LaTeX in addition to HTML is just a matter of convenience.
Best Answer
I'd recommend
make4ht
which, from the documentation:The author of
make4ht
is michal-h21 and is a very active contributor to this site.Let's use the following small example,
mwe.tex
, in what follows:example 1
Running
gives the output:
example 2
From here we can customise the output by employing configuration files; if you have the following:
roxy.cfg
and run
then you receive
example 3
If you have html tidy installed, then you can customise your build process to employ it by using the following
roxy.mk4
file:roxy.mk4
and an
html-tidy.txt
configuration filethen you can run
to receive