Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 11-18-2017, 11:01 PM   #271
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,594
Karma: 772404
Join Date: Nov 2009
Device: many
Yes recursive named entity expansion has been used to attack html sites. Since epubs use html5 for epub3 and since the same problems exist with webkits used in ebook viewers, it was probably a good idea. That said, I have no idea if there are malicious epubs in the wild but given there are malicious Word docs and PDFs in the wild, it is just a matter of time.

Last edited by KevinH; 11-19-2017 at 08:40 AM.
KevinH is offline   Reply With Quote
Advert
Old 11-19-2017, 07:54 AM   #272
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,305
Karma: 90379824
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by AlanHK View Post
As more entities are numeric, it becomes a stew of digits and impossible to make sense of by eye.
In my opinion, a slew of named entities make html equally impossible to make sense of. so I don't bother trying to preserve them at all. With the exception of the non-breaking space entity, I see very little compelling reason to use entities (except the standard required ones for (&, <, >) at all--named or numeric. The actual unicode characters work just fine and read much better in code, in my opinion. Why use a 4 or 5 character code to represent a single character?
DiapDealer is online now   Reply With Quote
Old 11-19-2017, 12:44 PM   #273
AlanHK
Addict
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 344
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
Quote:
Originally Posted by DiapDealer View Post
The actual unicode characters work just fine and read much better in code, in my opinion. Why use a 4 or 5 character code to represent a single character?
The half dozen space characters all look the same when expressed as characters.

But I wasn't talking about that, but the requirement in epub3/HTML5 to replace named entities, &emsp; in particular, with a numeric ones.
All must become cryptic numbers instead of mnemonics if you want it to pass muster.
AlanHK is offline   Reply With Quote
Old Yesterday, 01:43 AM   #274
AlanHK
Addict
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 344
Karma: 1002
Join Date: Apr 2014
Device: PW-3, 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; Yesterday at 01:45 AM.
AlanHK is offline   Reply With Quote
Old Yesterday, 01:24 PM   #275
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,594
Karma: 772404
Join Date: Nov 2009
Device: many
I really have no plans to support epub3 prefix and new style meta tags in an epub2 opf as Sigil itself does not support them (and the opf must be machine readable and grok-able at all times inside Sigil to allow things like automatic splitting, file renaming, etc).

The simplest solution is to open the epub3 after conversion in Sigil and manually add them using a clip or search and replace, or whatever is easier.

Or ask someone to make an epub3 compatible iBooks plugin adapter and run it in Sigil after conversion.

Or hard code your own copy of the epub3itizer to handle your special case for ibooks.

Last edited by KevinH; Yesterday at 02:24 PM.
KevinH is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Conversion Output] KePub Output Plugin jgoguen Plugins 286 11-19-2017 08:58 PM
Create a javascript quizz for Epub3 in Sigil BertrandThibaut Sigil 3 01-26-2014 10:04 AM
An epub3 version of Sigil ? apulia03 Sigil 9 11-28-2012 02:07 AM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 03:24 AM
epub3 Sigil Poetry(fixed layout) Giggleton Sigil 7 04-04-2011 01:58 PM


All times are GMT -4. The time now is 10:02 PM.


MobileRead.com is a privately owned, operated and funded community.