How to migrate custom styles from URL/Mendeley

Hi there - I'm in the process of migrating many libraries to Zotero from Mendeley and each group has their own custom style they prefer. My question is, how can I take the style information located via URL, which is how Mendeley prefers the input, (such as https://csl.mendeley.com/styles/535553551/apa) and turn that into a csl file that I can then install in Zotero? I've done a decent amount of searching to find a solution and am finally giving in to ask you directly. Thanks a lot!
  • To turn this into a CSL, you just need to download it (e.g. using right-click--> save link as on the link) and add a .csl extension.

    Zotero doesn't like the csl.mendeley links as style IDs, though,* so you need to open the file in a text editor and replace that with something else -- it doesn't need to be a URL that actually exists, but could e.g. be <id>http://zotero.org/styles/535553551</id> or something more meaningful after the last slash -- it really doesn't matter.
    For distributing them, if you host the file on github, you can just point people at the raw link and Zotero will automatically prompt users to install it when they click the link.



    * @dstillman -- any reason for that? Fails with

    [JavaScript Error: "_styles is not iterable" {file: "chrome://zotero/content/xpcom/style.js" line: 387}]
  • Thanks for the direction and for the extra tip about Github. I followed your steps but when I installed on Zotero it gave me an error: "...is not a valid CSL 1.0.1 style file, and may not work properly with Zotero"
  • That's because it's not -- it'll likely work fine, but you can check it against the CSL validator at validator.citationstyles.org/ and you'll see a number of errors, mostly simply empty nodes that should just be deleted.
  • More broadly, what are the customizations you are applying to APA style?
  • I didn't make this custom style, so I'm in the process of figuring out what tweaks were made and am starting with APA 7th edition instead of 6th as I believe this style originally used. So far I've only found that they want the first two authors in citations rather than just the first. I believe that would mean et-al-use-first should be set to 2.
  • Yes. That would be the change. If you are working to recreate the styles, I would suggest starting from APA7 like you are doing.
  • Thanks for the support. I'm really impressed how quickly you guys respond. If I run into further issues, would the process be to add to this thread?
  • Just post back in this thread or a new one. I check in these forums several times a day and also maintain the Zotero APA style.
Sign In or Register to comment.