chrisgrieser/alfred-bibtex-citation-picker

Enable option to generate MMD citations

karkraeg opened this issue · 16 comments

Feature Requested

Would it be possible to add an option to generate citations like [#Helms2008] instead [@Helms2008] and [25][#Helms2008] instead [@Helms2008, p. 25] - see https://fletcher.github.io/MultiMarkdown-6/syntax/citation.html ?

Thanks!

Relevant Screenshot

No response

Checklist

  • The feature would be useful to more users than just me.

If you could point me to where I could adjust this for me that would be great ✌️

Hi, the part responsible for the citation format is unfortunately implemented mostly in Alfred itself instead of a proper code file (cause it requires looping through Alfred modals itself for multiple citations).

This isn't impossible to change, but at least a bit inflexible and therefore more time-intensive to change. (Which is also why I haven't implemented #1 yet.) It's the teal-blue part if you want to give it a try yourself.
Pasted image 2022-05-17 17 12 46

I think it’s the way the bibtex data is written into the buffer.json? If I manually change to "arg": "#AhlersJacke2016", it gets pasted the way I want

Yeah, you need to change

to "arg": "#" + citekey, then delete the buffer.json in /Users/YOURUSER/Library/Application Support/Alfred/Workflow Data/de.chris-grieser.alfred-bibtex-citation-picker/buffer.json and then customize this setting:

image

yep, that's pretty much it. If I find the time, I'll implement a setting for this (and Latex in #1), but for now, I have a bunch of deadlines....

ok, I've implemented customization options in release 9.0.0.
Pasted image 2022-05-19 19 56 20


I am not really familiar with the MMD citation syntax, but would these variables suffice to make MMD citations work?

cool! normal citations work, but citations with page now look like [#Helms2008, p. 625] where it should be [625][#Helms2008]

boy, having page numbers before the citekey is really weird. Lemme look how to switch the order, as well.

okay, these two settings have been added to version 9.1.0. Have a look whether they are sufficient for MMD citations?
image

Using this options it woks, thanks!

grafik

are you sure? Like, in the post before, you mentioned that in MMD, the page number comes before the citekey, and in the screenshot you are sharing, you left _format_page_before_citekey as false 😝

yeah, that seems to be a bug 🙈 or rather I did try it this way and then it worked:

Screen.Recording.2022-05-20.at.09.17.10.mov

oops, yes, I mixed up true and false on my side 🙈

should be fixed.

thanks for your input. One can now conveniently change the citation format via scp 🙂

Pasted image 2022-05-20 12 02 32

Pasted image 2022-05-20 12 02 54

Thats nice!