[OS X TeX] HTML to Latex

Axel Kielhorn tex at axelkielhorn.de
Sun Sep 2 02:48:25 EDT 2012


Am 01.09.2012 um 22:29 schrieb Benoit RIVET:

> Le 1 sept. 2012 à 19:56, André Bellaïche a écrit :
> 
>> Has anyone here ever tried to convert a HTML file into a LaTeX file?
> 
> You can try and use pandoc http://johnmacfarlane.net/pandoc/. To convert example.html into test.tex just invoke on the command line :
> 
> pandoc -f html -t latex -o test.tex example.html
> 
> which gives you a nice test.tex file. However, the test.tex file has no preamble, no \begin and \end{document}, and you may need to do some fine tuning to your file before compiling (e.g. : add all the packages you need…)

And when you use

pandoc -f html -t latex -s -o test.tex example.html

you get a full LaTeX document.
(-s = stand alone)

Axel


More information about the MacOSX-TeX mailing list