Problems in using a custom abbreviations.json without *-word categories
Hi,
I just discovered the possibility of using a custom abbreviations.json file when enabling the MEDLINE option, what I find very niceānot least because it can be used to abbreviate collection titles too.
I have one single problem. Some (a lot of?) journals ask to keep as they are titles that are not included in the abbreviation list they provide. However, in this case, the function getAbbreviation (https://github.com/zotero/zotero/blob/98a75931b04759dc8ca31a565a8a36a2784bca07/chrome/content/zotero/xpcom/cite.js#L496) takes a normalized form of the title (lowercase and without "and", "y", "le", "la", etc.), sees that there is no corresponding abbreviation, splits the normalized title into words and, as there is no "*-word" category, returns them capitalized. As a result, a title like "Revue de l'histoire des religions" is rendered as "Revue De Histoire Des Religions" in the bibliography.
Generally speaking, if there is neither an abbreviation provided in the JSON file nor a set of instructions to automatically abbreviate titles for which no abbreviation is explicitly provided, it seems more sensible to me to use the title as it is registered in the bibliography. Would it be possible to implement this? For this it could be enough to write after line 520 "if(!abbreviationCategories[category+"-word"]) return;"
I just discovered the possibility of using a custom abbreviations.json file when enabling the MEDLINE option, what I find very niceānot least because it can be used to abbreviate collection titles too.
I have one single problem. Some (a lot of?) journals ask to keep as they are titles that are not included in the abbreviation list they provide. However, in this case, the function getAbbreviation (https://github.com/zotero/zotero/blob/98a75931b04759dc8ca31a565a8a36a2784bca07/chrome/content/zotero/xpcom/cite.js#L496) takes a normalized form of the title (lowercase and without "and", "y", "le", "la", etc.), sees that there is no corresponding abbreviation, splits the normalized title into words and, as there is no "*-word" category, returns them capitalized. As a result, a title like "Revue de l'histoire des religions" is rendered as "Revue De Histoire Des Religions" in the bibliography.
Generally speaking, if there is neither an abbreviation provided in the JSON file nor a set of instructions to automatically abbreviate titles for which no abbreviation is explicitly provided, it seems more sensible to me to use the title as it is registered in the bibliography. Would it be possible to implement this? For this it could be enough to write after line 520 "if(!abbreviationCategories[category+"-word"]) return;"
It'd be nice to allow for custom (including CSL-supplied) lists more prominently and this would probably be necessary to make those work properly.
@dstillman would you take a PR?
I think that more people could use this mechanism if it were better documented: for the while, there are only some hints in the forum and one has to dive into the source code to understand how precisely the normalization mechanism works.
I plan to write a tutorial about it in the next days or weeks for a guide I am preparing. Do you think that it would be a good idea to post it on the forum (or everywhere else)?