Hello Prince Users
I created a book structure with prefaces, chapters and appendices.
Using the ideas for automatic chapter numbering I can not achieve automatic increase of chapter numbering.
Can you have a look and tell me what I am doing wrong ? Here is the html code:
[html]
<div class="preface">
<h1 class="preface">title preface</h1>
</div>
<div class="chapter">
<h1 class="chapter">title chapter 1</h1>
</div>
<div class="chapter">
<h1 class="chapter">title chapter 2</h1>
</div>
<div class="appendix">
<h1 class="preface">title appendix</h1>
</div>
[/html]
[css]
body {
counter-reset: h1counter;
}
h1.chapter:before {
content: counter(h1counter, upper-roman) ".\0000a0\0000a0";
}
/* the next is for the running header increasing chapter number */
h1 { counter-increment: h1counter;
string-set: title counter(h1counter, upper-roman) ".\0000a0\0000a0" content(text)
}
[/css]
Thanks very much for your advice.
regards, Peter
I created a book structure with prefaces, chapters and appendices.
Using the ideas for automatic chapter numbering I can not achieve automatic increase of chapter numbering.
Can you have a look and tell me what I am doing wrong ? Here is the html code:
[html]
<div class="preface">
<h1 class="preface">title preface</h1>
</div>
<div class="chapter">
<h1 class="chapter">title chapter 1</h1>
</div>
<div class="chapter">
<h1 class="chapter">title chapter 2</h1>
</div>
<div class="appendix">
<h1 class="preface">title appendix</h1>
</div>
[/html]
[css]
body {
counter-reset: h1counter;
}
h1.chapter:before {
content: counter(h1counter, upper-roman) ".\0000a0\0000a0";
}
/* the next is for the running header increasing chapter number */
h1 { counter-increment: h1counter;
string-set: title counter(h1counter, upper-roman) ".\0000a0\0000a0" content(text)
}
[/css]
Thanks very much for your advice.
regards, Peter