Help updating cls

I edited harvard-cape-peninsula-university-of-technology cls file to match the one of my university. I did this back in 2018 but nowadays it says that the file is old and may not work. I need to re-add the file everytime I open zotero cause it won't remember it. Ofc I can do that but it'd be more convenient if I just could update it. I don't know how to do that tho.
So how would I go about it?
  • Hey,

    put your code on HasteBin or PasteBin and share the link here. :)

    You will likely have not changed the ID and self link in the style (lines 5-6, I think) and therefore gets overwritten each time.
  • edited 25 days ago
    This is the code I use.
    So I'd assume it might be line 7-9 that's arguing then.
    It says that it's not a valid csl 1.0.1 templatefile and may not work with zotero.
  • edited 25 days ago
    No, as you based your code on a style from the repository this should be not about the version of the CSL.

    What language is this style supposed to be in? I think the error might stem from your default-locale you've set as "SV" which is probably not correct. If it is Swedish, put "sv-SE", if it is Salvadorian Spanish, put "es-SV".

    Using we can see where the error is and why it's not validating.
    Delete lines 56-58 and it'll validate.

    Also, as I mentioned before, you'll need to modify your line 6 + 7 with something unique.
    (and you can move the original title to line 8, so you'll remember what style you used as a template).

    So, I recommend something like below for your "info" section:

    <?xml version="1.0" encoding="utf-8"?>
    <style xmlns=""; class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="SV">
    <title>Harvard - My University Name - Faculty of XXX</title>
    <link href=""; rel="self"/>
    <link href=""; rel="template"/>
    <link href="put your URL with the style guide here" rel="documentation"/>
    <name>Lara Skelly</name>
    <category citation-format="author-date"/>
    <category field="generic-base"/>
    <summary>Put your style description here!</summary>
    <rights license="">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>

  • That did the trick! Thank you so much! This makes it so much easier for me and my fellow students to write our master thesis.
  • If the style is of a good quality and with guidelines that one can find online, you could think about uploading the style to the repository. That way your fellow students in the far future can still find the style (and it can be made better), rather just you and your few friends.
    You've done the legwork now.
Sign In or Register to comment.