Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 11:29 AM   #46
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 730
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
I have a question, by the way:
When merging xhtml files, does Sigil have to create this entry?

I ask this because every time after merging the files epubcheck shouts me warnings.

If this anchor has to be created for some reason (I commented on this line and didn't notice any problems) then maybe you can at least surround it with paragraph tags.
BeckyEbook is offline   Reply With Quote
Old Today, 11:42 AM   #47
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 38,390
Karma: 152905840
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I think that those IDs are used to update the navigation document. ePub3 does not complain about the naked <a> tags but ePub2 does so wrapping them in <p> tags would be good.
DNSB is offline   Reply With Quote
Old Today, 01:02 PM   #48
KevinH
Sigil Developer
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: 7,923
Karma: 5449552
Join Date: Nov 2009
Device: many
I will push a change to wrap it in p tags.

Last edited by KevinH; Today at 02:12 PM.
KevinH is online now   Reply With Quote
Old Today, 02:11 PM   #49
KevinH
Sigil Developer
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: 7,923
Karma: 5449552
Join Date: Nov 2009
Device: many
Update:

The more I think about this, wrapping it in p tags will take up a line/space on the page that was previously not in the epub.

Would something like:

<p id="blah" style="display:none" hidden="hidden"></p>

be better since it would not be visible on the finished page taking up no space but still serve the same purpose as a zero space a anchor point

Thoughts?
KevinH is online now   Reply With Quote
Old Today, 02:29 PM   #50
KevinH
Sigil Developer
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: 7,923
Karma: 5449552
Join Date: Nov 2009
Device: many
And the current html spec as used in epub3 does allow an anchor a tag to be a direct child of the body tag as it is considered "flow content".

So for epub3, the current anchor tag is correct.

I have no idea why epubcheck under epub2 would consider this an error but perhaps this is something new for epubcheck?
KevinH is online now   Reply With Quote
Old Today, 02:54 PM   #51
KevinH
Sigil Developer
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: 7,923
Karma: 5449552
Join Date: Nov 2009
Device: many
So I think the right approach here is to leave as it is now for epub3 and use something like the following for epub2:

<p id="blah" style="display:none" hidden="hidden"></p>

Would that work for you?
KevinH is online now   Reply With Quote
Old Today, 03:28 PM   #52
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 730
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
Theoretically, yes.
However, I recognize this code because it reminds me of your code from the TOCSaver plugin.
There, too, there is a problem (only in epub2) that epubcheck considers the hidden attribute invalid.

Code:
Col: 53: ERROR(RSC-005): Error while parsing file: attribute "hidden" not allowed here; expected attribute "class", "dir", "lang", "title" or "xml:lang"
So I would suggest something along these lines:
Code:
            QString version = sink_resource->GetEpubVersion();
            if (version.startsWith("3")) {
                new_bodies.append("  <p id=\"" + section_id + "\" style=\"display:none\" hidden=\"hidden\"></p>\n" + updated_bodies[bookpath]);
            } else {
                new_bodies.append("  <p id=\"" + section_id + "\" style=\"display:none\"></p>\n" + updated_bodies[bookpath]);
            }
I built Sigil just now and it passes epubcheck for epub2 and epub3.


I know your approach to epub2, however, in Poland at least 80-90% of new titles in bookstores are still epub2. The volume of epub3 files is gradually increasing, but this is happening extremely slowly.

P.S. In the modified TOCSaver plugin I use a similar condition (in three places in the code) and it works very well.

Last edited by BeckyEbook; Today at 03:34 PM.
BeckyEbook is offline   Reply With Quote
Old Today, 03:38 PM   #53
KevinH
Sigil Developer
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: 7,923
Karma: 5449552
Join Date: Nov 2009
Device: many
Great!
I will use anchor tags only for epub3 and use what you have tested for epub2 (ie. without the hidden attribute).

Thanks!

I will update the TOCSaver plugin to do the same.
KevinH is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wanted: Volunteers to Update the Sigil User's Guide KevinH Sigil 55 05-18-2018 02:52 AM
Finding your most recent Users’ Guide seanyyz Amazon Kindle 1 01-21-2018 01:26 PM
Content New KindleWiFi Users' Guide sirmaru Amazon Kindle 2 09-19-2010 12:27 AM
K2 PDF Users Guide Sillyness JSWolf Amazon Kindle 5 02-10-2009 04:11 PM
Can I delete Kindle Users Guide? KlondikeGeoff Amazon Kindle 4 12-15-2008 06:26 PM


All times are GMT -4. The time now is 07:46 PM.


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