THE PORTUGUESE CASE
It takes the most dogged of ebook developers to solve the toughest problems. This week, Keith Snyder proves his mettle as he solves a cross-device problem and then digs into a pesky swipe issue.
“You come recommended,” he said.
“Should be a straightforward job.”
“I want to be sure the chapter names appear in the Go To menu.”
“Understood. Can I get the Word file instead of the HTML export?”
“No, I’ve made changes to the HTML.”
I paused. “I see.”
A book of importance to his family. Just as I was making the rocky switch from EPUB2 to EPUB3, so my usual apps didn’t work anymore and I wasn’t sure what to blame on the new format and what to blame on my lack of familiarity. Starting with the client’s own HTML Word export. Word HTML is merda. Which is Portuguese. Which was the language this book was in.
“Sounds straightforward,” I said.
* * *
The app I was using was unfamiliar, but sleep deprivation was an old friend.
The chapter titles showed up fine, everywhere but Kindle for iOS. I checked with my usual sources and got a tip. Kindle for iOS might pull its Go To from the nav.xhtml.
I recoded. I tested. The only thing that populated the Go To correctly in Kindle for iOS was a .mobi loaded onto an iPad from Dropbox. But in Kindle for PC, that same mobi’s Go To didn’t have the chapter names.
How much do we care about Kindle for PC, I asked.
The client sent back user-poll data: Primary platform for his market.
That’s great to know, I said.
He sent the .azw he’d made by uploading a Word file to Amazon. It had chapter names in the Go To menu.
* * *
My brain swam. My breath was toxic. I seemed to have a beard. Laptop light glinted off a clutter of mugs. A voice came to me:
Go To doesn’t populate in an .azk on iPad until you upload it to Amazon.
“Wait, don’t go. How am I supposed to check it before upload, then?”
You don’t. You cross your fingers and click. Well, actually . . . on iPad, you can check design in the .azk synced through iTunes the way you’re supposed to, and check Go To content in the .mobi loaded through Dropbox the way you’re not supposed to.
Bitter tears coursed down my cheeks.
The voice cackled as it receded.
You knew the job was Kindle when you took it!
* * *
You did it, the client said.
Yeah, I said.
But I noticed something else.
Oh, good, I said.
When I swipe to the previous page from a chapter start, it shows the chapter start again—but only when I get to the chapter start by touching the Go To menu.
I’ll take a look, I said.
He re-sent the .azw he’d made by uploading a Word file to Amazon. It had no swipe problem.
* * *
It was a <div>. A <div> to make a coder kick a hole in a Cinema display. Each chapter was contained by one. It had a margin-top to sink the title on the chapter-opener screen.
It looked at me. I looked at it. I shot it dead and gave the margin-top to the chapter title H1, and then I dragged the file onto the iPad, touched a chapter link, and swiped . . .
The end of the previous chapter appeared. Just like it was supposed to.
I touched another chapter link. No doubled screen. I’d solved it.
I tried the rest of the links.
I hadn’t solved it. Three .xhtml files out of 20 still doubled when I swiped backwards.
But now I had a clue. An honest-to-god clue. I went looking for margin-top values built in somewhere.
* * *
No margin-top values were built in anywhere.
A hundred test versions of the same book littered my Kindle libraries.
* * *
The clientele of the E-Pub is dodgy, but there are things only other ebook people know.
Sallow people with eyes like bruises touched the links, dully swiped to the doubled start pages, nodded or shrugged or sighed. Some picked up their dirty glasses again, returning to the embrace of blessed numbness. Others sobbed.
“Yeah,” said one who did ebooks for a big New York conglomerate. Her soul was gone. “That happens sometimes.”
“Why?”
She handed my tablet back. “You know what happens to people who ask ‘why’ in this business.”
“That a threat?”
The pub went quiet. She leaned in. Depraved light flickered and guttered in her eyes. “It happens sometimes. Understand? It happens.”
Everyone was looking at me.
“It happens,” I said. “Sure.”
“Save yourself,” someone said.
* * *
“It happens,” I told the client.
He named a figure to stay on it. It was enough to buy me socks.
“Let me see what I can do,” I said.
* * *
The HTML is the same, I said at home, to the stacks of dirty dishes. The CSS is the same. The link to the CSS is the same. The header information is the same. There are no divs, no margins anywhere except H1, and I even removed that and it made no difference.
What am I missing . . .
I stopped halfway through a swipe and looked at the chapter-start screen sitting next to its duplicated self.
What am I missing? What’s different about these three chapters?
Nothing. Absolutely nothing. Only their <spine> order. Which—
And suddenly, I knew where to look
* * *
I didn’t charge the extra fee, just said, “Think I’ve got it. See how it looks,” and invoiced for the original amount.
Spine order.
That’s what was different.
Which meant those three all followed different chapters. And at the very ends of the three chapters they followed?
Margin-bottom values.
It was the bullets.
Created in Word. Exported to merda. And I missed them.
Always clean up your bullets.
You can bury it. Bury it deep. In Word HTML. In a foreign language. In an unfamiliar file format. In an unfamiliar app. In a job so small, no one sane would ever bother looking. But all it takes is someone crazy enough or stupid enough or hungry enough to keep shoveling, and keep shoveling, and keep shoveling.
I am that stupid shoveler.
I make ebooks.
KEITH SNYDER is aware that margin is better than margin-top. You can tell him anyway at twitter.com/noteon.
Keith will lead the Aug 26 #eprdctn hour (11 AM) on, what else, Receiving and making client changes.
What a delicious story you wove. I believe you’ve created a new genre: ePub Detective.
Bottom marg at the end of chapters can also make the heading sinkage drop deeper on their following chapters, but only when paying backwards. I’ve noticed it in eink Kindles more than the Kindle tablets/apps
[…] Snyder (@noteon), author of recent epubsecrets post The Portuguese Case, hosted today’s #eprdctn […]