View Single Post
Old 08-04-2018, 06:30 AM   #2
elibrarian
Imperfect Perfectionist
elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.
 
elibrarian's Avatar
 
Posts: 659
Karma: 863576
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by ghmerrill View Post
I'm using CSS counters in my heading tags to auto-generate chapter and section numbers that are prepended to the heading text (currently just for h2 and h3 headings). It all works perfectly well in the html pages, but the numbers don't appear in the TOC.

At this point, I'm assuming that Sigil just doesn't handle this degree of complexity in the use of CSS. But is there something I'm missing?

Is the only way to get the numbers into the TOC to put them there manually (and hence update them every time a new TOC is generated)?

Thanks for any insight.
If I understand you correctly, you want a different text from the header (eg <h2></h2>) in the TOC?

If so, you can use the title property of the header tag:

<h2 title="1: On the First Day of Christmas">On the First Day of Christmas</h2>

Then Sigil will regenerate the TOC based on the text in the title tag.

I'm not sure, but I don't think the epub spec supports the CSS-way, you mention, even if it works in html pages.

Regards,

Kim
elibrarian is offline   Reply With Quote