joplin / plugin-bibtex

Use locally stored BibTeX files to integrate citation into Joplin
29 stars 7 forks source link

Customize the rendering of inline references #26

Closed xUser5000 closed 3 years ago

xUser5000 commented 3 years ago

This PR is not yet complete, but I'm making it to request some help in Implementing this feature. I've managed to find a way to collect all cite keys in the note body and add them to the bibliography section in the footer. However, I can't figure out how to proceed from here.

I'm trying to look for any of the patterns described here. After encountering a pattern, I create a new token of type "inline_reference", replacing the old "text" token, to be parsed by the renderer later. But I still don't know how the renderer is supposed to do this, I tried just returning a random HTML but didn't work. The documentation of markdown-it does not help either

I need help, please.

xUser5000 commented 3 years ago

I came up with a trick that actually might work.