Problem with class number csl style

I have imported the style http://xbiblio.svn.sourceforge.net/viewvc/xbiblio/csl/styles/nucleic_acids_res.csl?revision=270&view=markup which uses the class number into Zotero. I planned to use it as a base for my own style. However, the style doesn't work. When exporting a bibliography as html it's not numbered, and when using the OOo plugin citations are empty brackets and the bibliography is not numbered (there are other issues also).

Is the problem me, the csl, or zotero?

Thanks,
Peter
  • Both the CSL and Zotero. There is a new version of the CSL schema, although there is not yet a CSL for Nucleic Acids Research that conforms to this new schema. We do not plan to expand support for the old version of the schema to handle numbered citations. Zotero's support for the new schema, while not yet complete, includes the features necessary for handling numbered citations.
  • OK, I have tried to read the new schema and I came up with something like

    <citation delimiter=", " prefix="[" suffix="]">
    <option name="collapse" value="citation-number"/>
    <layout>
    <item>
    <text variable="citation-number"/>
    </item>
    </layout>
    </citation>

    but it's still not working. I have tried several variants of the above but OOo always gives me two empty brackets. It seems I'm not alone http://forums.zotero.org/discussion/1124/problem-with-formating-numbered-reference-lists/#Item_0
    http://forums.zotero.org/discussion/1181/which-csl-schema-will-be-supported-in-zotero-10/#Item_0
    so a working example would be greatly appreciated.
  • Off the top of my head (but should validate):

    <citation>
    <option name="collapse" value="citation-number"/>
    <layout delimiter=", " prefix="[" suffix="]">
    <text variable="citation-number"/>
    </layout>
    </citation>

    At the moment, we don't support the "collapse" option, but I will be committing a patch to handle it to SVN shortly, and it should be in 1.0. rc3 and earlier will simply ignore it.

    If that still doesn't work, make sure your CSL validates against the schema (using a validator that supports Relax NG compact schema, e.g, oXygen [commercial] or rnv [free]). In particular, make sure you have no <defaults> section. The new CSL schema does not support this tag, and if you have this tag, it will trigger the old CSL engine. For an example of the new schema, see the APA CSL.
  • Simon, this validates OK. Is the collapsing according to the new schema implemented in zotero?
    I am using the latest development snapshot of zotero (1.0.0rc4.r1677) and it doesn't seem to work.
  • edited September 5, 2007
    That's because I haven't committed the patch yet ;-). But, look for it to work in a couple of days.
  • Can't wait;) I am almost done writing a paper and I would love to use zotero do the references.
  • I have managed to create a working example, which is an update of the Nucleic Acids Research style. It works in RC3, but generates an error in the devel.xpi when exporting to html. Any ideas why?

    Also, when using the OOo plugin, the citation numbers are not updated when a new citation is inserted before a previous citation.


    <style xmlns="http://purl.org/net/xbiblio/csl"; class="in-text" xml:lang="en">
    <info>
    <title>Nucleic Acids Research</title>
    <id>http://purl.org/net/xbiblio/csl/styles/nucleic_acids_res.csl</id>;
    <link>http://purl.org/net/xbiblio/csl/styles/nucleic_acids_res.csl</link>;
    <author>
    <name>Bruce D?Arcus</name>
    <email>bdarcus@sourceforge.net</email>
    </author>
    <contributor>
    <name>Johan Kool</name>
    <email>johankool@users.sourceforge.net</email>
    </contributor>
    <contributor>
    <name>Peter Hedlund</name>
    </contributor>
    <category term="chemistry"/>
    <updated>2007-09-07T15:06:00+05:00</updated>
    </info>
    <macro name="mydate">
    <date variable="issued" prefix=" (" suffix=") ">
    <date-part name="year"/>
    </date>
    </macro>
    <macro name="author">
    <names variable="author">
    <name name-as-sort-order="all" and="text" sort-separator="," initialize-with="." delimiter=", " delimiter-precedes-last="never"/>
    </names>
    </macro>
    <macro name="myeditor">
    <text term="in" text-transform="capitalize" suffix=" "/>
    <names variable="editor">
    <name name-as-sort-order="all" and="text" sort-separator="," initialize-with="." delimiter=", " delimiter-precedes-last="never"/>
    <label form="short" prefix=" (" suffix=".)"/>
    </names>
    </macro>
    <macro name="publisher">
    <group delimiter=", ">
    <text variable="publisher"/>
    <text variable="publisher-place"/>
    </group>
    </macro>
    <citation>
    <option name="collapse" value="citation-number"/>
    <sort>
    <key variable="citation-number"/>
    </sort>
    <layout delimiter="," prefix="(" suffix=")">
    <text variable="citation-number"/>
    </layout>
    </citation>
    <bibliography>
    <option name="hanging-indent" value="true"/>
    <option name="et-al-min" value="100"/>
    <option name="et-al-use-first" value="100"/>
    <option name="second-field-align" value="true"/>
    <sort>
    <key variable="citation-number"/>
    </sort>
    <layout>
    <text variable="citation-number" suffix=". "/>
    <choose>
    <if type="book">
    <text macro="author"/>
    <text macro="mydate"/>
    <text variable="title" suffix=". " font-style="italic"/>
    <text macro="publisher" suffix="."/>
    </if>
    <else-if type="chapter">
    <text macro="author"/>
    <text macro="mydate"/>
    <text variable="title" suffix=". "/>
    <text macro="myeditor"/>
    <text variable="container-title" font-style="italic" prefix=" " suffix=","/>
    <text macro="publisher" prefix=" " suffix=", "/>
    <label variable="page" form="short" suffix=". "/>
    <text variable="page" suffix="."/>
    </else-if>
    <else>
    <text macro="author"/>
    <text macro="mydate"/>
    <text variable="title" suffix=". "/>
    <text variable="container-title" suffix=", " font-style="italic"/>
    <text variable="volume" font-weight="bold"/>
    <text variable="page" prefix=", " suffix="."/>
    </else>
    </choose>
    </layout>
    </bibliography>
    </style>
Sign In or Register to comment.