07-08-2024, 06:56 PM | #1 |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Property linear="no" on epub2
Hi;
Maybe some of you had this problem and were able to solve it. For my part, I haven't been successful so far and I would like to know how those who were successful handled the issue. It turns out that I have a couple of .xhtml files that I don't want to be seen in the epub (epub2); I want them to only be accessed through a link. I tried to achieve this via the linear="no" property in the <spine> section of the .opf file. But nothing to do; at least in ADE 2.x/3.x the .xhtml files can be accessed like any of the others. Interestingly, under epub3 everything works fine, as expected, but under epub2, nothing seems to take effect. Thank you very much in advance for any advice that allows me to solve this problem. |
07-08-2024, 07:15 PM | #2 | |
Resident Curmudgeon
Posts: 76,468
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
07-08-2024, 08:10 PM | #3 |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
07-08-2024, 08:16 PM | #4 |
Bibliophagist
Posts: 40,579
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
The only way to hide a xhtml file in an ePub2 that I am aware of is removing it from the spine. This, of course, causes validation errors.
|
07-08-2024, 11:57 PM | #5 |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
07-09-2024, 12:43 PM | #6 |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
You can put it at the end of the spine. It will still appear and be counted in the total pages, but you don't need to page through it when reading.
Or you can use a KOReader, which supports linear="no" (Hide non-linear flows), if it's just for your own use. |
07-09-2024, 06:18 PM | #7 | |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
I tried KOReader without success; linear="no" seems not to be supported there either. Yes, I put the .xhtml files at the end of the epub, so the reading is not disturbed. But I wanted to hide those files if had been possible. By suppressing those files inside the spine section in the .opf file, the .xhtml are not showed at all, but they can not be accessed by links to them either |
|
07-09-2024, 06:39 PM | #8 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Could you make images of each extra xhtml page that could be loaded on demand? Perhaps an svg image with actual text?
And if I remember the epub2 spec had something about "xml islands" that might be a way to hide a page but still load it. Or maybe use frames or iframes in some way or the object tag to fall back to what you want? Last edited by KevinH; 07-09-2024 at 06:46 PM. |
07-09-2024, 08:37 PM | #9 | ||
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
|
||
07-09-2024, 10:13 PM | #10 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
No idea what they meant by "xml islands" exactly. I am just spitballing ideas here.
I am thinking of the "object" tag that can fallback to an xhtml file but won't if it current data attribute content loads. So try taking each of those xhtml files and in the body have an object tag that defaults to link to an image then in the object tag's content keep the remainder of the body which will never get loaded. You should be able to link to those xhtml files normally but the object tag will just load the image instead. But I am not sure that it will do what you want, but it might be worth playing around with. |
07-10-2024, 06:27 AM | #11 |
Resident Curmudgeon
Posts: 76,468
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The idea of putting those HTML files at the end is a good idea. To go with that, make one HTML file that says to stop reading here and put that before the ones at the end you don't want to read in order.
|
07-10-2024, 11:03 AM | #12 |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Did you enable "Hide non-linear flows"? It has worked for me so far, hiding pages of foot-/endnotes for example. (Disclaimer: It was I who did the initial implementation of the feature.)
|
07-13-2024, 01:04 PM | #13 |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Sorry for the delay, but just now I read your post. The feature works PARTIALLY; I have many xhtml files (all of them at the end of the epub) with the property "linear=no"; KOReader doesnt show them in the normal flow, but, for example,when I access the first of those files by a link, then I CAN NAVIGATE for the rest of the following files with the property "linear=no"; KOReader forgets that those files must remain hidden.
|
07-13-2024, 02:58 PM | #14 |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
If I remember correctly, all consecutive non-linear files are considered as belonging to the same "hidden flow", but non-consecutive files are separate. Try inserting a linear dummy file between every non-linear file (or whenever you want to break navigation). It's not ideal, but maybe better than nothing.
|
07-14-2024, 12:49 AM | #15 | |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Odd behavior CSS "content" property in kobo devices | DrChiper | Kobo Reader | 3 | 07-17-2023 03:54 PM |
"Hide Non-linear Fragments" not shown in menu | sHiN3 | KOReader | 2 | 04-24-2023 01:27 PM |
"Error while parsing file 'Multiple occurrences of the 'cover-image' property " | BKh | ePub | 11 | 10-19-2018 02:19 PM |
Auxiliary content? (with linear="no" in <spine>) | un_pogaz | Sigil | 2 | 06-13-2018 07:25 AM |
New "Intellectual Property Protection" law enacted. | NatCh | News | 23 | 10-18-2008 10:58 AM |