shyamd / mkdocs-bibtex

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

Add options to citations #269

Open JPapir opened 2 months ago

JPapir commented 2 months ago

Rationale

Implements #225 .

As I am not a python-expert, there might be lot of potential improvements.

Content:

  1. We want to add options that can be passed to the rendering engine as in [@cite|f]

    • Solution: create a 5th match group which captures |abd] in cite keys. This is propagated in quads which now contain an additional string item. Empty if no options passed.
    • Note : I tried to make this more general than required here. Several parameters represented by a letter could be passed in that way, for future requests.
  2. We want an option that renders a full-cite (similar to LaTeX \fullcite)

    • Solution Check if option "f" was passed.
      • If yes, replace the key by the full citation without reference. Do not show item in footnote references, except if cited elsewhere with normal behaviour.
      • If yes and several keys, does the same, but creates also a bullet-point list for the full cites.
      • If no, normal behaviour (depending on whether the inline cite config is true)
  3. Update tests accordingly.