View Single Post
Old 11-21-2017, 12:43 AM   #274
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Different issue:
I've been making ePubs for iBooks.

While ePub2 worked, the TOC had glitches and omissions. Seems it really wanted ePub3. So I now use the plugin to make those.

Also, these ePubs are required to use embedded fonts.
While they worked in other ePub viewers, they did not appear in iBooks.
Eventually found that iBooks required some special Apple code to allow them.

As far as I can see the rules are:
for ePub2: include the file com.apple.ibooks.display-options.xml
Spoiler:
<?xml version="1.0" encoding="UTF-8"?>
<display_options>
<platform name="*">
<option name="specified-fonts">true</option>
</platform>
</display_options>


For ePub3 instead you should have this line in the opf:
<meta property="ibooks:specified-fonts">true</meta>
which requires a namespace added to the package:
<package version="3.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/">

Since I have been creating the book in ePub2 and just converting to ePub3 at the end, I tried to insert these lines in the ePub2. They threw an error with ePubcheck, but I thought I could ignore that.
So then I converted it to ePub3, expecting the code to just be copied, and there be valid. Instead the namespace was omitted and the property had no value:
Code:
<package version="3.0" unique-identifier="BookId" xmlns="http://www.idpf.org/2007/opf" prefix="rendition: http://www.idpf.org/vocab/rendition/#">
    <meta property="ibooks:specified-fonts" />
I understand this behaviour is justified, since the OPF was apparently invalid as an epub2.
Also I know I could add the lines after converting to ePub3. But I would prefer to have them in my original ePub2 so I don't have to remember to add the code every time after exporting to ePub3 before submitting it.
Is there a way to have such code "pass through" to the ePub3 without further intervention?

I found what seems to be a workaround: the ePub2 method of including the XML seems to work with ePub3, despite it not being officially sanctioned. So I have been doing that since the XML does survive the ePub3-itizer; but I am uneasy that iBooks could one day be stricter and not recognise it.

Last edited by AlanHK; 11-21-2017 at 12:45 AM.
AlanHK is offline   Reply With Quote