Zotero 8: Can't add custom Vancouver style

dstillman Zotero Team
edited 15 days ago
This discussion was created from comments split from: Announcing Zotero 8.
  • In December 2024, based on a citation style listed in Zotero 7 as French Vancouver, I developed a variant for a group of French-speaking organisations in the public health sector. When Zotero 8 was installed, not only did the list of styles become very limited, but the tool I had built no longer worked. Is this style restriction temporary? If so, when will it be possible to add pre-existing styles, including Vancouver, to the list? If not, what line of code would allow the style developed to be updated to work with Zotero 8? Thank you for your help.
    As you plan to release updates more frequently, how will you address future malfunctions with individual developments, which are likely to become more frequent? In any case, the improvements made to this bibliographic tool in recent years have been remarkable, and I am finding it increasingly easy to encourage researchers to adopt it for collaborative use. Congratulations.
  • dstillman Zotero Team
    edited 15 days ago
    This seems like some sort of misunderstanding. (Always better to just explain the actual problem you're experiencing instead of making assumptions about what changed.)

    The official Vancouver styles were renamed by the CSL project, but there's obviously no "restriction" on the installation of custom styles.

    Can you explain exactly what you're trying to do and what's happening?
  • Thank you for your prompt reply, which did not seek to question the development work carried out by the community. However, I can no longer use the bibliographic style (.csl) that I had developed from a French-language Vancouver format. Importing the file from my workstation does not work. At the time, I admit that I did not push my development far enough to make it recognisable as unique by correcting it in depth. And now I am very reluctant to have to start from scratch with another style. I am simply looking for advice.
  • If you share the code via pastebin.com or similar we can tell you how to make it work.
  • Thank you very much for your proposal. Here is the link to the ‘beginner level’ file.
    https://gist.github.com/patricialafont-hue/1c78354f9155f90c85461805b36d191c
  • edited 8 days ago
    Lines 6 and 7 add "-ors" after the "...vancouver" so the style ID is unique. Like that your style would've been overwritten by the original vancouver.csl . (I'm aware the naming changed recently, but safe is safe)

    Delete lines 89+95 completely. It's an empty group that does nothing and an empty macro. You'll also need to delete any calls of that macro (lines ~180, 200, 208, 287)

    Delete line 146 (if variable=URL). You cannot have 2 IFs in a conditional

    ~Line 171 you have an empty else: <else/>. Delete that also.

    use https://validator.citationstyles.org/ to verify all is good.
  • Thank you for your helpful assistance. Thank you also for your kindness in regard to my lack of experience. The file works thanks to your advice, and I will endeavour to use the style validator, as I should have done with the previous file. All the best.
  • In order to finalise the Vancouver-ORS style that I have developed, perfected thanks to you and validated by the application, I would like to know what additions would be necessary for the publication dates to appear in the language entered (no translation into French for Anglo-Saxon journals) and when the publication date covers two months – for example, November-December 2025 – for these two months to appear in the bibliographic record.
    Many thanks to you.
    Link to the file : https://gist.github.com/patricialafont-hue/c04ccf4fc48f5c84fcfce377c11690cf
  • I don't fully understand your "publication dates to appear in the language entered", but I don't think what you want is possible. CSL currently cannot do anything with the "language" field and modify citations based on that. But please explain with an example.

    Date ranges need to be input into the extra field. See https://forums.zotero.org/discussion/comment/448642/#Comment_448642
  • Thank you for your feedback.
Sign In or Register to comment.