shyamd / mkdocs-bibtex

A MkDocs plugin for citation management using bibtex
Other
79 stars 21 forks source link

Default footnotes ignore/overwrite existing footnotes #173

Closed daylinmorgan closed 1 year ago

daylinmorgan commented 1 year ago

I sometimes use a simple numbering scheme with footnotes i.e. [^1][^2].

If a document already uses footnotes then the plugin will happily override them.

A simple solution may be to namespace the footnotes to make this less likely and add this info to the README.

For example

[^1-citation]: ....

[^ref1]: .....

Or perhaps exposing this a user configurable option and defaulting to the existing behavior.

plugins:
  - search
  - bibtex:
      bib_file: "refs.bib"
      footnote_format: "ref{number}"
markdown_extensions:
  - footnotes

I can submit a PR if this makes sense.

shyamd commented 1 year ago

Yeah, this is a problem. I'm trying to refactor the tests so that they are feature-driven. Happy to accept a PR after that.

One question with namespacing: do you know if it will introduce any incompatibilities with older markdown or mkdocs versions?

daylinmorgan commented 1 year ago

I think this should pose no issues with the python-markdown implementation.

shyamd commented 1 year ago

Closed in #192 and released as v2.9.0. Thanks @daylinmorgan !