![]() |
#46 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 758
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. |
![]() |
![]() |
![]() |
#47 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 39,196
Karma: 153098470
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.
|
![]() |
![]() |
![]() |
#48 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,088
Karma: 5450184
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 02:12 PM. |
![]() |
![]() |
![]() |
#49 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,088
Karma: 5450184
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? |
![]() |
![]() |
![]() |
#50 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,088
Karma: 5450184
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? |
![]() |
![]() |
![]() |
#51 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,088
Karma: 5450184
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? |
![]() |
![]() |
![]() |
#52 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 758
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" 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 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 03:34 PM. |
![]() |
![]() |
![]() |
#53 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,088
Karma: 5450184
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. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |