Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-23-2018, 04:57 AM   #1
church mouse
Evangelist
church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.
 
church mouse's Avatar
 
Posts: 482
Karma: 5277078
Join Date: Oct 2009
Location: UK
Device: Kindle Voyage, Kobo Clara HD, Kobo H2O, Boox Poke 2
page break numbering - please explain

I am hoping this is the correct section in which to paste this question, which is almost certainly very simple, but I know next to nothing about html and epub coding.

I have noticed that I have quite a number of books where the html has coding in it like this:

<?pagebreak number="2"?><a id="p2>

Often this coding can be found in the very middle of a sentence.

Some reading apps I have seem to ignore the coding and present the text correctly. However, others leave a space in the presented text where the coding exists in the html, thus presenting a sentence looking like this:

They came to bury poor King Edward, trundling handcarts over the cobbled streets or carrying tuck
boxes like little coffins.


My guess is that it is some form of coding which certain reader apps do not understand, but I am probably completely wrong. Can someone explain to me in very basic terms what is going on?

Thanks
church mouse is offline   Reply With Quote
Old 02-23-2018, 08:10 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
My guess is that the <?pagebreak number="2"?> tag is your problem. That does not appear to be the standard method/tag to indicate a page number. Perhaps it is a software/reader specific tag??

In ePub3 it should look something like:
Code:
<span
         epub:type="pagebreak"
         id="page24"
         title="24"/>
ePub2 typically used the <a id="p2"/> (correction added) as a symantically incorrect workaround.


I would do a search and replace to remove all instances of the <?pagebreak?> tag...of course, make a backup first just in case...
Turtle91 is offline   Reply With Quote
Advert
Old 02-23-2018, 08:14 AM   #3
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
...also.... make sure you don't have some kind of CSS that forces a line-break on your <a>. That would look something like: a {display:block}
Turtle91 is offline   Reply With Quote
Old 02-23-2018, 08:16 AM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by church mouse View Post
I have noticed that I have quite a number of books where the html has coding in it like this:

<?pagebreak number="2"?><a id="p2>
The first tag (<?pagebreak number="2"?>) is a processing instruction that all epub-compliant reading apps should ignore. The second tag (<a id="p2>) is page number target id, which is used by some ebook designers to identify page number targets. It also should be ignored by epub-compliant reading apps.

Unless you have epub3 books and a reader or app that supports epub3 books, you can ignore these tags.

(There are also some ADE epub2 books with print page number support that might use these tags, but they're relatively rare.)

For more information on page numbers, see the Page numbers Wiki entry.
Doitsu is offline   Reply With Quote
Old 02-23-2018, 09:29 AM   #5
church mouse
Evangelist
church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.
 
church mouse's Avatar
 
Posts: 482
Karma: 5277078
Join Date: Oct 2009
Location: UK
Device: Kindle Voyage, Kobo Clara HD, Kobo H2O, Boox Poke 2
Thank you all for your replies, you are wonderful.

The stock reader apps in my various ereaders (Pocketbook, Kobo, Tolino, ES ProHD) have no problems, but non-standard reader apps such as Koreader, Coolreader, AlReader all create a space in the text matching the space of the coding, so I guess they are not fully epub compliant.

In one book I did edit it by removing the coding manually, but in the last couple of books there have been more than 200 entries per book and I do not know how to code to search and remove all the entries, so I just use a reader and app which displays correctly.
church mouse is offline   Reply With Quote
Advert
Old 02-23-2018, 01:41 PM   #6
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by church mouse View Post
In one book I did edit it by removing the coding manually, but in the last couple of books there have been more than 200 entries per book and I do not know how to code to search and remove all the entries, so I just use a reader and app which displays correctly.
If you're familiar with Calibre Editor or Sigil (or another editor with regex support), you could use regular expressions to find these kinds of tags:

Code:
<\?[^>]+\?>
will find <?pagebreak number="2"?> (and all other processing instructions).

and

Code:
<a id="p\d+>[^<]*</a>
will find <a id="p2></a>, <a id="p3>3</a>, <a id="p4>4</a> etc.
Doitsu is offline   Reply With Quote
Old 02-24-2018, 02:48 PM   #7
church mouse
Evangelist
church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.
 
church mouse's Avatar
 
Posts: 482
Karma: 5277078
Join Date: Oct 2009
Location: UK
Device: Kindle Voyage, Kobo Clara HD, Kobo H2O, Boox Poke 2
Quote:
Originally Posted by Doitsu View Post
If you're familiar with Calibre Editor or Sigil (or another editor with regex support), you could use regular expressions to find these kinds of tags:

Code:
<\?[^>]+\?>
will find <?pagebreak number="2"?> (and all other processing instructions).

and

Code:
<a id="p\d+>[^<]*</a>
will find <a id="p2></a>, <a id="p3>3</a>, <a id="p4>4</a> etc.
Thank you. I will give this a go.
church mouse is offline   Reply With Quote
Old 02-24-2018, 04:51 PM   #8
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by church mouse View Post
Thank you. I will give this a go.
I have ONE comment, only--before you go bonkers and remove all those ids, I would be very careful to ensure that the book you're reading isn't using them, for index entry links, for "go to" comments inside the book, e.g., "See page 23 for a discussion of..." etc.

There's an excellent chance that the publisher wanted RPNs, for some reason (real page numbers or real page number functionality), and so the poor, overworked, beleaguered bookmaker put those in there as link targets--OR, to see if they could get Amazon to use the RPNs, rather than locations. yes, yes, I know, we're discussing ePUB, but after all, ePUB is often the parent to the concomitant MOBI.

Offered FWIW.

Hitch
Hitch is offline   Reply With Quote
Old 02-25-2018, 02:47 AM   #9
church mouse
Evangelist
church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.church mouse ought to be getting tired of karma fortunes by now.
 
church mouse's Avatar
 
Posts: 482
Karma: 5277078
Join Date: Oct 2009
Location: UK
Device: Kindle Voyage, Kobo Clara HD, Kobo H2O, Boox Poke 2
Quote:
Originally Posted by Hitch View Post
I have ONE comment, only--before you go bonkers and remove all those ids, I would be very careful to ensure that the book you're reading isn't using them, for index entry links, for "go to" comments inside the book, e.g., "See page 23 for a discussion of..." etc.

There's an excellent chance that the publisher wanted RPNs, for some reason (real page numbers or real page number functionality), and so the poor, overworked, beleaguered bookmaker put those in there as link targets--OR, to see if they could get Amazon to use the RPNs, rather than locations. yes, yes, I know, we're discussing ePUB, but after all, ePUB is often the parent to the concomitant MOBI.

Offered FWIW.

Hitch
Thanks Hitch, I am sure they are there for some reason other than to frustrate my reading experience, but in the current book I could see no useful purpose to the page ids for reading as an epub. Having now finished reading the book, I will take the opportunity to "mess" with a copy of it.
church mouse is offline   Reply With Quote
Old 02-25-2018, 04:36 AM   #10
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by church mouse View Post
Thanks Hitch, I am sure they are there for some reason other than to frustrate my reading experience, but in the current book I could see no useful purpose to the page ids for reading as an epub. Having now finished reading the book, I will take the opportunity to "mess" with a copy of it.
Okay...I'm sure you know best. I just wanted to remind folks that typically, those serve a purpose.

Hitch
Hitch is offline   Reply With Quote
Old 02-25-2018, 06:34 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I see plenty of internal page numbers that serve no purpose. I've also seen some eBooks with page numbers in the NCX that also serve no purpose. I just remove all that. I've found that the better the code the less chance of a problem. I've read of many problems that probably is do to errors or poor code. I've also read of problems because of the excessive CSS code many publishers use. It's amazing that when I remove the excess CSS code, I can get hundreds of classes removed.
JSWolf is offline   Reply With Quote
Old 02-26-2018, 04:23 PM   #12
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by church mouse View Post
Thanks Hitch, I am sure they are there for some reason other than to frustrate my reading experience, but in the current book I could see no useful purpose to the page ids for reading as an epub. Having now finished reading the book, I will take the opportunity to "mess" with a copy of it.
Generally page numbers are used in textbooks for reference by page when the instructor needs to identify something. Of course a general purpose eBook could be used in a school setting. Some tools can actually use the page numbers to move through the book.

Dale
DaleDe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you use page-break-after and page-break-inside? fluoresce ePub 14 05-24-2017 01:57 AM
ePub Page Numbering Using Page-map Dark123 Calibre 2 06-16-2010 07:15 AM
Page numbering StanByk Calibre 2 09-07-2009 02:10 PM
Page Numbering... slantybard Calibre 3 08-02-2009 11:41 AM
Page Numbering bookstar Sony Reader 1 03-24-2009 03:21 PM


All times are GMT -4. The time now is 05:27 AM.


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