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
Feature Request: Support customizing citation syntax #1
Comments
I agree. This can be implemented as an option choosing between @, # or bare key. |
Seconded. This would be super useful! Thanks! |
I would like this feature for latex as well. |
Can anyone refer me to some documentation for Latex citations? Specifically, I need information on how citations look like for various cases?
|
These are the ones that work for bibtex. Not sure if it works for other settings/packages (e.g., Natbib, apacite).
I also found these on Overleaf for your reference: |
so instead of hardcoding a citation syntax format, I have simply turned all of them into variables, so it should cover everything form tags in Obsidian to other citation formats. However I am not totally certain, that I "get" this weird Latex citation syntax – I am writing in markdown since I wanted to avoid all the hassle of Latex, after all 😅 Would this suffice? (the screenshot contains the values for Pandoc citations) You can try it out in release 9.0.0. |
Thanks for the great work Chris! Everything works except the _format_citekey_prefix though. When I set it to empty instead of @, the "@" still appears anyway. If I change it to other values, @ remains and the newly set value is not reflected. Wonder if there is anything I am doing wrong? Should I be tweaking something else? Thank you again! |
Thanks for the new version! Everything works like a charm. I did not meet the persisting @ issue. |
Ah I reloaded the buffer and now everything works! |
Could you show me what values you have all set for That way, I can add some presets, which not only make it easier to switch, but also automatically reload the buffer |
also, I noticed that with certain citation styles, you put the page number before the citekey. So I have added the following two options to version 9.1.0 to account for that possibility. Could you give it a try and see whether you can cover all cases (multiple citations, with/without page numbers) by having these variables? If those are enough, and you can give me the values for the |
Hi @chrisgrieser , here is the values I set for _format...: I also noticed that the reason that reloading the buffer solves the issue with persistent @ is that I have set the prefix to empty in the first place, but this creates another problem that, if I want to insert something like [[@citekey]] and the prefix is set to empty, it will give me [[citekey]] without the @. In other words, it seems if I set the prefix and reload the buffer, it will always come up with prefix+citekey as the {query} variable. Is there a way for me to set the {query} as only the citekeys without the prefixes? Thanks! |
@owlasea I am not entirely sure that I understand what you mean. Like, how is If this is about the need for reloading, I just pushed an update (9.1.2) which removes the prefix from the query, so that you can change the formatting without reloading the buffer. |
with 9.2.0, one can now more conveniently change the citation format via |
thanks, is fixed |
well, I guess this issue can be regarded as closed then? |
just for reference: I also added a bare citekey option. With the irregularity of Latex citations, I'd probably need some advice on how to properly format that. In case someone is interested in that, please open a new issue for the Latex citation format |
Feature Requested
Currently, the default citation syntax is
[@citekey]
, for use with pandoc. In my workflow, there are also two other use cases.#citekey
. This way, I can easily see where a paper is referenced from the tag pane and graph view.\cite{citekey}
.Therefore, it would be great if one can customize the citation syntax to use. For instance, one can set a default format and a few other formats. When inserting the citation key, the default format would be used, unless specified otherwise.
Relevant Screenshot
No response
Checklist
The text was updated successfully, but these errors were encountered: