-
Notifications
You must be signed in to change notification settings - Fork 43
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: Counting Citation without Brackets #81
Comments
All praise should go to @chrisgrieser. So I have never used footnotes or citations in markdown but I have looked at the possible formats that @chrisgrieser implemented. Firstly the footnote formats (
Secondly the citations formats (
So citations don't have to be in brackets. Also are you sure about those square brackets around the page number because obsidian seems to consider it a link, at least in Live Preview, probably It looks like you can make yours citations work by putting a comma after like Please let me know if I got anything wrong or if you believe this behaviour should change in anyway. |
Hi @lukeleppan, Thanks for your response. First, I don't get your explanation about using Second, if I add the comma after the citation key, Pandoc will not render it correctly, Pandoc is supposed to render as: See Joe Donald, The Effect of Consumerism (New York: Penguin, 1994), 314. With the comma, Pandoc will render as: See Joe Donald, The Effect of Consumerism (New York: Penguin, 1994), [p. 314]. |
Hey, thanks for the kind words, both you you 😊 As @Liong1976 says, citations without brackets are indeed valid. However, the reason why I didn't include them in the regex is that a lot of plugins use some syntax with Like, since |
Hi @chrisgrieser, Thanks for your response. I understand why you didn't make this plugin include citations without brackets. However, your proposal, letting the user choose whether they want to use brackets for the citations, looks good to me. |
@chrisgrieser In addition to the case of citations without brackets being discussed here, I'd like bring the issue with dots ( In my first document, Pandoc Reference List counted 14 citations, and Better Word Count only counted 4. The only problematic cases I found were the lack of brackets already discussed and then many cases of citekeys with dots in them. |
Changing what is considered as a citekey I can do easily. Problem is rather, that with a less strict definition, there are as outlined above a lot of potential incompatibilities with other plugins. Adding the settings to customize what should be regarded as citekey would require adding some stuff to the settings UI, which I am not familiar with, that's something @lukeleppan (or someone else familiar with svelte) will have to implement. In the meantime, it would be really helpful, if someone knows any authoritative source which characters exactly are valid in a citekey. I have looked for something like that more than once, but haven't really found something definitive. |
See the Pandoc docs on Citation syntax. That's as authoritative as it gets: https://pandoc.org/MANUAL.html#citation-syntax And perhaps also this discussion on the Pandoc repo: jgm/pandoc#6026 |
okay, so it seems is the most accurate information you can get on the topic, which should be implemented by default
so not all examples shared here are actually valid citekeys. Nevertheless, the specification is quite a bit more complicated than I expected with all those rules concerning punctuation; so implementing it might be a bit tricky (or at least requiring some scripting in addition to pattern matching) |
It might be easier to just require a .bib or .json bibliography file for this feature, and then just check the keys against that. Any citekey in the file is recognized regardless of syntax. This would be similar to how Pandoc Reference list works. There could even be some functionality convergence here. |
First, thank @lukeleppan and @chrisgrieser for making the latest update that allowed this plugin to count Footnotes and Citations.
As I mentioned in the Discord, I use citations without brackets,
@JOETheEffect1994
, instead of[@JOETheEffect1994]
. The plugin only shows that I have 1 citation, even though I have many more than one.The format of the only citation that was counted was like this:
^[@JOETheEffect [p. 314]]
Mostly, I put citations in inline footnotes that like this:
^[Plura mihi bona sunt, inclinet, amari petere vellent. Ab illo tempore, ab est sed immemorabili. Ullamco laboris nisi ut aliquid ex ea commodi consequat. See @JOETheEffect [p. 314].]
I wonder if this plugin also can count citations without brackets.
I appreciate your help.
The text was updated successfully, but these errors were encountered: