Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable option to generate MMD citations #8

Closed
1 task done
karkraeg opened this issue May 11, 2022 · 16 comments
Closed
1 task done

Enable option to generate MMD citations #8

karkraeg opened this issue May 11, 2022 · 16 comments
Labels
enhancement New feature or request

Comments

@karkraeg
Copy link

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.
@karkraeg karkraeg added the enhancement New feature or request label May 11, 2022
@karkraeg
Copy link
Author

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

@chrisgrieser
Copy link
Owner

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

@karkraeg
Copy link
Author

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

@karkraeg
Copy link
Author

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

@chrisgrieser
Copy link
Owner

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....

@chrisgrieser
Copy link
Owner

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?

@karkraeg
Copy link
Author

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

@chrisgrieser
Copy link
Owner

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

@chrisgrieser
Copy link
Owner

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

@karkraeg
Copy link
Author

Using this options it woks, thanks!

grafik

@chrisgrieser
Copy link
Owner

chrisgrieser commented May 20, 2022

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 😝

@karkraeg
Copy link
Author

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

@chrisgrieser
Copy link
Owner

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

@chrisgrieser
Copy link
Owner

should be fixed.

@chrisgrieser
Copy link
Owner

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

@karkraeg
Copy link
Author

Thats nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants