I came across the CSS content, counter, counter-increment, and counter-reset and thought that these would be a great ( = 'easy') way to number sections and chapters.
Works great (text, TOC, etc.) in Sigil and in Calibre viewer, but in ADE and the Kindle the numbering and the content (like 'Section, 'Topc', 'Area' below don't appear.
Is this a lack of functionality in ADE and Kindle, or is there a workaround?
Code:
body
{
counter-reset:section;
}
h1
{
counter-reset:subsection;
}
h2
{
counter-reset:subsubsection;
}
h1:before
{
counter-increment:section;
content:"Section " counter(section) ". ";
}
h2:before
{
counter-increment:subsection;
content:"Topic " counter(section) "." counter(subsection) " ";
}
h3:before
{
counter-increment:subsubsection;
content:"Area "counter(section) "." counter(subsection) "." counter(subsubsection) " ";
}
Paul