MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Index containing page no. with links - <pagelist> problem (https://www.mobileread.com/forums/showthread.php?t=213285)

mr10463 05-16-2013 04:19 AM

Index containing page no. with links - <pagelist> problem
 
Hi,

a service provider converted a printed book (indesign/pdf master) into epub (epub2). As usual in real professional books you have an index at the end, containing page numbers.

During conversion all page no. were asigned a link to the corresponding chapter/html file including its anchor (e.g. 'sealing: 12, 33, 47, etc').

Unfortunately my ebook handler (libreka in Germany) refuses to publish it to the the apple book store with the reason: "please fix linked page numbers in the index with <pagelist> (toc.ncx)".

Kiling the index completely does not help at all because then I get around 1300 linking errors (all links in chapters refer to the index as well) ... So I am a bit in a struggle what to do

Can anybody give me advice how to fix my problem? As far as I googled <pagelist> is not the answer to my problems ... And please keep in mind: I am dealing with approx. 1,300 links at all. Manual editing would take a huge amount of time. :help:

Thanks in advance. Any help appreciated.

Cheers.

btw.: pagina-EPUB-Checker_Win-1.1.0 does not find any errors at all!

DaleDe 05-16-2013 02:24 PM

ePub 3 has support for page lists. See http://www.idpf.org/accessibility/gu...v/pagelist.php

and http://www.idpf.org/accessibility/gu...ml/pagenum.php

Apple does have quite a bit of epub 3 support for iBooks. I have no idea if this will fully solve your problem but it may give you some ideas.

hesham 05-17-2013 02:08 AM

It is strange though that the links in the chapters refer to the Index ! ... It should be the inverse. The links in the Index should be redirecting the reader to the corresponding page in the book.

Unless the links take the reader to a specific location(named destination) in the page and not just to a specific page number. In that case the corresponding named destination in each page must be removed from the page to prevent these errors.

mr10463 05-17-2013 08:33 AM

Quote:

Originally Posted by hesham (Post 2516454)
In that case the corresponding named destination in each page must be removed from the page to prevent these errors.

Exactly. BUT: Is there any way to not do manually? As I mentioned: more than 1,300 links at all ...

Cheers

mzmm 05-17-2013 03:09 PM

Quote:

Originally Posted by mr10463 (Post 2516656)
Exactly. BUT: Is there any way to not do manually? As I mentioned: more than 1,300 links at all ...

Cheers

kind of a shame to wipe out the entire index, but if you removed all the links in the index, then you could just do a global search/replace for all the anchors in the html pages to remove them too.

Tex2002ans 05-17-2013 09:02 PM

Quote:

Originally Posted by mr10463 (Post 2516656)
Exactly. BUT: Is there any way to not do manually? As I mentioned: more than 1,300 links at all ...

Cheers

Give an example of some Index code and the code for the anchors in the paragraphs. Perhaps someone can help you come up with a Regex to handle the situations.

Also, for more information on the PageList and/or page-map, I found this link on the Wiki:

http://blog.threepress.org/2009/11/2...-ncx-pagelist/

mr10463 05-21-2013 04:29 AM

Quote:

Originally Posted by Tex2002ans (Post 2517423)
Give an example of some Index code and the code for the anchors in the paragraphs. Perhaps someone can help you come up with a Regex to handle the situations.

Well, here is some exemplary code...

This is the code in the chapter file:
<a href="../Text/anhang3.html#ir_9_220" id="in_9_220">ANY_TEXT</a>

This is the code in the index file:
<a href="../Text/chapter03.html#in_9_220" id="ir_9_220">220</a>

220 corresponds to the real page number. Why they made a link to the index file: I don't know! :blink:

It looks that way, that all links in the chapter files have a similar ID construct, starting with id="in_*_*".

Maybe anyone can help ...

Thanks in advance. Cheers.

mzmm 05-21-2013 08:27 AM

Quote:

Originally Posted by mr10463 (Post 2520198)
220 corresponds to the real page number. Why they made a link to the index file: I don't know!

for ease of navigation? in case they accidentally click on a footnote? i almost always make links back/forth so the reader can get back to wherever they were for whatever reason.

Quote:

Originally Posted by mr10463 (Post 2520198)
Well, here is some exemplary code...

This is the code in the chapter file:
<a href="../Text/anhang3.html#ir_9_220" id="in_9_220">ANY_TEXT</a>

This is the code in the index file:
<a href="../Text/chapter03.html#in_9_220" id="ir_9_220">220</a>

220 corresponds to the real page number. Why they made a link to the index file: I don't know! :blink:

It looks that way, that all links in the chapter files have a similar ID construct, starting with id="in_*_*".

Maybe anyone can help ...

if there's absolutely no other option than to remove what seems like a probably useful addition to your ebook, you could use this (definitely test it before doing a globaly find/replace):

Code:

find:<a[^#]+#ir[^>]+>(.*?)</a>

repl:\1

this is going to kill all your links, and again, i kind of can't believe there's no other solution you could use to keep the index in there.

regardless, it's probably a good idea to backup your file in case you decide to switch distribution in the future.


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

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.