reference mode in epub

Because Calibre viewer doesn't support any more reference mode, we can do this workaround: add a css rule, like the following
body {
  counter-reset: section; }
h2 {
 counter-reset: paragraph; 

 counter-increment: section;
p::before {counter-increment: paragraph; content: "[cap." counter(section) ", para." counter(paragraph) "] ";
  color: gray; font-size: 70%;

This is an example of the result (the small text in gray is the css result):

No comments:

Post a Comment

Blog Archive