lemonmade / bigfoot

A jQuery plugin for creating exceptional footnotes.
http://www.bigfootjs.com
MIT License
936 stars 69 forks source link

useFootnoteOnlyOnce: false changes the button numeric value. #60

Open pixeline opened 7 years ago

pixeline commented 7 years ago

Hello!

This issue is related to this page : https://plancomptablebelge.be

The bigfoot is triggered with these two options:

$.bigfoot({
        actionOriginalFN : 'ignore',
        useFootnoteOnlyOnce: false
    });

The same footnote can be referred to multiple times (hence the handy useFootnoteOnlyOnce: falseoption).

But : This is a "legal" document, so footnotes reference numbers cannot be changed. The problem is that, with the useFootnoteOnlyOnce option turned off, the button numbers are incremented and do not keep their initial value. I can see that it is set in the CSS as

.bigfoot-footnote__button {

  &:after {
    // CONTENT
    content: attr(data-footnote-number);
...

I figured I could change that but then I'd need an attribute with the original value kept, which I don't.

It would be nice if Bigfoot would add a data-footnote-original-value attribute, that could be used for that.

Thank you! A.

Hazaels commented 4 years ago

I have the same problem... In my case I have to print the webpage and the references need to be numbers but the counter of numbers just increment without respecting the real reference number

For example:

"Lorem ipsum [1] dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[2] Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.[3]"

Footnotes

1: Lorem ipsum dolor 2: Duis aute irure

The above shows 3 numbers, referencing to 2 footnotes. For the reader what does that mean? It is confusing.

It should be:

"Lorem ipsum [1] dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[1] Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.[2]"

Footnotes

1: Lorem ipsum dolor 2: Duis aute irure