PlasTeX is an implementation of LaTeX in Python, which supports custom rendering classes - you can provide a new class on the output end of the function which transforms something a little like DOM into XHTML or XML.

I'm thinking of using this to convert a series of novels which have been written in LaTeX into ePub.

It occurred to me that I might write a custom rendering engine to transform the book I have into all of the file-components of ePub, however it's likely that somebody else has already done this. Not wanting to re-invent the wheel, are you aware of any project (or possibly an undocumented feature of PlasTeX) which already does what I need?

A search of Google and the PlasTeX documentation suggests that I might have to actually write this thing! Please say it 'aint so!

ePub does not seem to be a particularly difficult format to master, however I am incredibly lazy and dislike repeating programming that other (possibly much better) developers have already done, so please point me in the right direction!


I just started to write a render for plasTex, but it is still a very preliminary version, you can find it here:




Pubtex is still in beta, but is it targeted at exactly this kind of niche. If you are familiar with git, you can start using it immediately for LaTeX -> HTML conversion. Otherwise, contact me via address listed on the Pubtex homepage and I'll hook you up.

Disclaimer: I work for Pubtex.

  • Kevin, are you saying that PubTeX can already do what I want? I've begun writing my own PlasTeX renderer which I had planned to release via a Google Code project - but I probably will not bother if yours can do the trick. Apr 6 '11 at 11:08
  • Yes--we are working on a a LaTeX -> ePub converter. If you have a novel with simple formatting, I should be able to run it through for you pretty easily. We don't have any publicly available tools yet though, so you'll have to send me an email.
    – Kevin L.
    Apr 6 '11 at 23:42
  • The domain is expired... Is this project dead?
    – leonbloy
    Apr 8 '12 at 13:22

In Plastex, one way to control the kind of output is with themes. There is a theme called ePub. You invoke theme:ePub like this:

c:\python27\python.exe c:\python27\Scripts\plastex --theme=ePub source.tex 

but I have not tried because I stumbled first with theme:minimal which produces only the HTML pages and the PNG figures with the equations; barebones, no fancy navigation, bibliography, or anything like that. That is all I need. With that, I use Sigil to assembly my ePub.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.