Asbjorn Grandt - 2013-07-29 18:32:30 - In reply to message 6 from Joao Chagas
The problem with Chapter 3 in my examples, is that it is a demonstration of a single chapter split over multiple files. So EPub adds to the chapter name for each chapter contained in the array passed.
The first of the two in this example is actually stores as Chapter003-1.html
I added these two lines to Chapter 001:
. "<p><a href=\"Chapter002.html#internalLink\">Go to Chapter 2</a></p>\n"
. "<p><a href=\"Chapter003-1.html#internalLink\">Go to Chapter 3</a></p>\n"
The added an id="internalLink" to a paragraph (ie: <p id="internalLink">....)
I did this in both the first part of Chapter 3 and somewhere in Chapter 2.
As for maintaining integrity when these files are renames, I have to have a closer look at my code to see if it is something I can improve on.
Joao Chagas - 2013-07-29 18:58:56 - In reply to message 7 from Asbjorn Grandt
Now both links have a strange behavior, your example works only to the second attempt, any one of the links. When click in the first time in each link remains open "notice/Cover.html", but when I click in the second time the links open the right chapters. Very strange behavior.
The internal links was very important in my e-book, because I want create interactive e-books.
You have tried in Example1Book.epub put internal links?
If you want I can send my file "Example1Book.epub" for you analyze! If yes tell me your email please.
Asbjorn Grandt - 2013-07-29 19:11:24 - In reply to message 8 from Joao Chagas
Send it to firstname.lastname@example.org
I tried it, and didn't have any issues on it. Of course the internal link id's have to be unique, though you can have the same id occurring in different chapters, it might be a good idea to avoid that till I'm sure it works.
Joao Chagas - 2013-07-29 23:43:14 - In reply to message 9 from Asbjorn Grandt
After comunicate with @Grandt via email, the right code is:
(example in the version of Example1Book.php)
Insert in line 75 and 76 the internal links:
. "<p><a href=\"Chapter002.html#internalLink1\">Go to Chapter 2</a></p>\n"
. "<p><a href=\"Chapter003-1.html#internalLink2\">Go to Chapter 3</a></p>\n"
The anchor insert for example in lines 86 and 98
. "<p id=\"internalLink1\">anchor c2</p>\n"
. "<p><a id=\"internalLink2\">here the anchor</a></p>\n"
This example work in Adobe Digital Edition 2.0 and in ipad (ibooks), but not work well in firefox ad-on "Epubreader", the bug has already been reported by the author of the class, I hope that solve very fast for the good of all programmers using this class.