Because it’s been more than a week since I last opened myself up to scorn about my lack of scripting skillz, here’s a how-to for another semiautomated e-production task in BBEdit (or TextWrangler): renumbering navpoints in an NCX.
Continue reading “Renumbering navpoints in BBEdit the not-so-hard way”
Almost two years ago, I wrote a post called “Degristling the sausage” to explain my method of using BBEdit to get a list of which CSS classes are actually applied in a given EPUB file, out of the sometimes hundreds that are included in the stylesheet. Apparently I’m not the only person who needs to do this sort of thing, because that post has stayed in the top four pages on this site ever since, and clever people keep linking to it.
What a thing was this, too, which that mighty man wrought and endured in the carven horse, wherein all we chiefs of the Argives were sitting, bearing to the Trojans death and fate!
—Homer, Odyssey (translated by A.T. Murray, 1919)
A couple of weeks ago, Hugh McGuire tweeted this:
and then he blogged the replies he received at Including a PDF in an EPUB.
This is something I’d been wondering about for a while, too. I remembered Joshua Tallent of eBookArchitects mentioning at at least one workshop that it was possible to embed a PDF in an EPUB, but I’d never tried it. The company I work for publishes a lot of craft books whose print editions have patterns and templates in the back, and so far we’ve either had to suppress the e-book versions entirely or supply those patterns to our e-book readers through the Web. Hugh’s post reminded me that I’d been meaning to test Joshua’s tip to see if it would help solve our pattern problem, so I finally just did that.
TL;DR: Yes, you can embed a PDF in an EPUB so that all its pages are viewable in iBooks and Adobe RMSDK–based readers, but display is wonky and not necessarily readable, and you can’t print the PDF at full size, if at all, so it doesn’t solve my particular problem. It might solve your problems, though, so a more detailed breakdown of what I found follows. Continue reading “PDFs in EPUBs: Test results”
One of the things I do at my job is clean up and beautify e-books that have been produced by a “meatgrinder”—the sort of automated conversion process that an outsourcer uses. My company has worked with a couple of conversion companies, and there are definite differences in the quality and markup philosophy of the files they produce, but one problem that appears to be chronic is that the EPUBs come back with CSS files containing tons of unused style declarations.
I’m talking thousands of lines, when two to three hundred will usually do.
This makes the files extremely tedious to troubleshoot and rework, so one of the first things I usually do if I know I’m going to be spending a considerable chunk of my day living in a particular EPUB is to cut down that stylesheet to what’s actually being used.