Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-12-2024, 12:29 PM   #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: 783
Karma: 2298438
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 08-12-2024, 12:42 PM   #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: 40,603
Karma: 157444382
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 08-12-2024, 02: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: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
I will push a change to wrap it in p tags.

Last edited by KevinH; 08-12-2024 at 03:12 PM.
KevinH is offline   Reply With Quote
Old 08-12-2024, 03: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: 8,160
Karma: 5450818
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 offline   Reply With Quote
Old 08-12-2024, 03: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: 8,160
Karma: 5450818
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 offline   Reply With Quote
Old 08-12-2024, 03: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: 8,160
Karma: 5450818
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 offline   Reply With Quote
Old 08-12-2024, 04: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: 783
Karma: 2298438
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; 08-12-2024 at 04:34 PM.
BeckyEbook is offline   Reply With Quote
Old 08-12-2024, 04: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: 8,160
Karma: 5450818
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 offline   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 03:52 AM
Finding your most recent Users’ Guide seanyyz Amazon Kindle 1 01-21-2018 02:26 PM
Content New KindleWiFi Users' Guide sirmaru Amazon Kindle 2 09-19-2010 01:27 AM
K2 PDF Users Guide Sillyness JSWolf Amazon Kindle 5 02-10-2009 05:11 PM
Can I delete Kindle Users Guide? KlondikeGeoff Amazon Kindle 4 12-15-2008 07:26 PM


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


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