Closed irzhegalova closed 1 year ago
Hi, I will look into the issue.
It would also be great help for me if you can explicitly add {{citekey}} to allowed metadata fields
You can use the {{id}}
metadata field; this is equivalent to {{citekey}}
. Or did I misunderstand your statement above?
Note:: for batch metadata operations {{id}}
will return empty.
This is fixed in the latest release. Please test it.
@anoopkcn thank you for a quick fix, it works well now!
Regarding {{id}} you understood me perfectly, but unfortunately {{id}} is not always equivalent to citekey.
Let's say I added some doi to my obsidian note. Reference map will recognize it as a paper and create an entrance. But its key will be doi, not citekey.
Have a look at this example:
I added https://doi.org/10.1038/s41419-020-03238-7
with template {{author}}, {{year}} %%[{{id}}] %%
I will receive the following: M. Schank, 2020 %%[10.1038/s41419-020-03238-7] %%
Oh yes, I see what you mean now. Currently, {{citekey}}
is only available for references you have in the Zotero library. I will think of a way to construct citekey
for references not in the Zotero library.
I have a couple of ideas about this. The biggest problem in implementing this is maintaining consistency between zotero bibtex citekey
format and whatever format I implement for references(since better bibtex doesn't have a public typescript package). That is a long way of saying it might take a bit of time for me to implement this feature 😁
It is harder than that :)
if I cite a paper using doi although HAVING it in my library: https://doi.org/10.1016/j.cell.2022.11.001 (citekey @LOPEZOTIN2023243) Refmap will recognize it but when using the same template {{author}}, {{year}} %%[{{id}}] %%
return C. López-Otín, 2022 %%[10.1016/j.cell.2022.11.001] %%
but not C. López-Otín, 2022 %%[@LOPEZOTIN2023243] %%
but anyway, I got your point. It is not a crucial thing, but still a little bit of pain for me
In the next patch, I can add a setting to convert the reference id
s to citekey
if the references are present in the Zotero library. This could solve the problem you specified in the last message.
it would be great, thank you so much!
Hi @irzhegalova, I added this feature in the latest version(Reference-Map is now available in the community plugins so you can simply do an update)
behaviour: If you have a DOI in the markdown file Reference-Map will look for the Citekey in the Zotero library; if it finds the CiteKey, it will substitute the {{id}}
for that CiteKey instead of the DOI. The index cards will also show a link to the Zotero entry.
NOTE: you have to enable this in the settings called Find CiteKey from ID
.
hey!
I was using a citekey at the end of the sentence like that:
[@interestingPaper_Year].
And for some reason, this plugin was unable to parse a citekey. I added a whitespace like that[@interestingPaper_Year] .
and then the paper was parsed into Reference Map automatically. The same behaviour was noticed when creating metadata template{{author}}, {{year}} %%[{{id}}] %%
, I was forced to add that whitespace in order for paper to parse into the system.It would also be great help for me if you can explicitly add {{citekey}} to allowed metadata fields
p.s. I was looking for something to manage my zotero lib from obsidian and accidentally bumped up into your plugin. I love it, great work!