html to latex and vice-versa

posted Jun 22, 2009, 5:42 AM by G. Maze ‎(admin)‎   [ updated Jun 6, 2012, 6:41 AM by Guillaume Maze ]
I used to use latex2html to move my notes and papers written in LaTeX to my webpage (latex2html is available through porticus).
But I also like from time to time to grab some peace of the web to embed it in my LaTeX notes. To do it, I use html2latex.

My favorites commands:

LaTeX -> HTML:
latex2html -split 0 -nonavigation -noinfo -image_type gif

HTML -> LaTeX:

Rqs about html2latex:
My Perl package was not complete, I had to install:
  1. HTML::Tree - It requires HTML::Parser.
  2. XML::Simple - It requires XML::Parser.
to do so, I type: "perl -MCPAN -e shell"
then: install HTML::Tree
and: install XML::Simple
I had to install a bunch of stuff on the fly, all the dependencies that were missing.

Last but not least, I don't know why but this was not enough, I had the following error message when I first tried to run html2latex:
Can't locate HTML/ in @INC (@INC contains: /Library/Perl/Updates/5.8.8 /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1/darwin-thread-multi-2level /Library/Perl/5.8.1 .) at HTML/ line 32.
BEGIN failed--compilation aborted at HTML/ line 32.
Compilation failed in require at ./html2latex line 81.
BEGIN failed--compilation aborted at ./html2latex line 81.

So to fix it, I modify the /Library/Perl/5.8.8/AppendToPath file, adding the line:

and then I got it ok.