Forum How do I...?

header in the second page of a book

fbrzvnrnd
I have a ebook, and I use the h2 tag to set chapter name. I'd like to show in header the chapter name, and I use

string-set: doctitle content();  


for this, but I need the header not showed in the page where the h2 is showed, but only from the second one. For example if a chapter begin with the h2 "Chapter 3: a vojage", I want the header "Chapter 3: a vojage" showed from the next page. Else I got the "Chapter 3: a vojage" as a Title in the page AND "Chapter 3: a vojage" in header, and I do not want this. I search the forum but I do not found the answer, thank you.

f.
mikeday
When you use the string, you can say "string(doctitle, start)" to use the string that is specified at the start of the page, so that the new string will only take effect from the start of the next page.

Alternatively, you can use "@page chapter:first { @top { content: none } }" or something like that to change the header on the first page of each chapter.
fbrzvnrnd
When you use the string, you can say "string(doctitle, start)" to use the string that is specified at the start of the page, so that the new string will only take effect from the start of the next page.


This is working only for the first chapter. In the first page of the second chapter I see in the header the first chapter title.

Alternatively, you can use "@page chapter:first { @top { content: none } }" or something like that to change the header on the first page of each chapter.


i don't know if I have understand: I try to use:

@page { size: 12.40cm 15.20cm;
    		margin: 15mm 7mm 10mm 7mm;
    		  @top-center { 
    		  font-weight:bold;
		                font-size: 0.7em;
		font-family: "Gentiumbold", Georgia, Palatino, serif;
    		  content: string(doctitle);
    		 }
    		 
    		 
    		 }
  
  
  
  @page :first { size: 12.40cm 15.20cm;
    		margin: 0;
    	}
    	
    	@page h2:first { @top { content: none } }



But it don't work. I'm missing something, or I do not understand.

Thank you.


f.
mikeday
If each chapter is wrapped up in <div class="chapter">, then you could add this CSS:
@page chapter:first { @top { content: none } }

div.chapter {
    page: chapter;
    prince-page-group: start
}
fbrzvnrnd
This is working fine, thank you!
I only see this put a page-break before the page I started the div.chapter
Can I remove this? I do not know the sintax "page: chapter; prince-page-group: start" is there a place where I can find documentation to work with this css syntax?


Thank you again

f.
dauwhe