View Single Post
Old 09-23-2012, 07: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 08:01 PM.
yJan is offline   Reply With Quote