10-09-2015, 03:36 PM | #1 |
Member
Posts: 21
Karma: 493474
Join Date: Mar 2011
Location: Northern California
Device: Acer A500
|
epub to pdf
Is there a good way to produce a paperback version from epub source files?
I wrote a technical textbook (lots of equations and circuit diagrams) several years ago using LaTeX, which does a beautiful job of typesetting. I sell paperback and PDF versions on Lulu.com. A few months ago I created an HTML version using tex4ht, which uses png for all the equations and figures. The HTML version is available for free online (bob.cs.sonoma.edu), but most students still buy the paperback or PDF versions. The formatting is better than the HTML, and about a third still like having paper. I am starting a second book and would like to sell it on Amazon – Kindle and CreateSpace. I would like to use epub 3.0. That would allow me to use MathML for the equations and SVG for the figures. I would then have a “real” ebook. But my current experience shows that many students would still like to buy a paperback version. Of course, the paperback version would need to look at least as good as the ebook version. Am I getting too far ahead of the curve? At the time I first put my book on Lulu.com, Amazon would not sell PDF versions. Now they have Kindle Textbook Creator, which apparently resizes PDF books to better fit small screen devices. To reiterate, this is a technical textbook with lots of equations, circuit diagrams, and computer code. I’m wondering if the flowing text feature of epub will ever be good for this type of book. |
10-09-2015, 03:41 PM | #2 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Calibre can convert to PDF. But if you want more control, better typesetting and extra features, check the PrincePDF calibre plugin, which uses Prince (you'd have to install that separately) to generate the PDF from the XHTML contained in the ePub.
|
Advert | |
|
10-09-2015, 08:54 PM | #3 |
Wizard
Posts: 2,987
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
LaTeXML can convert documents from LaTeX to EPUB version 3. Try it out on your existing LaTeX book, and see if it produces something satisfactory for you. If so, you can write your next book in LaTeX, as well.
|
10-11-2015, 06:20 AM | #4 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
I have done something similar, to wit: I opened the epub in Sigil Book View, copied the entire thing, and pasted it into Open Office Writer (which I find superior to Word for tweaking a print edition, and especially for outputting PDF format).
Requires a lot of tweaking, but so does a print-quality PDF from any source. |
10-18-2015, 11:30 AM | #5 | |
Member
Posts: 21
Karma: 493474
Join Date: Mar 2011
Location: Northern California
Device: Acer A500
|
Quote:
Both LaTeXML and tex4ht are very complex projects. They have to pare down printed-page formatting to html, from which I can produce epub. I have this (engineering) sense that it's better to create the book's source in html and then add to that for the printed page. |
|
Advert | |
|
10-18-2015, 11:36 AM | #6 | |
Member
Posts: 21
Karma: 493474
Join Date: Mar 2011
Location: Northern California
Device: Acer A500
|
Quote:
|
|
10-18-2015, 01:29 PM | #7 | |
Guru
Posts: 970
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
|
Quote:
|
|
10-18-2015, 01:49 PM | #8 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
I have no idea, sorry (and I use linux). But the download page has two Windows versions as zip files (no installer), that may mean it's possible to just copy the files somewhere, without installation.
|
10-19-2015, 05:40 PM | #10 |
Fanatic
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
|
I get the impression that MathML support is still a bit wobbly, while Javascript support seems OK in EPUB3 (and iBooks, for that matter). Will it not be safer to use MathJax to display maths? And in that case, may it be preferable to keep the maths in the LaTeX format (which MathJax supports), thus keeping the source human-readable?
Of course, if Amazon/Kindle is the target, you are stuck with EPUB2 solutions. And given that Amazon still haven't solved their little embedded-fonts problem, you are stuck with displaying all maths as SVG if you wish to have consistent display of math symbols. And good luck with the proper vertical alignment of inline SVG's with superscripts etc.... |
10-24-2015, 12:40 PM | #11 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
If you know how to write some simple shell scripts, I'd recommend starting in the opposite direction, writing the content in DocBook XML. From there, you can use dblatex to create LaTeX content for print, and use dbtoepub to create the EPUB. Or if you prefer, it is fairly straightforward to write a custom XML to (X)HTML translator.
Then, write a little script that replaces the equations with SVG images. To generate the SVG images, put each equation in a separate LaTeX file (and include it from your main LaTeX file so you don't have to have two copies lying around). Then: 1. Run pdftex/pdflatex to create a PDF from the single-equation .tex file. 2. Use Inkscape to convert the PDF to SVG. You may have to do some fiddling to get the page size right. I've only done this with full-page content, so I have no idea what would be needed there—probably just replacing the bounding boxes in the SVG with whatever is appropriate for that particular equation. |
10-24-2015, 04:29 PM | #12 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Even if they had resolved the issue, that doesn't address the KF7 side. There are, by all accounts, still millions of the things in circulation. Even if it were only a million--who wants to antagonize readers by putting something out that can't be read on KF7? Hitch |
|
10-25-2015, 07:04 AM | #13 | |
Fanatic
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
|
Quote:
I recently converted a three-volume physics text-book to epub, KF8, and mobi. For the latter, the words "silk purse" and "sow's ear" seem appropriate. I ended up using media queries and displaying just about all math as gif in the mobi version, and got a version that at best can be described as intelligible, while I could use CSS/HTML+SVG to get a fairly nice result for the other two formats. To answer your question, Hitch, about who is willing to antagonize the mobi7 readers: Anybody who wishes to publish anything but the plainest text book. It boils down to pleasing all people some of the time etc. Given Amazon's market share, grumpy ancient kindle owners (ancient kindles, that is, not necessarily the owners) is the price you have to pay if you want to publish anything with any kind of interesting layout. |
|
10-26-2015, 06:11 AM | #14 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Unfortunately, grumpy ancient Kindle owners have the ability, and perhaps the inclination, to give a one-star review to a book they can't read.
OTOH, I doubt that many of them would be buying a three-volume physics e-book! |
10-26-2015, 12:22 PM | #15 | |
Fanatic
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
|
Quote:
I did think about adding a mobi-only disclaimer on the title page saying something like "sorry, your reader isn't quite up to this book." Best solution would of course be if Amazon allowed authors to deselect support for mobi on the sales page. |
|
Tags |
epub 3, pdf, technical, textbook |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convert epub to pdf, with notes with main text in the pdf? | 8140david | ePub | 1 | 06-18-2015 01:13 PM |
Convert epub to pdf, with notes with main text in the pdf? | 8140david | Conversion | 1 | 06-18-2015 11:02 AM |
ePub->pdf:Please help to overcome long standing Kindle pdf bug | EbokJunkie | Conversion | 4 | 01-25-2015 12:44 PM |