Abbreviation of journal titles throws out dots
I have observed an inconsistency with journal abbreviations. I have a large number of citations imported from BibTeX files, where the `Publication field` actually contains an abbreviation (e.g. `Appl. Phys. Lett.`) instead of the full journal name. The `Journal Abbreviation` field is usually kept empty.
Now, when I create a bibliography, the unabbreviated names are abbreviated correctly, but in the already abbreviated ones the dots are thrown out.
Here is an example (the first entry had an unabbreviated journal name, the second one an already abbreviated name):
1 A. Ajay, J. Schörmann, M. Jiménez-Rodriguez, C.B. Lim, F. Walther, M. Rohnke, I. Mouton, L. Amichi, C. Bougerol, M.I. Den Hertog, M. Eickhoff, and E. Monroy, J. Phys. Appl. Phys. 49, 445301 (2016).
2 H.A. Zarem, P.C. Sercel, J.A. Lebens, L.E. Eng, A. Yariv, and K.J. Vahala, Appl Phys Lett 55, 1647 (1989).
I tried without or with Medline abbreviations activated.
Debug ID: D216382291
I first had BBT under suspicion, see discussion at https://github.com/retorquere/zotero-better-bibtex/issues/1436 but as it also affects the LO plugin it is obviously happening on the Zotero side.
Now, when I create a bibliography, the unabbreviated names are abbreviated correctly, but in the already abbreviated ones the dots are thrown out.
Here is an example (the first entry had an unabbreviated journal name, the second one an already abbreviated name):
1 A. Ajay, J. Schörmann, M. Jiménez-Rodriguez, C.B. Lim, F. Walther, M. Rohnke, I. Mouton, L. Amichi, C. Bougerol, M.I. Den Hertog, M. Eickhoff, and E. Monroy, J. Phys. Appl. Phys. 49, 445301 (2016).
2 H.A. Zarem, P.C. Sercel, J.A. Lebens, L.E. Eng, A. Yariv, and K.J. Vahala, Appl Phys Lett 55, 1647 (1989).
I tried without or with Medline abbreviations activated.
Debug ID: D216382291
I first had BBT under suspicion, see discussion at https://github.com/retorquere/zotero-better-bibtex/issues/1436 but as it also affects the LO plugin it is obviously happening on the Zotero side.
Tools → Developer → Run JavaScript. You can use this example for batch editing as a guide https://www.zotero.org/support/dev/client_coding/javascript_api#batch_editing
I guess, instead of changing the export, it would make more sense to either have an 'unabbreviate journal names' and/or 'update metadata from DOI' function that could be run as batch processes. Both would allow to correct the data. And, I guess I might not be the only one importing from BibTeX, where it is quite common to save abbreviated journal names. From other discussions, I have seen that at least the latter is in fact already on the list of features that are being developed. Any idea when that could be available?
In the meantime, when I find some time, I will try using pyzotero together with a journal abbreviation list from JabRef to replace the abbreviated names.
abbreviation;full name
. Replacement is case insensitive. You can find such lists at https://abbrv.jabref.org/journals/edit make sure "run as async function" is checked
const unabbr = `
J. Phys. Appl. Phys.;Journal of Applied Physics
`.split('\n')
.filter(t => t.includes(';'))
.reduce((acc, t) => {
const [abbr, full] = t.split(';')
acc[abbr.toLowerCase()] = full
return acc
}, {})
const status = { errors: [] }
for (const item of await Zotero.Items.getAll(Zotero.Libraries.userLibraryID)) {
try {
const abbr = item.getField('publicationTitle').toLowerCase()
const title = unabbr[abbr]
if (title) {
item.setField('publicationTitle', title)
await item.saveTx()
status[abbr] = (status[abbr] || 0) + 1
}
} catch (err) {
status.errors.push(err.message)
}
}
return status
Also thanks for letting me know about the coming import feature, I have several colleagues who will probably be migrating their JabRef databases to Zotero in the near future, so such a feature would be very desirable. That definitely is the right approach to have correct Zotero data in the end.
edit: I think it's important to understand I do not speak for the Zotero team in any way, shape or form. When I say I'm looking into the unabbr functionality (which I'm experimenting with, not promising outright), I mean that I'm doing so in BBT. This would never make it into the Zotero BibTeX importer for good reason; extra complexity and potentially bloat for something that can easily be done pre-import by JabRef.
I've found JabRef to be harder and harder to get running on MacOS/Linux because Java is, as far as I can tell, a hot mess of incompatible versions (JabRef is blameless here), so I still see value in implementing this.
Your right that Zotero should probably not be overloaded with functionalities (though an update metadata from DOI will be very helpful in this context and also in other cases, see e.g. https://forums.zotero.org/discussion/72336/feature-request-update-or-force-recheck-of-metadata).
One advantage of JabRef is its vast range of functionalities. So, as BBT adds some of these extra functionalities for people coming from the BibTeX side, I would find it good to handle journal abbreviations there. See the related BBT-GitHub issue: https://github.com/retorquere/zotero-better-bibtex/issues/1436
Update from DOI does seem valuable, but I'm not involved in the effort to make that come about; I can't comment on it.
(I'm retorquere on github BTW)