LitRes: Differences Between ePub and iOS.ePub

Those who frequently use the LitRes website may have noticed that sometimes eBooks are offered in two ePub formats: standard ePub and iOS.ePub. Many have probably wondered, what’s the difference? I was curious too, so, as a well-known nerd… researcher, I decided to conduct my own investigation.

In addition to offering two formats, LitRes sometimes sells books in the iOS.ePub format separately from the regular eBook edition, and often at a significantly higher price. They used to do this quite often with Boris Akunin’s books.

Since deep down I’m still a bit of a programmer, I have a general idea of what the ePub format is (without getting into the weeds, it’s essentially hypertext). That’s why I was very curious about this sub-format LitRes invented, one they’re charging extra for.

When you try searching online, the results are pretty sparse. They mostly mirror the standard response you’d get from LitRes tech support when asking this question: “iOS.ePub is adapted for viewing on iOS devices.” Not exactly the most helpful answer. Thanks, Captain Obvious, so to speak. And even when you follow up with another question, Captain Obvious doesn’t falter:

We received a response from the editorial department regarding your question.

.epub: A format actively promoted by Adobe, based on HTML. It is supported by almost all modern programs and devices.

.ios.epub: Documents in the ePub format, adapted for viewing on iOS devices.

However, sometimes my inner nitpicker kicks in, and I start playing dumb to dig deeper into the details. I decided to find out how well LitRes tech support could handle inquiries beyond standard scripted responses.

After several rounds of “question-answer,” I managed to get a slightly more detailed response from them, involving their technical team.

Alexey, I checked with the technical department. The text in the ios.epub format is better adapted to screen sizes. The standard ePub goes through formatting recommended by Apple (in theory, the final result might not differ at all—it depends on the original ePub).

There is a difference in how footnotes are displayed. In regular ePub, clicking on a footnote brings up a list of all the footnotes in the book, whereas in ios.epub, only the specific footnote appears.

Now that’s much better. By the way, kudos to the support agent—she went beyond the standard script. Often, tech support sticks strictly to guidelines, offering only generic responses and waiting for the customer to give up in frustration and abandon the conversation.

Building on the details I got, I decided to conduct my own tests using a few books from my LitRes library. For testing, I used the native LitRes app “Read!”, the native iOS Books app, as well as two ePub-compatible readers: PocketBook and KyBook 3 (I wanted to include Marvin, which specializes in ePub, but the app seems to have been abandoned by its developers and now won’t even open previously uploaded books).

In addition, I armed myself with Apple’s recommendations for creating ePub books tailored for their iOS platform: Apple Books Asset Guide 5.2.12.

The native iOS Books app currently supports ePub formats version 2.0 and 3.0. LitRes, as far as I could tell from a quick scan of the files, produces its books in version 2.0.

I’ll provide examples accompanied by screenshots and snippets of code extracted from the ePub files (feel free to skip over these if they’re not relevant to you).

Screen Size Adaptation

Although the response mentioned that the iOS version of the text is supposedly better adapted to the screen size, I have no idea what this could mean. If the file in all formats uses float layout—where you can adjust the font, size, alignment, and so on—then what exactly is there to adapt? The only possibility might be illustrations, for which iOS recommendations specify minimum and maximum dimensions. But that’s a very dubious point, one I didn’t even bother testing. Let’s chalk this up to “marketing fluff,” where they’re just trying to sell you nothing.

Initial

In typography, there’s a concept called the “initial.” This refers to “a letter at the beginning of a word, a chapter, or a paragraph that is larger than the rest of the text.” In print books, initials are often ornately designed.

Many eReaders have settings for initials, but if the input is plain text, the best they can do is either enlarge and color the first letter or render it as an image (though for this, the app would need preloaded images for every letter in the alphabet).

Naturally, the hypertext format allows the book’s creator to design proper initials by inserting an image in place of the first letter of the text—limited only by their creativity. In the iOS-formatted version of Boris Akunin’s “Black City” with illustrations and custom layout, such initials were included. However, instead of highlighting the first letter of a chapter, they were applied to the first letter of the chapter title, which is quite rare:

First Chapter of the Book with an Initial (native iOS Books App)

I wouldn’t say I like it, but at least it displays correctly.

In the file, this is implemented as expected—the first letter is replaced by an image, followed by the rest of the title text without that letter:

<div class="ilustr spec_o1"><img alt="" src="../Images/o.png" /></div>
<h1 class="jleft" id="mh_toc_34">хота на Одиссея</h1>

At the same time, the ilustr style specifies that the image should be displayed to the left of the text, while spec_o1 adds additional padding at the top:

.ilustr { width: 35% !important; border:0px red solid; padding-top:35px;
float: left;
margin: 0 0.5em 0 0 !important;
line-height: 1em !important; }

Meanwhile, the LitRes “Read!” app doesn’t attempt to display this decorative touch at all, defaulting to a layout without initials. However, if you load the same ePub file into other eReaders, they often don’t know how to handle it properly—even though the styles clearly specify how it should appear.

For instance, KyBook 3 displays the initial above the title and centers it on the screen:

Incorrect Display of Initial in KyBook 3

PocketBook places it on the left, but it turns out even worse:

Incorrect Display of Initial in PocketBook

It’s also worth noting that initials in this format are very rare in LitRes books, even in the iOS version. However, when they do appear, they are only present in the iOS.ePub format.

“Expandable” Illustrations

I came up with this term myself since I’m not sure what else to call it. In Apple’s Books app, there’s a feature that allows images in the text to appear as thumbnails, distinct from the full-size illustration. If the reader wants to view the entire image, they need to double-tap on the thumbnail, which then expands to full-screen.

This feature was utilized by the creators of “Black City.” It’s rare to see this in other books (it seems that LitRes’ tech team used this book to test every possible feature). On the text page, it looks like this:

Thumbnail Illustration

But if you double-tap, the text disappears, and the image is displayed full-screen (cropped at the top and bottom):

Full-Screen Illustration

How is this done in the file? Honestly, I didn’t figure it out. The description inside the file doesn’t shed any light on it. It seems to be some internal magic of the Books app. In the text, the images are simply described one after the other:

<div class="wrap_pict">
  <div style="width:240px; height:240px; margin:0px auto -240px; position:relative;"><img alt="" src="../Images/cheri_001_.gif" /></div><div style="width:240px; height:240px; border:1px transparent solid; margin:0 auto; margin-top:-240px !important"><img alt="" src="../Images/i_001.png" style="opacity: 0; width:100% !important; height:100% !important; margin:0 !important; padding:0 !important;" /></div>
  <p class="b pict"><sup>Ялта</sup></p>
</div>

And the wrap_pict style doesn’t do anything particularly useful either:

.wrap_pict {  page-break-inside: avoid !important; text-align:center;}

Therefore, I decided not to obsess over finding an answer to the “how” question and instead focused on seeing how others handle this feature.

As I mentioned earlier, LitRes simplifies many of these “fancy” features in their app. They just display the illustration in a fairly standard way directly within the text (and this is for the same book from the library, which is important!):

Display of the Same Illustration in LitRes “Read!” App

PocketBook struggles with the complexities of displaying two illustrations and only shows the first one. There’s no interactivity, and I couldn’t view the full illustration at all:

Only the thumbnail in PocketBook—nothing more, nothing less

KyBook 3 recognizes that there are two images but doesn’t see any connection between them. As a result, it displays both, centering only the first one:

KyBook 3 shows everything it has

But what’s so great about these thumbnails—I have no idea. Many apps already know how to display images in full screen with a double tap.

Pop-Up Footnotes

A pop-up footnote is a type of footnote in a book where its text appears as a small window directly over the text. This allows you to read the description without “leaving” the context. For me, the presence of pop-up footnotes is one of the most important features of an eReader. It’s much more convenient to see the explanation in context than to jump back and forth in the text. My primary eReader, KyBook 3, displays all footnotes in FB2 format as pop-ups. It looks like this:

One tap on a footnote displays it as a pop-up window (like in the illustration above), and a second tap anywhere on the text hides it, allowing you to continue reading seamlessly.

However, not all eReaders support this feature. Most stick to the traditional hypertext rules—redirecting you to the “Notes” section, after which you must find your way back to the main text.

According to Apple’s guidelines for creating ePub files for iOS, “Pop-up Footnotes” are a feature specific to the third version of the format. However, in practice (and in LitRes files), they work perfectly well in version 2.0 as well.

Unlike the widely popular FB2 format, ePub has built-in support for these pop-up footnotes. Here’s how it works: the footnote is marked in the text with a special type epub:noteref, and somewhere in the files, its content is defined. But it’s easier to show with an example.

Here’s a footnote from Boris Akunin’s “Black City” (iOS.ePub with illustrations):

<sup><a epub:type="noteref" href="#n1">[1]</a></sup>

And a bit further in the file (it could be immediately after the paragraph or at the end of the document), you’ll find the definition of the footnote itself:

<aside epub:type="footnote" id="n1"><p class="b">Между нами говоря <i>(фр.)</i></p></aside>

In the “traditional” method, a footnote is simply provided as a hyperlink to another part of the text, or even to a separate section of the book. Here’s an example from Alexey Pehov’s “Spark and Wind” (standard ePub):

Но зато там есть «флейта»<a href="contentnotes0.html#n_1" id="back_n_1"><sup>[1]</sup></a>

In this case, the footnote links to a separate document, where it’s simply listed among others in a section usually titled “Notes.” Here’s how it looks for this type of link:

<div style="text-align: justify" class="hsection1" id="n_1"><p class="b"><b>Флейта</b> – кованая решетка или же полые заостренные трубы, используемые вместо нее. Опускалась после закрытия ворот и использовалась как дополнительное защитное укрепление.</p><p class="b page-break-after:always"><a href="content3.html#back_n_1">Вернуться</a></p></div>

It’s worth noting that in this example, the footnote description ends with a “Return” link, which takes the reader back to their place in the text. Not all book creators show such consideration for the reader. Only a few advanced eReaders allow seamless navigation back to the reading location, regardless of the book’s file—by providing a special “Return” element (KyBook, for example, does this).

However, apps display pop-up footnotes differently. I used the same book, “Spark and Wind” by Alexey Pehov, in the iOS.ePub format for comparison.

Here’s how LitRes’s “Read!” app displays the footnote:

Footnote in “Read!”

The footnote description does not cover the original line where the footnote is located. The description itself is on a dark, slightly transparent background.

Footnote in “KyBook 3”

In KyBook 3, the description also does not cover the original line where the footnote is located. KyBook 3 omits the name of the link in the description (in most cases, this is a good thing—who cares about those 1, 2, 3, and so on?). However, when working with iOS.ePub files, the app seems to malfunction, and the standard <sup> tag (used to display text as superscript, as is typical for footnotes in books) is rendered as very small text at the bottom of the line.

Footnote in Apple’s Native “Books” App

But I think Apple missed the mark here. The footnote text completely covers the original text, and the background of the pop-up description could be more contrasting with the main text for better readability.

Conclusions

What can we deduce from all this? As my exploration showed, the layout differences in ePub for iOS aren’t particularly significant. I still don’t understand why LitRes creates two versions and doesn’t clearly explain the differences anywhere. At least now, I have a better idea of what they mean by the two “formats.”

For me personally, the differences don’t justify paying “twice as much.” The only truly useful feature is the presence of “pop-up footnotes” instead of standard hypertext ones. But why not include those in all ePub files by default? That’s beyond me. Perhaps it’s to maintain backward compatibility with older versions of the format, so that older eReaders can display the text properly. That’s the only explanation that makes sense to me—though I have no idea how old those eReaders would have to be for this to be an issue.

For myself, I’ve decided that of the two options, I’ll now prefer iOS.ePub if it’s included as part of the standard package—while checking that it doesn’t contain unnecessary “decorative” features that might get in the way. Thankfully, creating these enhanced versions seems to require extra effort, so LitRes usually charges extra for them. But if iOS.ePub is included alongside other formats in the standard bundle, it’s likely to only have the minimal features I care about.

Post Scriptum

If you know of any other differences that I haven’t mentioned here, feel free to let me know, and I’ll update the article.

One comment

Leave a Reply