![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Sep 2011
Device: sony prs-650
|
page numbers & chapter titles
Hello!
( Depending on the solution of the problem, the thread might be misplaced, feel free to move ![]() I am manually converting a book to an ebook and I have found a problem I couldn't solve by trying and google-ing, so here I am ![]() The way i'm working it is to firstly translate the book to a html file ( because it is german fraktur, ocr doesn't work sometimes ) and then to convert the html with calibre. My question is, how can I make the epub show the page numbers and chapter titles on every page, together with some special formatting? As I said, I googled and found the solution to be to implement a certain form of css in the epub. I looked over the calibre stylesheets ( calibre/resources/templates ) but couldn't find a @page { ... } tag. So I switched to Sigil and found my desired line there, but all editing led to nothing. Now, I would like to know, what error ( if i have made one ) I have made. The lines: Code:
body { display: block; page: main; counter-reset: page 1 } @page main { @top { content: string(chapter-title) } @bottom { content: counter(page) } } chapter title { string-set: chapter-title content() } ![]() Thank you for your help! Last edited by yJan; 09-23-2012 at 07:01 PM. |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,880
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Moderator Notice
Moving to EPUB forum since this is not really a Calibre Conversion issue |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Well, one problem is that the @top and @bottom are part of CSS3. In the specificatios for ePUB2 (what the T1 uses) CSS2 is used.
What you want is not possible with ePUB2. |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Sep 2011
Device: sony prs-650
|
Thank you, so I'll have to think about rooting then ...
and besides, I just applied the css changes to the epub file without moving it to my reader, and it didn't work there ( the calibre epub viewer ) too ... Last edited by yJan; 09-24-2012 at 04:06 AM. |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Rooting won't help you there. There might be an android reader that can read ePUB3, but even then it remains questionable whether it will work.
The Calibre (and Sigil) viewer are actually a web renderer and not an e-book renderer. It should not be used to test if something works. It is better to test in ADE (no ePUB3 though). |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 70
Karma: 515184
Join Date: Sep 2011
Location: Brasília
Device: Kindle3, iPad, Nook, Kobo, Positivo Alfa
|
There's a related forum post about headers and footers here: https://www.mobileread.com/forums/sho...d.php?t=189260 (not really a solution, just for more info about this)
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Sep 2011
Device: sony prs-650
|
just found an interesting blog post about a similar problem with a solution in html http://traceyspencer.blogspot.co.uk/...oter-with.html ... i should try it, but it looks promising so far ...
if it would work, i could easily define that structure before every chapter and then ... goodbye, css! Last edited by yJan; 09-26-2012 at 01:12 PM. |
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
There are two more things, you could look into:
1. Add a page-map file to control the page number display in ADE and RMSDK based eReaders. 2. Create a fixed layout book. I.e. create an .html file for each page. This would allow you to hard-code headers, footers and page numbers, but somehow defeats the purpose of reflowable content. |
![]() |
![]() |
![]() |
#9 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,940
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
ADE already displays the page number. So that's a non-issue. As for displaying a header. I am very glad ADE doesn't do that. Just a waste of screen space (IMHO).
|
![]() |
![]() |
![]() |
Tags |
calibre, chapter titles, epub, html, sony |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kobo (touch?) page numbers per chapter | Mrs_Often | Kobo Reader | 11 | 09-12-2012 06:03 PM |
Touch & Page Numbers | 93terp | Amazon Kindle | 12 | 11-21-2011 05:53 PM |
Any Way To Delete Titles And Page Numbers? | NVash | Calibre | 5 | 01-07-2011 07:13 AM |
CSS & regex for chapter titles | hpstricker | Calibre | 3 | 07-17-2008 10:13 AM |
Page numbers imported as titles... :-/ | ^_Pepe_^ | Sony Reader | 2 | 10-08-2007 08:39 AM |