Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 12-06-2011, 09:59 AM   #1
kongzifan
Enthusiast
kongzifan began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2009
Device: Kindle, iPhone, iPad
LaTeX to HTML conversion

I have the latex source of a book and want to read the book in Kindle. I know if I can get the html files, then calibre can do the rest of the job.

I thought LaTeX-->HTML should be very easy, since I've already got all the source files.
However, I've tried many different tools including latex2html, tt4h, plastex, pandoc etc., and none of them produce satisfactory result.

Is there any good LaTeX to HTML conversion software?
kongzifan is offline   Reply With Quote
Old 12-06-2011, 10:03 AM   #2
HomeInMyShoes
Ginormous Intergalactic
HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.
 
HomeInMyShoes's Avatar
 
Posts: 14,241
Karma: 45002891
Join Date: Jul 2011
Location: junkyard
Device: Kindle3
It should be, but there's some stuff in LaTeX that probably won't convert too well. LaTeX is a bit more placement-oriented than HTML which is a bit more free-flow based. There are other things that LaTeX does well like equations that HTML is not going to support too much.

What kinds of issues are causing you grief or what kind of source material is it? That might lead people to better recommendations.
HomeInMyShoes is offline   Reply With Quote
Old 12-06-2011, 10:14 AM   #3
kongzifan
Enthusiast
kongzifan began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2009
Device: Kindle, iPhone, iPad
The book source is available at https://launchpad.net/fenics-book, which contains a lot of math formulas and pdf images.

I took a lot of effort manually converting all the pdf and png images to eps images, so that latex2html won't complain. However, after this much effort, latex2html still failed to convert any of the math formulas or figures to images. The log files (book.aux and images.log) are attached.
Attached Files
File Type: zip log.zip (99.7 KB, 36 views)
kongzifan is offline   Reply With Quote
Old 12-06-2011, 10:26 AM   #4
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,870
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
@konzifan
You do realize TEX was written by Dr. Knuth because he got tired of printers mangling formulas in his Math Textbooks?
theducks is offline   Reply With Quote
Old 12-06-2011, 10:34 AM   #5
HomeInMyShoes
Ginormous Intergalactic
HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.HomeInMyShoes ought to be getting tired of karma fortunes by now.
 
HomeInMyShoes's Avatar
 
Posts: 14,241
Karma: 45002891
Join Date: Jul 2011
Location: junkyard
Device: Kindle3
The pdf images and math formulas are going to give you fits. Right now, the e-reader formats just aren't that useful when it comes to scientific (espeically math) stuff.

It can be done, but from previous threads, there's no real easy solution for it outside of some manual labour.
HomeInMyShoes is offline   Reply With Quote
Old 12-06-2011, 10:51 AM   #6
kongzifan
Enthusiast
kongzifan began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2009
Device: Kindle, iPhone, iPad
latex2html used to give me quite good results (even for documents with a lot of math formulas and figures). However, it hasn't been updated for almost 10 years, and might be too old to understand some of the new latex commands.
kongzifan is offline   Reply With Quote
Old 12-08-2011, 04:29 PM   #7
kongzifan
Enthusiast
kongzifan began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2009
Device: Kindle, iPhone, iPad
After trying different options, I found the most satisfactory result is obtained by compiling latex into A5 (or 6") size pdfs (as discussed in http://www.mobileread.com/forums/sho...d.php?t=107585). I wish Kindle could support table of contents and internal links, then those pdfs would be excellent to read, given that they present the math equations and figures beautifully.
kongzifan is offline   Reply With Quote
Old 12-11-2011, 09:13 AM   #8
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 743
Karma: 2031399
Join Date: Sep 2010
Device: iriver Story HD
Quote:
Originally Posted by kongzifan View Post
Is there any good LaTeX to HTML conversion software?
In many ways it's the same issue as with PDF->HTML. LaTeX is designed to produce print matter (dvi, pdf) as such there are many things in TeX that can not be expressed easily or at all in HTML and vice versa.

If you want it on the eReader, making a PDF with eReader formats in the font size you like might indeed be the best option. However not even that always works, it depends on how the TeX document is made and how well it copes with "small" paper geometry...

Out of the genuine tex->html converters I've had best results with plastex. It requires some fiddling and the html some manual fixing. But at least it's something. Commenting unnecessary stuff out of the TeX first (such as header / footer / pagenumbers / etc) might help also.
frostschutz is offline   Reply With Quote
Old 12-14-2011, 10:47 AM   #9
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 595
Karma: 1281565
Join Date: Dec 2011
Location: Padova, Italy
Device: Kindle3, Odyssey, eDGe, A60, PRS-T1, iPad3, KoboGlo
Quote:
Originally Posted by frostschutz View Post
If you want it on the eReader, making a PDF with eReader formats in the font size you like might indeed be the best option. However not even that always works, it depends on how the TeX document is made and how well it copes with "small" paper geometry...

Out of the genuine tex->html converters I've had best results with plastex. It requires some fiddling and the html some manual fixing. But at least it's something. Commenting unnecessary stuff out of the TeX first (such as header / footer / pagenumbers / etc) might help also.
I completely agree. For math stuff right now there is no efficient and elegant solution other than a) using an image for each math instance or b) producing the whole document as a PDF (with the appropriate device-size, e.g. A5).

Also tex4ht does a good job in converting LaTeX -> (X)HTML.
AlPe is offline   Reply With Quote
Old 12-14-2011, 04:41 PM   #10
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 595
Karma: 1281565
Join Date: Dec 2011
Location: Padova, Italy
Device: Kindle3, Odyssey, eDGe, A60, PRS-T1, iPad3, KoboGlo
I forgot to mention that LaTeXML is a promising project as well.
AlPe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
docbook vs. latex vs. html danmc Workshop 4 09-15-2011 02:15 PM
Problem with html -> Mobi conversion - html tags visible. khromov Calibre 9 08-06-2011 11:25 AM
HTML Conversion yoss15 Conversion 12 07-28-2011 04:42 PM
conversion TO html in_the_fade Calibre 4 04-29-2010 10:51 AM
Chaîne complète d'édition : HTML, LaTeX, PDF, EPUB à venir. Randy11 Software 2 04-05-2009 11:42 AM


All times are GMT -4. The time now is 06:31 PM.


MobileRead.com is a privately owned, operated and funded community.