Help on Zotero Reference Test pane error
Hi everybody,
I have tried for the first time to write a style from scratch (for the French Communication & management journal).
When importing it to Zotero, I no longer get the "this is not a valid style" message but I get this :
Error generating citations and bibliography:
TypeError: CSL.Util.Dates[this.strings.name][myform] is not a function
Would you be able to tell me what it means please ?
Thank you !
I have tried for the first time to write a style from scratch (for the French Communication & management journal).
When importing it to Zotero, I no longer get the "this is not a valid style" message but I get this :
Error generating citations and bibliography:
TypeError: CSL.Util.Dates[this.strings.name][myform] is not a function
Would you be able to tell me what it means please ?
Thank you !
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
Upgrade Storage
Thank you for your suggestion about gist, I had wondered how to share my style, without looking for an answer.
In the meanwhile, I have found my problem anyway, I had misunderstood how to use the "limit-day-ordinals-to-day-1" option.
Now I have two other problems but I think they don't have any solution at the moment :
- for chapter items, the journal wants us to indicate the number of pages and not what pages in the book the chapter occupies. But the field doesn't exist in Zotero so I can't retrieve it (except maybe with a formula that would calculate it from the pages field, is it possible ?)
- when used directly as a variable in the bibliography part, the "editor" field in chapter items is considered to be empty even when it is not, I don't understand why. This is not really a problem though since creating a specific macro (also using the "editor" varibale) does the job.
For the editor problem, I don't really understand what the problem is. If you could give an example of the expected and actual output, and share the style, I might be able to help.
https://gist.github.com/anonymous/b8a8ce890cb72be9a781
The "C&Mok" is the one that works. The "C&Mnotok" is the one with the editor problem.
In the first one I have the macro :
<macro name="editor">
<names variable="editor">
<name form="long" and="text" delimiter-precedes-last="never" sort-separator=" "/>
<label form="short" prefix=" (" suffix=")"/>
</names>
</macro>
And then in the bibliography part, for the chapter items I have :
<group delimiter=" ">
<text term="in"/>
<text macro="editor"/>
</group>
And it gets what I want :
Pierre-Michel Menger, « Culture », in Emmanuel de Waresquiel (dir.), Dictionnaire des politiques culturelles de la France depuis 1959, Larousse, Editions du CNRS, 2001, 672 page.
In the second one I don't have the editor macro so I use directly the variable in the bibliography, for the chapter items :
<group delimiter=" ">
<text term="in"/>
<text variable="editor"/>
</group>
I also wanted to add a label line inside the group :
<label variable="editor" form="short" prefix="(" suffix=")"/>
But I get an error :
Error generating citations and bibliography:
TypeError: num.split is not a function
Without it I get the following reference, in which the editor group doesn't appear, as if the field was empty (which it is not) :
Pierre-Michel Menger, « Culture », Dictionnaire des politiques culturelles de la France depuis 1959, Larousse, Editions du CNRS, 2001, 672 page.
I don't understand what my mistake is.
It is said in the thread that it can be easily calculated from the pages range.
I had thought about this solution but it doesn't seem that easy to me. Do you know where I can find instructions ?
Thank you for your help anyway.
<names/>element, not<text/>. Basically you need the contents of the "editor" macro. The instructions are to mention the number of pages of the cited chapter? Do they give an example? I don't think I've seen that requirement before.