Last week, not much was accomplished actually (just enabling the user to import data from multiple .bib files), so I didn't bother releasing a new version for just that. On the other hand, this week we have a very useful feature and a lot of work to be done. Namely, as requested by most users in the survey, I'm gonna work on adding an option for users to specify the citation style in which references are rendered at the bottom of the note. I'm very excited about this feature because I get to learn a lot of stuff both engineering- and research-wise.
I have a problem because the references are not showing up at all after the update. I added Nature.csl file from the Zotero style repository (link). Any idea what went wrong? Thank you for the help and all the work.
I have added the .bib file as well, but still no references. I also changed to different .csl form Zotero but still no luck.
I got prompted for an error when path to the .bib file was not added or it was incorrect. (Error: Could not open some files: ENOENT: no such file or directory, open").
I found error in under Development Tools -> Console with Filter bib:
/tmp/.mount_JoplinnvOdFx/resources/app.asar/node_modules/@joplin/lib/Logger.js:188 13:39:07: PluginService: Loading plugin from /home/zakky/.config/joplin-desktop/cache/com.xUser5000.bibtex
/tmp/.mount_JoplinnvOdFx/resources/app.asar/node_modules/@joplin/lib/Logger.js:188 13:39:08: joplin.plugins: Starting plugin: com.xUser5000.bibtex
/tmp/.mount_JoplinnvOdFx/resources/app.asar/node_modules/@joplin/lib/Logger.js:188 13:39:09: joplin.plugins: Finished running onStart handler: com.xUser5000.bibtex (Took 1092ms)
index.html:1 Uncaught (in promise) Error: Reference not found
at Function.getReferenceById (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at Object.retrieveItem (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at h.Engine.retrieveItem (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at h.Registry.doinserts (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at h.Engine.updateItems (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at u.formatRefs (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at /home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1
at EventEmitter.<anonymous> (services/plugins/plugin_index.js:92)
at EventEmitter.emit (events.js:310)
at Object.onMessage (electron/js2c/renderer_init.js:91)
index.html:1 Uncaught (in promise) Error: Reference not found
at Function.getReferenceById (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at Object.retrieveItem (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at h.Engine.retrieveItem (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at h.Registry.doinserts (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at h.Engine.updateItems (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at u.formatRefs (/home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1)
at /home/zakky/.config/joplin-desktop/tmp/plugin_com.xUser5000.bibtex.js:1
at EventEmitter.<anonymous> (services/plugins/plugin_index.js:92)
at EventEmitter.emit (events.js:310)
at Object.onMessage (electron/js2c/renderer_init.js:91)
Is this enough can I send you anything else that might help you?
I tried a bunch of things to try and produce this bug on my machine but no luck at all. I don't know why this shows up. Anyway, I'll keep searching and tell you about any updates.
I have tested (Win10 and Linux) a few more things and managed to make it work (nature.csl now works but I don't know why yesterday hasn't) and those are my two conclusions:
not all styles are working (the reference section those not show up at all):
medicinal-chemistry-research - not working
medicinal-research-reviews - works
process-biochemistry - not working
royal-society-of-chemistry - works
apa7th - works
nature - works
european-journal-of-medicinal-chemistry - not working
international-journal-of-molecular-sciences - not working
journal-of-medicinal-chemistry - not working
journal-of-the-american-chemical-society - not working
acs-medicinal-chemistry-letters - not working
Maybe there is some problem with styles that have special numbering (like [1], (1)).
Numbers for numbering references are in a separate line instead of on the same line as a reference (just in front of it).
@laurent@xUser5000 I think I found the problem why some .csl citation style files have errors rendering the references. I got all the citation styles from here Zotero Style Repository. The one that are not working doesn't contain the macro code for styling the references (I not sure how Zotero is still able to render them). Have a lot at Medicinal chemistry research compared to the Medicinal research reviews. I made a mistake and assumed that if the citation style is in the Zotero Style Repository it will work.
If this is not what causes the problem I'll try with debugging (I don't have a lot of knowledge about coding but I'll do my best and ask for guidance if I'll need it).
Thank you for the help and all the great work!
Yesterday, I tried all along to solve this issue and even contacted the maintainer of the library that I'm using to do citations, but no luck at all. I'll try once again today while writing the spec of the new feature.
@xUser5000 I hope that you are ok.
May I ask how is the state of this plugin? I was also wondering if it would be possible to maybe add option to render the references as a side panel like in the plugin Automatic Backlinks to note. Maybe you could borrow the code used there?