CSL is ok but the style doesn't applies

Bonjour

Je rencontre un problème suite à l'édition d'un style, et je n'ai pas trouvé de topic correspondant.

J'ai édité un style existant en utilisant l'éditeur de style dans le panneau Zotero, l'aperçu est ok. J'ai ensuite enregistré le style modifié puis je l'ai passé dans CSL Validator, tout est bon. Je l'ai téléchargé dans Zotero, ça marche. Mais lorsque j'insère une citation, les modifications apportées ne s'appliquent pas.

Je me trouve un peu démunie, je remercie d'avance les personnes qui voudront bien essayer de m'aider.
  • Have you changed style title and ID? And have you tested in a completely new document?
  • Hi Adam

    Thank you very much for your reply.
    I did change the style title and ID. I tried on a completely new document as you suggested and it worked! So it means the style is ok, right?
    But do you have an idea why it doesn't work on my current document? Cause I already have 600 pages haha
  • edited November 28, 2022
    Have you tried switching to a completely different style? And if that works, (back) to your style?
  • Yes I've already tried, doesn't work
  • meaning that it also won't switch to a different style?
  • Oh Dear Adam, I'm use Zotero for 4 days now, I got ok with the CSL and stuff, so my head is either full.. or totally empied... And you just remind me the fun-damental click on "Document preferences"! I've been stubbornly clicking on Zotero Preferences for hours..
    Thank you very very much because you helped me while losing your time, I don't know how to say it : )
  • Hi,

    I'm inexperienced in coding but I succeeded in making a few satisfying editing and it's quite thrilling. Not sure it's worth opening a new discussion for the problem I face so I post it here.

    I want the title collection to appear in the references (note and bibliography), I fixed a messed up entry (the macro nam="collection" part) and it works in Zotero style editor :
    <<macro name="journal-volume">












    >

    So I saved the edited style. But when I want to load it again on Zotero to use it, I'm told the style is not valid. CSL Validator found 2 errors :
    1. macro name="collection" is an Unknown unnamespaced element “macro” not allowed.
    2. unexpected characters after document end (found “<”) line 12.

    Any help would be much appreciated
  • Sorry I thought I got how to post code parts, but I do not obviously
  • <code>asdf</code>

  • <macro name="journal-volume">
    <choose>
    <if type="article-journal">
    <group delimiter="&#160;">
    <number variable="volume"/>
    <number variable="issue" prefix="n°" suffix=","/>
    <macro name="collection">
    <group delimiter=" ">
    <text variable="collection-title" font-style="italic"/>
    <text variable="collection-number" font-style="italic"/>
    </group>
    </macro>
    </group>
    </if>
  • thank you very much @damnation
  • You can't put a macro in a macro.

    Take the collection macro that you created, i.e.

    <macro name="collection">
    <group delimiter=" ">
    <text variable="collection-title" font-style="italic"/>
    <text variable="collection-number" font-style="italic"/>
    </group>
    </macro>

    and place it somewhere outside any existing macros (i.e. right after any instance of </macro> -- the order of macros in the style doesn't matter, so it really can be anywhere).

    Then, within the journal-volume macro you have above, use
    <text macro="collection"/> of that code.
  • Thank you for your help, it works perfectly.

    I quite assumed that a macro can't be put in a macro, but it was the only combination that worked in Zotero style editor.

    And I see your name on almost every thread I've read so far, and not only here. Be sure candles are lit for you around the world hehe!
Sign In or Register to comment.