I've managed to counter (and subcounter) the different titles and subtitles of a chapter. But how can I get these numbers in front of the titles in the Table of Contents?
Thanks in advance...
Rogier
Thanks in advance...
Rogier
.module .chapter h2.chapterNumber{ /* from the content */
string-set:strChapterNumber content();
display:none;
}
.module .chapter h2.chapterTitle{ /* stop title numbering, start over */
counter-reset: strTopicNumber;
}
.module .chapter h2.topicTitle{ /* count titles in this chapter */
counter-increment: strTopicNumber;
}
.module .chapter h2.chapterTitle::before{ /* present chapter number */
content:string(strChapterNumber)" ";
}
.module .chapter h2.topicTitle::before{ /* present chapter and topic numbers */
content:string(strChapterNumber) "." counter(strTopicNumber) " ";
}
#module0 ul.toc a::after { /* page numbering */
content:leader('.') target-counter(attr(href), page);
}
#module0 ul.toc ul li a::before { /* chapter and topic numbering */
content: target-counter(attr(href),strChapterNumber)"."target-counter(attr(href), strTopicNumber)" ";
}