You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by MemeAddict314 May 7, 2024
Hi! I'm trying to format my citekeys but having issues with ternaries. I'm trying to make the citekey for encyclopedias (specifically Wikipedia) appear different from everything else. My current citekey looks like this: type(encyclopediaArticle) ? (shorttitle.capitalize + EncyclopediaTitle.capitalize) : (authEtAl.capitalize + year)
It works right for most things, but for some reason it adds journal abbreviations in front of the title on some items. Right now I have these citekeys in these kinds of formats outputted by my citekey:
Encyclopedia Name + Shorttitle (correct)
Author + Year (wrong with encyclopedias, right for other sources)
I've tried a bunch of different options, and I can't find documentation for what I'm looking for. What I'd like to happen would be something like:
If item is (from Wikipedia or an encyclopedia)
Then EncyclopediaTitle.capitalize + shorttitle.capitalize
Else authEtAl.capitalize + year
I don't want the journal name, journal abbreviation, or publication name in the citekey. I want the name of the encyclopedia then the short title only for encyclopedia entries. I'm mainly focused on Wikipedia articles being cited and saved, but I'd prefer if the citekey worked on all encyclopedias. Thank you for any help you can give!
The text was updated successfully, but these errors were encountered:
retorquere
changed the title
Custom Citation Key Help
$type discards the input on success, which breaks ternaries
May 7, 2024
Discussed in #2868
Originally posted by MemeAddict314 May 7, 2024
Hi! I'm trying to format my citekeys but having issues with ternaries. I'm trying to make the citekey for encyclopedias (specifically Wikipedia) appear different from everything else. My current citekey looks like this:
type(encyclopediaArticle) ? (shorttitle.capitalize + EncyclopediaTitle.capitalize) : (authEtAl.capitalize + year)
It works right for most things, but for some reason it adds journal abbreviations in front of the title on some items. Right now I have these citekeys in these kinds of formats outputted by my citekey:
Encyclopedia Name + Shorttitle
(correct)Author + Year
(wrong with encyclopedias, right for other sources)Journal Abbreviation/Publication + Shorttitle
(very wrong)I've tried a bunch of different options, and I can't find documentation for what I'm looking for. What I'd like to happen would be something like:
I don't want the journal name, journal abbreviation, or publication name in the citekey. I want the name of the encyclopedia then the short title only for encyclopedia entries. I'm mainly focused on Wikipedia articles being cited and saved, but I'd prefer if the citekey worked on all encyclopedias. Thank you for any help you can give!
The text was updated successfully, but these errors were encountered: