Formatting an ePub/Mobi “Sidebar”
UNDER REVISION: You CAN create an eBook sidebar — sort of.
“Sidebars” (block-text, actually) could work a lot better in eBook and Kindle formats. But they do work to some degree. If you get your initial formatting right, they convert reasonably well.
Like many an author these days, I use MS Word to create manuscripts, and publish on Amazon. I keep meaning to publish ePubs, as well, but removing all of my Amazon links is a pain — and other distributors (understandably) don’t like them.
EDITS IN PROGRESS
The process I originally described in this article worked reasonably for creating “beta reader” versions of my upcoming book (preliminary versions for early readers). It got readable copy out there, reasonably quickly, in PDF, ePub, and mobi (Kindle) formats. But there is a good discussion going on in the KDP community, and I’m learning a lot. As I modify my process, I’m adding notes here.
In particular, Notjohn’s Guide to eBook Formatting has a good process for generating eBooks that can be uploaded to KDP — or anywhere else — so what you get at the end is what you see when you upload. (In the three years since I published my last book, it turns out that you can no longer upload a mobi file! So laboring over the Kindle format doesn’t make much sense. His process may not be quite as quick as the one I’ve been using, but it may not take that much longer, either — and it will produce a good-quality eBook that is ready to publish anywhere. (I’ve yet to find out whether I like that format, though. So far, Kindle mobi formats produced by Calibre have generally been more readable than the ePub formats — with the notable exception of sidebars!)
But an even quicker process may be the one recommended by William Thompson, in How to Publish with Kindle Create. The notes below cover both options, to the degree I’ve investigated them.
(Thompson’s process is simpler, but it requires paid software. I happen to have one of the apps he recommends, so that may be a better way to go, for me.)
I’ve also learned that a) Amazon KDP no longer lets you upload the Kindle mobi format directly, and b) Sigil now has a Page Editor! (More below)
A true sidebar — where the main body of content flows around a separated block of text, so the two are adjacent— is inordinately difficult to create, and impossible to read on smaller devices. (One of the participants in the KDP community discussion on the topic actually managed to get them working — once. But after they did it once, they swore, “Never again!”)
There is something else that does seem to work, however: A wide block of text, with a border around it. (I’ve been calling that a “sidebar”. The only other label I’ve seen used is “block of text”, so I’ve opted for the shorter term.)
The two options serve the same function — provide secondary material where it’s convenient to see, in a way that at the same time is easy to skip over.
A true sidebar is, of course, displayed in a much sexier way, with text flowing around it. But I can live without the sexy look. It is the functionality that is important to me. I need it, which explains the time I’ve been spending on this topic!
Basic Publishing Tools:
- Ms Word, for writing the book
- Calibre (free), for quick conversions to and from ePub and Kindle mobi format
- Sigil (free) or DreamWeaver (expensive, no longer supported), for final format editing. It reads HTML and can output ePub.
- PageEdit (free) — a replacement for Sigil that operates in WYSIWYG mode. From the same folks. (Or use Sigil’s preview mode to see what you changed, as NotJohn likes to do. Your choice.)
- Fire Tablet —indispensable review tool
As you’ll see, it makes a lot of sense to do content editing in MS Word. If that is the case, and I’m using an HTML editor only for conversions, then Sigil may be more than adequate — but Scrivener is coming on fast, for that part of the process.
DreamWeaver vs. Sigil
DreamWeaver (if you have it) has synchronized views of HTML code and formatted pages. The synchronized views make it easy to bounce back and forth, making changes wherever it is most convenient. So in the past, I’ve always preferred that. But that was when I was writing in HTML.
The Fire Tablet is something else I got a heads-up on from NotJohn. He says that an 8" Fire Tablet does everything he needs for reviewing his Kindle books. I’ve been relying on an early Kindle device. Kindle books were okay, but when I sent documents to it, the text was too small to read with a full-width display.
So I did some shopping:
- They run about $90, normally. But as of December 2021, BestBuy was offering them for $54. (!) It comes out to $64 in CA, with tax and a “recycling” fee. But hey, if it helps the environment…
- You can install an app for reading mobi files, an app for reading ePub files, and the Silk browser, which is important because…
- In addition to sending a book to your Kindle email address (and verifying that your own email address is a “valid sender”, each and every time you do it), you can either: a) Use the USB cable to copy files over from your computer, as though the tablet were a disk drive or, b) Use the Silk browser to download an ePub or a Kindle book straight to the device.
- The only caveat for the Silk download process is that Digital Rights Management (DRM) must not be enabled. But DRM is only set up when it’s published by Amazon or whoever — so for reviewing eBooks, the device is a gem!
- And it can play movies! Not to mention it runs the whole suite of Fire TV apps, Audible, YouTube, and others. (Man. Sure wish I was getting nickel for this plug…)
About File Transfers via USB
The 3 Easy Ways… article let me know that this was a possibility. But the interface is different, so step 2 has changed.
The instructions should now be:
- Connect the tablet to the computer.
- Turn on the Fire Tablet. Swipe down from top.
Tap: System — Connected as a media device
Then: Tap for other USB Options
USB Preferences page appears. Under Use USB For, tap File Transfer
- In Windows File Explorer, under This PC, there is now a Fire folder.
With an Internal storage folder under that.
- Drag or copy Kindle mobi files to Internal storage > Books.
Other files go to Internal storage > Documents.
- (You may need to restart the Kindle device for it to see the files.)
Unfortunately, Windows won’t let you create shortcuts to the destinations. You can pin them to the Quick Access section at the top of the File Explorer sidebar. They’ll appear as folders. But you can’t rename them — and with those generic names, it will be easy to get confused!
At the KDP Community discussion I’ve been referencing, William Thompson uses one of several paid programs to generate an ePub file directly. Like NotJohn, he’s happy with his process, too. So both alternatives are worth considering.
Thompson also has an eBook on the subject — another one that is worth a read! (At the very least, do the “Look inside” bit. A review of the TOC suggests that it is well thought-out and rather comprehensive.)
The programs Thompson recommends are:
- Atlantis Word Processor
I happen to have Scrivener already. It can read HTML, and output ePub. So it will be simpler for me to do that, rather than converting Word’s HTML into an ePub myself.
The result may not be as totally generic as NotJohn’s method. But if it’s simpler, if it gives me good Kindle formatting, and if it is compatible with at least one ePub distributor, it will be good enough for me. So I’m inclined towards that process, at the moment.
If you want an ePub format that is guaranteed to work everywhere, for like zippo dollars, then NotJohn’s method is the way to go. If you have the coin or you already have one of the apps, and if you want to save time — and get fancier formatting (maybe), with more restricted distribution options (maybe), then Thompson’s process is the best bet.
Either way, everything (for me) starts with creating the book in MS Word and saving as (simple) “filtered” HTML. So:
- If you’re following Thompson’s process, skip ahead to the section below, “Writing in MS Word”.
- If you’re following NotJohn’s process, keep reading the remainder of this section.
Hitch, who goes by booknookbiz in the community, has also been very helpful. He or she is in the business of formatting print books & eBooks, so that is advice I trust.
Main Sigil Plugins:
I learned about these from the Amazon preview of NotJohn’s book on formatting. (Still need to get that book!)
- Flight Crew — a validation tool for Sigil files.
- ePub Check Validator — to make sure the ePub you’re about to upload to KDP is valid
Other Sigil Plugins
In addition to the main plugins above, there are some other plugins that may come in handy at times:
- test Plugin — to ensure that Sigil is ready to run plugins (if something isn’t working, start here)
- CSS validators — you’ll want one or more of these if you modify the CSS styling (if I wind up doing that, I’ll be here in a tick)
- Check Internal Links — always a good idea
- Kindle Import Plugin — or use Calibre to convert a Kindle to ePub (don’t yet know which one works better)
- Remove inline styles — converts inline styling like <b>this</b> to a CSS “class” (style, that is)
Writing in MS Word
As someone who once spearheaded outlining software way back in the day, I love the ability to drag headings in the Word sidebar, and the ability to rearrange the outline view. (I don’t need the latter often. But when I do, it’s a godsend.)
I also love Word’s many formatting capabilities. I use some of them for sidebars.
So there are other good reasons for editing your book in Word:
- It’s easy to move around the book using the clickable headings displayed on the side.
- Those headings can also be collapsed, and moved, while in the print layout view, so you don’t have to go to the outline view very often.
- It is the way to create a print version for your book. Once your page layouts and styles are set, you can upload a PDF, and get the printed book you thought you were going to get.
- When you’re paginating your book, sometimes you change where a page breaks by modifying paragraph spacing — which doesn’t make any real difference to the eBook — but sometimes it is easier and more effective to condense the text, instead. Doing your content-editing in the print version of the book guarantees that the eBook versions will have the same text.
Quality eBook Conversions for Publication
As NotJohn rightly points out in his (quite inexpensive) ebook on formatting, an ePub is nothing more than an HTML file, and an ePub reader is nothing more than a specialized browser!
He also points out that, since you can upload an ePub to KDP, once you have a good quality ePub, you’re ready to publish it anywhere. So his process revolves around creating that ePub.
If you’ve looked at the binary version of an MS Word document, you know that there is a ton of garbage in there. All that extra stuff makes beautiful printed text, but (as he also points out) it makes conversion to other format pretty unpredictable, and only rarely successful.
Overview of the Process
The value of those tools is twofold:
(1) HTML code is agnostic, but CSS gives you fine-grain control.
HTML codes can be rendered in any number of ways. (For example, does <b>(bold) mean larger font, blacker font, or talk louder?) Your HTML reader can choose. But it’s also limited. (You have paragraphs — all of which are formatted the same way, and you have a large indents that can’t be changed.)
CSS styles (beyond a minimal set) put control of rendering back in the hands of the publisher. On one hand, you’ve put the paints and brushes back in the hands of the artists, so they can paint their vision, and have it turn out the way they want. On the other hand, you lose the ability to make things appear the way the reader wants.
NotJohn’s tools provide a minimal set that displays well, and also gives the end-user control of the rendering. (Will it be good enough for the kinds of books I write, and the detailed information I share in them? Time will tell.)
(2) Many CSS styles are supported by one ePub reader, but not by others. NotJohn has simplified his styles down to a set that works in every ePub reader. That’s the good news.
The bad news is that if it doesn’t include functionality I need (like text-block sidebars), then I may have to futz with the CSS styling — and the changes I make for Kindle readers may not play well with other readers.
(That may be a chance I just have to take. To publish an ePub through a distributor — for anyone but a beta reader, that is — I already I have to remove the Amazon links I’m prone to add. Swapping CSS styles would be just one more thing to do.)
The Conversion Process
Here is the conversion process, as I understand it at the moment:
- MS Word > Save As > Web Page, Filtered
That option produces plain HTML, without Microsoft’s “special sauce”.
- Modify the HTML to use NotJohn’s template.
Use Sigil to insert the book content into the template — or, easier, to wrap his template around the content!
- For an ePub, include the book-cover image at the front of the file.
Before uploading it to Kindle, remove the cover image.
If it’s there when you upload to KDP, their conversion may add a second copy of the cover image. (It did for sure, years ago. I don’t know about now.)
- Cut down the TOC to H1 heads.
I’m adding this step. My books have parts, so the print-version TOC shows parts, H1 heads, and H2 heads. That’s great for print. But for an eBook, Parts and H1 heads are the most anyone can deal with — especially on a portable device.
MS Word’s strange idea a heading-to-TOC “mapping”, meanwhle, makes it impossible to generate reasonable spacing for Part headings in the TOC (a whole ‘nother story), so I format those manually after the pagination is finalized. Rather than regenerating the TOC in Word, then, I prefer to trim it in the HTML editor — an operation that the Sigil PageEdit app will be useful for!
- ?Upload the images separately?
Somewhere, I recall NotJohn saying that images had to uploaded to KDP separately, otherwise they were grainy when converted. That seems a little painful. But okay. If has to be done, it has to be done. (I’ve got to find that note…)
- Generate a Kindle mobi file.
Ideally, upload the ePub to KDP and send it to your Kindle reader. If that process is convenient, it will be reasonably direct, and ensure that what you see is what your readers will see. (But if the process is difficult, it may make sense to generate a mobi file locally and send it to your Kindle device for initial reviews — and then send a version converted by KDP to your device for a final review. It’s riskier, but faster if KDP’s process is slow. (I know Calibre can do that conversion. I don’t yet know about Sigil.)
To Be Determined
1. Maybe that process solves the blank pages problem?
Odd-page section breaks are handy for paginating the book, but when converted in Calibre, they create blank pages that ebook readers have to move past.
2. Does it solve the image-size problem? (Images that look fine in the Word doc come out much smaller in the Kindle version, using the Calibre conversion.)
3. Does NotJohn’s ePub.css styling preserve borders on “sidebar” text?
If so, does KDP keep them?
4. Does his ebook describe additional processing steps I haven’t listed here?
(His book blurb says he has 10 steps, with pictures. I only have 3, at least one of which is probably unique to me. It looks like my process should start around his step 6, so I’m probably missing at least 4 steps.)
Fast eBook Conversions for Beta Readers
For beta-reader conversions, I’ve been using Calibre (“Caliber”). That process worked well enough to get something out the door. Time will tell whether I continue to use that process, or whether I switch to NotJohn’s process.
- I try not to rely on KDP conversions, mostly because the online viewer does NOT look the same it does in a Kindle book. (It didn’t at least, the last time I used it, in 2018.) So I have to upload the manuscript to convert it, then download the converted copy and email it to my Kindle. (Or maybe there is a direct-send. I’ve forgotten. Or maybe I had to publish it before I could see the results of the conversion? Ye gods. In any case, it was very time-consuming process. (And I recall painful iterations after the initial “publication”, too — at a time when people could be getting a bad copy of the book! That is the problem I most want to avoid.)
- For my beta readers, I’ve been doing conversions in Calibre (“Caliber”), instead. I can read in a doc, convert to mobi in a minute or two. Quick. Easy.
- The Calibre in-app viewer also has problems, though. Some things look bad there that are fine on a Kindle reader, so I still email the .mobi to my Kindle for review.
- The major trick, when converting to mobi in Calibre, is to go to the “Mobi Output” section and remove the “Personal Document” tag: [PDOC]
With the PDOC tag, the file is saved under “documents”. Without it, the file is like any other book on your device. (I learned that trick from @CarlaKing bless her soul. I recommend her highly for book publishing solutions.)
Creating Full-Width “Sidebars” in MS Word
- It’s easy to create a “faux sidebar” in Word using the Border capability of paragraph styles. (Converting them to eBook formats, though, turns out to be a bit of a challenge.)
- When paragraphs with the same borders and margins are adjacent, the borders merge, so you have the borders on each side, one border at the top, and one at the bottom. The result is exactly what you want — a true block of text.
- I have a basic Sidebar style, plus Sidebar Title and Sidebar Bullet styles based on that. So a sidebar is easy to create.
- To further offset the box from the normal flow of text, my sidebar styles have larger left- and right-indents.
- Of course, what you get isn’t a true sidebar, where text can flow around the box, but it’s great for a centered box of text that is separated from the normal flow.
- You can also insert a “Text Box” in Word. But I’ve found that feature rather challenging to use, and it doesn’t convert to eBook formats at all.
- You can define a “Fill” color in the Border settings, under the Shading tab. That gives you options when formatting a print version of the book.
- You don’t want a fill color for eBooks, though.
- In an ePub, the paragraphs aren’t adjacent, so you get disconnected blocks of color that look strange. (That’s what happens in the Calibre viewer, at least. But as noted, that viewer has some problems.)
- After converting to Kindle mobi format, though, background colors in a sidebar get totally weird. Box highlights appear in some places, but not others. (They’re all over the place. It’s a mess — again, when converted with Calibre.)
But borders are another matter:
- When you convert to ePub, the borders are retained! Huzzah!
- But when you convert to mobi (in Calibre), the borders are lost.
To Be Determined
It remains to be seen whether a) NotJohn’s process for generating an ePub retains the borders and if so, b) Whether the mobi files that KDP generates contain them. If that process preserves the text blocks, I’m golden. If not, I’ll have a conflict. On the one hand, it would be nice to put text-display in the hands of the end user and have an ePub format that works everywhere. On the other hand, I need the functionality of sidebars! It will be interesting to see how the conflict gets resolved!
The only solution I’ve found for so far is to put all sidebars at the end of section. The sidebar heading is centered, with a bit of extra space — and they generally start on a new page. So the lack of a border, while lamentable, isn’t too terrible.
The bottom line is that full-page sidebars can work to some degree in an eBook, but sidebars that have text flowing around them don’t work.
That’s where things stand at the moment, at least. Things are improving all the time!
Eric Armstrong is the author of Bench Yoga (volume 1 of the Subtle Energy Yoga series) and Comprehensive Keys to the Green (a putting manual), among other books. He has published more than 600 articles at his health and fitness website (TreeLight.com), and is the founder of MeditateBetter.com, where his “Instant Alignment” Yoga Meditation Bench is reawakening an ancient spiritual tradition.
Learn More: The Many Facets of Eric