Great question!

It's not a technical challenge for us: we automatically produce LaTeX with every book generated. And you're correct that we use a private fork of Pandoc for Markua 0.30 books. (For Markua 0.1 and Leanpub Flavoured Markdown books we use a private fork of a different open source project.)

The reason we're saying no here is simple:

We have been incrementally improving our LaTeX template for 12 years. It's part of our secret sauce. If someone wanted to build a Leanpub competitor, our LaTeX template would save them lots of pain and suffering. However, we would not want to deprive them of the joy of experiencing that first-hand!

So, no, you can't produce LaTeX from Leanpub, and it's entirely for business reasons.

So, what to do?

Well, the first thing to do is to realize that Markua is just Markdown minus inline HTML plus some extensions.

So, if you want to produce LaTeX, you can feed your Markua manuscript into the standard open source version of Pandoc, and have it generate LaTeX for you. This won't have the Markua features, of course, but it will at least be a start.

Sorry we don't have a better answer for you here!

Did this answer your question?