03-09-2023, 03:15 PM | #1 |
Connoisseur
Posts: 98
Karma: 1133068
Join Date: Sep 2007
Device: ipaq
|
Creating hidden or invisible page numbers
I'm scanning a fairly large book and would like to keep track of the original page numbers to make proofing easier. I'm not looking for anything to show up on the reading device/app, just a bit of code to put into the html/xhtml file that I can see when I edit/view the source but is invisible otherwise.
If possible I'd also like to be able to keep track of where on the original page that the page number appeared, something like TL=top left, TC=top centre, TR=top right, BL=bottom left, etc. Including no page number on original page. Anyone have any ideas? |
03-09-2023, 03:23 PM | #2 |
Wizard
Posts: 1,165
Karma: 4917718
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Most books I have edited use something like the following:
<a id="page_47"></a> You could probably extend the ID to something like <a id="TC_page_47"></a> |
Advert | |
|
03-09-2023, 04:16 PM | #3 |
Connoisseur
Posts: 98
Karma: 1133068
Join Date: Sep 2007
Device: ipaq
|
Oh, I wasn't thinking of anchors, cool.
I guess I was thinking spans would be useful. Thanks |
03-09-2023, 04:41 PM | #4 |
Grand Sorcerer
Posts: 6,566
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
One advantage of using id’s to indicate where pages start is that you can collect them later into a page map that can be used by some reading software to optionally show the original page numbers.
|
03-09-2023, 06:27 PM | #5 | |
Wizard
Posts: 1,165
Karma: 4917718
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
In case I wasn't clear, there is no text between the opening and closing tag. Last edited by Karellen; 03-09-2023 at 06:34 PM. Reason: Remove incorrect comment. |
|
Advert | |
|
03-09-2023, 10:03 PM | #6 |
Bibliophagist
Posts: 36,751
Karma: 146617620
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Speaking of using spans, I've seen several epubs where the embedded page numbers have been configured as:
Code:
<span aria-label=" Page 114. " epub:type="pagebreak" id="pg_114" role="doc-pagebreak"/> |
03-10-2023, 12:37 PM | #7 |
frumious Bandersnatch
Posts: 7,516
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
If you only want it for editing purposes, with no effect on the actual ePub (i.e., no possibility of linking to a page), you could just use XHTML comments, and you can be as verbose as you want:
Code:
<p>Once upon a time there was a little girl <!-- page break here, page 5 ends, page 6 starts, with page number in the bottom right and a coffee stain near the spine --> who lived in the forest.</p> |
03-10-2023, 02:19 PM | #8 |
Wizard
Posts: 1,567
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
All the answers I saw. were good solutions; I add just one more for the records.
Add this in the place you wish in your .xhtml file (it can be any place, even inside a paragraph or title, no matter): Code:
<span class="pgnum">XX</span> Code:
.pgnum { display: none; } |
03-10-2023, 02:47 PM | #9 |
Resident Curmudgeon
Posts: 74,622
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
03-10-2023, 02:49 PM | #10 | |
Resident Curmudgeon
Posts: 74,622
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with assigning correct page breaks and page numbers to a textbook [converting fr | cateroseg | Calibre | 0 | 02-14-2018 10:32 PM |
Chapter Page Numbers Instead of Title Page Numbers | TheArtfulDodger | Devices | 1 | 11-18-2013 01:08 PM |
Kindle (AZW3/MOBI) ebooks with "real page numbers" to PDF with same page numbers? | abvgd | Conversion | 2 | 05-24-2013 01:24 PM |
Troubleshooting Books become invisible on my Kindle's Home Page | evwool | Amazon Kindle | 4 | 10-01-2011 05:10 PM |
Is there a hack for displaying page numbers rather than location numbers? | nesler | Kindle Developer's Corner | 16 | 02-15-2011 12:00 AM |