Closed reitzig closed 8 years ago
I am putting the finishing touches on Ver 2 and it has automatic numbering of sidenotes on each page. Using a CSS counter technique. It will be up in the next few days.
On Oct 5, 2015, at 6:54 PM, Raphael R. notifications@github.com wrote:
Myself, I like that I can set the sidenotes labels myself, e.g. to use letters (and numbers for footnotes or citing).
However, in case you want them to be numbered but did not know how (I had to dig a while, for another plugin), this is how you can do it.
We use the context parameter that is passed to a tag's render method. It is cleared after every build, but not during a single page is built.
page = context.registers[:page]
if !page.has_key?("sidenote-number") # something unique page["sidenote-number"] = 0 end page["sidenote-number"] += 1 — Reply to this email directly or view it on GitHub.
The new version is live and has auto numbering
Looking forward to v2 then, super!
Myself, I like that I can set the sidenotes labels myself, e.g. to use letters (and numbers for footnotes or citing).
However, in case you want them to be numbered but did not know how (I had to dig a while, for another plugin), this is how you can do it.
We use the
context
parameter that is passed to a tag'srender
method. It is cleared after every build, but not during a single page is built.