Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-23-2012, 06:58 PM   #1
yJan
Junior Member
yJan began at the beginning.
 
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() }
( sony prs-t1, btw )
Thank you for your help!

Last edited by yJan; 09-23-2012 at 07:01 PM.
yJan is offline   Reply With Quote
Old 09-23-2012, 07:29 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,777
Karma: 54830978
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
theducks is offline   Reply With Quote
Advert
Old 09-24-2012, 01:15 AM   #3
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 09-24-2012, 04:03 AM   #4
yJan
Junior Member
yJan began at the beginning.
 
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.
yJan is offline   Reply With Quote
Old 09-24-2012, 09:55 AM   #5
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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).
Toxaris is offline   Reply With Quote
Advert
Old 09-25-2012, 08:26 AM   #6
PageLab
Connoisseur
PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.
 
PageLab's Avatar
 
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)
PageLab is offline   Reply With Quote
Old 09-26-2012, 01:08 PM   #7
yJan
Junior Member
yJan began at the beginning.
 
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.
yJan is offline   Reply With Quote
Old 09-26-2012, 01:48 PM   #8
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,583
Karma: 22735033
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.
Doitsu is offline   Reply With Quote
Old 10-04-2012, 03:42 PM   #9
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,887
Karma: 128597114
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).
JSWolf is offline   Reply With Quote
Reply

Tags
calibre, chapter titles, epub, html, sony

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 04:57 PM.


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