View Full Version : LaTeX and OpenOffice -> EPUB ? (Professional solution)


Randy11
04-17-2009, 03:10 AM
Hi,

I'm looking for a solution to convert LaTeX and OpenOffice files to EPUB.

I've discussed with authors and editors of the interest of the numeric version of a paper book and the BIG interest of the ebooks readers. Also, we talk about DRM...

So, someone has an experience of the conversion ?

Could help to improve the process of conversion (professional point of view) ?

Thanks for your replies or your help. This will help to have more ebooks :)

P.S. : I make this research only for help some people. No profit. I've only the hope to read some recent ebook in France and wrote in french :)

Jellby
04-17-2009, 05:16 AM
For OpenOffice, there is eScape (http://wiki.mobileread.com/wiki/EScape) (I don't know how "automatic" it is, though).

For LaTeX, I don't think there is an all-in-one solution. There are a couple of TeX->HTML solutions whose name I don't remember exactly (t4h? tex2html?), which may be a starting point.

YGG-
04-17-2009, 06:55 AM
Have you tried with LYX? => Html or .pdf.

Randy11
04-17-2009, 08:17 AM
HTML to EPUB ? A good idea but how to make that ?

The aim it's to obtain files in EPUB format for authors and editors.

I don't use LyX but I think LaTex or LyX it's the same problem : how to pass from HTML to EPUB with a minimal pain.

YGG-
04-17-2009, 08:50 AM
Found this in Google ? :
http://www.bookglutton.com/api/docs/d/getepub

Randy11
04-17-2009, 09:13 AM
BookGlutton : Intersting !
I must try it. After, it's a commercial problem ... it's not mine problem :)

Jellby
04-17-2009, 12:27 PM
HTML to EPUB ? A good idea but how to make that
?

ePUB is nothing more than zipped (X)HTML + CSS with some restrictions and metadata, so HTML to ePUB should be pretty straightforward. Try Calibre for that.

kovidgoyal
04-17-2009, 12:59 PM
calibre directly converts openoffice files to epub

Randy11
04-17-2009, 05:47 PM
True ? Good news :)

I must confess that I haven't use your soft ... Do you conserve the page's layout ?

hidari
05-06-2009, 07:00 AM
calibre directly converts openoffice files to epub

Good news Kovid. Was not aware of that but anything that supports Open Office is a good thing in my book.

DaleDe
05-07-2009, 02:01 PM
Good news Kovid. Was not aware of that but anything that supports Open Office is a good thing in my book.

You will be happy to note that you can now create open office documents from our wiki pages.

Dale

smurphy
09-03-2009, 10:45 AM
calibre directly converts openoffice files to epub

How about latex files ?
I have to admit that the output quality of latex written text is not equaled - wherever I look at. Using latex, all you have to do is concentrate on the content. After that - all you do is latex the file once to get all indexes out, and a second time to also have the TOC, appendix etc. included - Just great !

IMHO = that would be the best tool to write it. eventually the Lyx folks should write a plugin to export to ePub :)

WillAdams
09-03-2009, 10:57 AM
If you want LyX to export to epub you'll either need to write the conversion tool yourself, or convince the developers to add it --- thus far there's been only one person requesting this feature on the LyX users mailing llist.

William

smurphy
09-03-2009, 11:20 AM
Well - it would be enough - IMHO - to have one person to write an eBook using Lyx, and show the results... You'd be amazed :)
Unfortunately, I'm no C++ coder - so it may get ugly. However Lyx could export to HTML, then the conversion to ePub should not be hard to implement. I'll see if there is a scripting capability to take care of that.

veysey
09-04-2009, 10:57 AM
I think there are two questions here. First, is openoffice, and Kovid answered that. Second, is latex, and that's interesting.

You can do a rough job with latex2html, but I don't know how clean that comes out. I haven't had great luck. IMHO what you really want to do is preserve links (to equations, references, toc, etc) in html and transform vector graphics -> svg and equations -> mathml (also svg) (and, of course, raster graphics as png). Then try converting that into epub ...

There are some tools out there that nibble on this problem (texvc and svglatex), but I'm not aware of any good solutions. (Is converting the entire document to svg a good solution? I can do that, but it's really no better than pdf. You need integrated html and svg.

You could also work through pdf intermediaries, since pdflatex is pretty advanced, but that creates other problems.

I'm keen to see what I can do with svg and html epub books, and to see how the prs-505 can handle svg (??) so I'll be playing around with this problem and will report back if I manage anything useful.

Addendum. This may be useful: http://www.w3.org/Math/Software/mathml_software_cat_converters.html

HEVEA (http://pauillac.inria.fr/~maranget/hevea/) looks particularly interesting.

frabjous
09-05-2009, 07:36 PM
If the interest in LaTeX is motivated by the better looking output it produces, then conversion to HTML isn't really the way to go; it'll just destroy the improvements, and go back to something more mundane looking. That's fine, if you just want the document in that format...

If you want to preserve the advantages of LaTeX's superior looking output, I would go ahead and edit it to make it the right size for your reader, using the geometry package to set the page size to your reader's screen size with minimal margins -- and depending how low you go, add a line like \emergencystretch=11pt which will mean fewer words intruding into the margins if you make the line size shorter than LaTeX is used to. \usepackage{microtype} might also be wortwhile addition. Then process it with pdflatex.

If your reader can read PDFs, you're all set. If not, and can spare the extra file size, I'd go ahead and convert the PDF into a series of images, which could be used in an ePub. Tools like PDFLRF, PDFRead, etc., which you can find here at MobileRead should help. (Use calibre to change an LRF to ePub at the end if need be.)

hermanader
09-09-2009, 02:21 PM
Being an intensive LaTeX user, I found that in an Windows environment,
TeX4ht is easier to use than Latex2HTML which was originally developed
as an Unix application.
In fact I generate all my webpages using TeX4ht.
(It takes time to sort out how to do it, I must admit, but so does Latex2html).

The package allows to generate not only html but also xhtml and xml.

So to obtain ePub format my preferred sequence would be to convert the
LaTeX text to xhtml and than to ePub.

However, with this last step I have no experience.
Suggestions?

Herman

PS.
For all these packages, see:
LaTeX: http://www.tex.ac.uk/
TeX4ht: http://www.cse.ohio-state.edu/~gurari/TeX4ht/mn.html

DaleDe
09-09-2009, 04:27 PM
Try Calibre or Sigil, both can import xhtml and both have their own forums here at Mobileread.

dale

Randy11
09-20-2009, 11:37 AM
Hello,

Sorry for my silent, but I want to say a big "Thanks" to all and your replies.

A goog way seems to be :
- TeX4ht: LaTeX to HTML in a Windows environment
- Calibre or Sigil

Really, thanks to all.

Randy11

frostschutz
10-16-2010, 06:40 PM
Sorry for reviving this old thread; I was looking for a way to convert a LaTeX document to EPUB and when googling for "latex epub", this thread actually comes out on the top.

Just wanted to add another tool to the list.

- plasTeX: written in Python, produces very clean XHTML output, which can then easily be converted to EPUB. The current developer snapshot even contains an EPUB renderer, so it may be able to produce EPUB files directly in the future.

http://plastex.sourceforge.net/

I just used it to convert a novel length book that had all sorts of LaTeXy shmonck in it for printing (source files split by chapter, fancy headers and the like), worked without a hitch, without any changes to the original LaTeX source.

Randy11
10-22-2010, 01:47 PM
Hi Frostschutz,

Don't be "sorry". It's a good news :)

Now you have a big problem. We're are waiting for the conversion to Epub !

Don't waste your time to read all news in the forum : work on the conversion to EPUB :)

Thank a lot Frostschutz.


Sorry for reviving this old thread; I was looking for a way to convert a LaTeX document to EPUB and when googling for "latex epub", this thread actually comes out on the top.

[....]

http://plastex.sourceforge.net/

I just used it to convert a novel length book that had all sorts of LaTeXy shmonck in it for printing (source files split by chapter, fancy headers and the like), worked without a hitch, without any changes to the original LaTeX source.

awp
10-26-2010, 02:18 PM
Atlantis Word Processor can convert ODT to EPUB too.

eBookLuke
11-10-2010, 11:03 PM
Hi,

I'm looking for a solution to convert LaTeX and OpenOffice files to EPUB.

Hi,

there is no "automatic" tool to convert documents to ePub in a professional way.
There are some good tools to convert almost anything in ePub (Calibre) and to edit the ePub (Sigil) but professionals write the ePub by handů
I'm writing an extension, writer2epub, that doesn't converts the OOo document, but creates an epub with professional look.
The difference between Calibre and W2E is that Calibre retains all the original formatting, while W2E use a "professional" formatting by superimpose a particular CSS. Moreover, the W2E code is easily readable and editable.

Anyway, the best solution is always to write epub by hand, in particular if you want a well formatted ebook and "special effects"

Luke