Adding citation style

I couldn't find Health Education Research as a citation style. So, I created it in a CSL file. I saved that file to my desktop and tried to drop the file into the open Firefox window. I didn't get anything asking me to install it. In fact, for some reason the url changes to the file pathway. Nothing opens. The page is completely blank.

I've also tried going through the actions>preferences>styles>get additional styles+, but I get an error saying it isn't a valid style.

Ideas?
  • You need to drag the style onto the Zotero pane, not just a Firefox window. Run your modified style through http://validator.citationstyles.org/ to get more detailed error messages.
  • You need to drag the style onto the Zotero pane, not just a Firefox window.
    No, any Firefox Window will work. Dragging to Zotero will actually attach the style to an item.
    I'm guessing you may have had Standalone running at the same time, in which case dragging to Firefox doesn't work.
  • I'm still struggling.

    The validator says there is a premature end of file (found “[EOF]”)error, but there isn't any information on this.

    The firefox zotero pane has three areas. If I drag it to the pane(s), it just adds the file like it would a typical citation. Can that be right? None of the other citation styles show that way.

    Thanks!
  • edited August 18, 2015
    The validator says there is a premature end of file (found “[EOF]”)error, but there isn't any information on this.
    That means you forgot to close an XML tag somewhere. If you want to post it to https://gist.github.com/ we can take a look.
    The firefox zotero pane has three areas. If I drag it to the pane(s), it just adds the file like it would a typical citation. Can that be right? None of the other citation styles show that way.
    adamsmith is right. I misspoke. (but your style has to be valid for any of this to really work).
  • put the style on gist.github.com, create a public gist, link to it from here and we'll take a look. Could you have saved the file the wrong way? If you use the save function of Firefox for the test panel (rather then the save button on the test pane itself) it'll save the entire page and that obviously won't work.


    On installing the style, Aurimas wrote too quickly, that wasn't right. Dragging to FF should work, but if it doesn't just go through the style manager under Cite in the preferences for now.
  • Thanks so much for the help. I'm not sure I'm doing the gist.github.com correctly.

    https://gist.github.com/sareis01/57e2bbb1033468b70082

    I did try the cite under preferences way, but I got the error. Very odd. I thought I had used this version on a different computer before. Could this be because my computer is running Windows 8?

    Thanks again for your help!
  • Sorry if that wasn't clear, but we want you to post the contents of the CSL style you created.
  • i.e. open with a text editor select all, copy& paste into the window on gist.github.com
  • OK. Thanks again for the help, but I don't have any program available on this computer that allows me to view the contents of the file. I'll try again tomorrow when I get to work. Thanks!
  • every computer does: notepad on Windows, TextEdit on Mac, and if you're on linux you probably know your go-to text editor.
  • edited August 19, 2015
    OK. So, my work computer has absolutely no problem dragging and dropping the csl file into Firefox. I tested the citation style and it works. However, when I try to replicate the same on my laptop (uses Windows 8) it doesn't work. Is this maybe a plug in isssue?

    Here is the code, but honestly, I have no idea what any of this even means. Thanks for your help!

    <?xml version="1.0" encoding="utf-8"?>
    <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US" page-range-format="minimal">
    <!-- This style was edited with the Visual CSL Editor (http://editor.citationstyles.org/visualEditor/) -->
    <info>
    <title>health education research</title>
    <id>http://www.zotero.org/styles/health-education-research</id>;
    <link href="http://www.zotero.org/styles/health-education-research" rel="self"/>
    <link href="http://www.zotero.org/styles/cell-research" rel="template"/>
    <link href="http://onlinelibrary.wiley.com/journal/10.1111/(ISSN)1365-2796/homepage/ForAuthors.html" rel="documentation"/>
    <category citation-format="numeric"/>
    <category field="medicine"/>
    <issn>0954-6820</issn>
    <eissn>1365-2796</eissn>
    <updated>2015-08-03T18:09:00+00:00</updated>
    <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
    </info>
    <macro name="editor">
    <names variable="editor">
    <name name-as-sort-order="all" sort-separator=" " initialize-with="" delimiter=", " delimiter-precedes-last="always"/>
    <label form="short" prefix=", "/>
    </names>
    </macro>
    <macro name="anon">
    <text term="anonymous" form="short" text-case="capitalize-first" strip-periods="true"/>
    </macro>
    <macro name="author">
    <group suffix=".">
    <names variable="author">
    <name delimiter-precedes-last="always" et-al-min="3" et-al-use-first="3" initialize-with="" name-as-sort-order="all" sort-separator=" "/>
    <et-al font-style="normal"/>
    <label form="short" prefix=" " strip-periods="true"/>
    <substitute>
    <names variable="editor"/>
    <text macro="anon"/>
    </substitute>
    </names>
    </group>
    </macro>
    <macro name="title">
    <choose>
    <if type="bill book graphic legal_case motion_picture report song" match="any">
    <text variable="title" font-style="italic"/>
    </if>
    <else>
    <text variable="title"/>
    </else>
    </choose>
    </macro>
    <macro name="publisher">
    <group delimiter=": ">
    <text variable="publisher-place"/>
    <text variable="publisher"/>
    </group>
    </macro>
    <macro name="edition">
    <choose>
    <if is-numeric="edition">
    <group delimiter=" ">
    <number variable="edition" form="ordinal"/>
    <text term="edition" form="short"/>
    </group>
    </if>
    <else>
    <text variable="edition" suffix="."/>
    </else>
    </choose>
    </macro>
    <citation collapse="citation-number">
    <sort>
    <key variable="citation-number"/>
    </sort>
    <layout delimiter="," prefix="[" suffix="]">
    <text variable="citation-number"/>
    </layout>
    </citation>
    <bibliography hanging-indent="false" et-al-min="7" et-al-use-first="3">
    <layout>
    <text variable="citation-number" suffix=". "/>
    <text macro="author"/>
    <text macro="title" prefix=" " suffix="."/>
    <choose>
    <if type="bill book graphic legal_case motion_picture report song" match="any">
    <group suffix="." prefix=" " delimiter=" ">
    <text macro="edition"/>
    <text macro="editor" prefix="(" suffix=")"/>
    </group>
    <text prefix=" " macro="publisher"/>
    <group suffix="." prefix="; ">
    <date variable="issued">
    <date-part name="year"/>
    </date>
    <text variable="page" prefix=":"/>
    </group>
    </if>
    <else-if type="chapter paper-conference" match="any">
    <group prefix=" ">
    <text term="in" text-case="capitalize-first" suffix=": "/>
    <text macro="editor"/>
    <text variable="container-title" font-style="italic" prefix=" " suffix="."/>
    <text variable="volume" prefix="Vol " suffix="."/>
    <text macro="edition" prefix=" "/>
    <text variable="collection-title" prefix=" " suffix="."/>
    <group suffix=".">
    <text macro="publisher" prefix=" "/>
    <group prefix=". ">
    <date variable="issued">
    <date-part name="year"/>
    </date>
    <text variable="page" prefix="; "/>
    </group>
    </group>
    </group>
    </else-if>
    <else-if type="article-newspaper">
    <text variable="container-title" font-style="italic" prefix=" " suffix=". "/>
    <choose>
    <if variable="URL">
    <group delimiter=". " suffix=".">
    <text variable="URL"/>
    <group prefix="Published ">
    <date variable="issued">
    <date-part name="month" suffix=" "/>
    <date-part name="day" suffix=", "/>
    <date-part name="year"/>
    </date>
    </group>
    <group>
    <text term="accessed" text-case="capitalize-first" suffix=" "/>
    <date variable="accessed">
    <date-part name="month" suffix=" "/>
    <date-part name="day" suffix=", "/>
    <date-part name="year"/>
    </date>
    </group>
    </group>
    </if>
    <else>
    <group delimiter=":" suffix=".">
    <group>
    <date variable="issued">
    <date-part name="month" suffix=" "/>
    <date-part name="day" suffix=", "/>
    <date-part name="year"/>
    </date>
    </group>
    <text variable="page"/>
    </group>
    </else>
    </choose>
    </else-if>
    <else>
    <text macro="editor" prefix=" " suffix="."/>
    <group prefix=" " suffix=".">
    <text variable="container-title" font-style="italic" form="short" strip-periods="true"/>
    <group delimiter="; " prefix=" ">
    <date variable="issued">
    <date-part name="year"/>
    </date>
    <text variable="volume" font-weight="bold"/>
    </group>
    <text variable="page" prefix=": "/>
    </group>
    </else>
    </choose>
    </layout>
    </bibliography>
    </style>
  • Instead of posting here or to gist.github.com, could you put the file that is not working on Dropbox or something similar and share a link to it here?
  • See if this works.I just find it very odd that this file totally works on my work computer but not on my laptop.

    https://www.dropbox.com/sh/q7e5xnwf4ip9vtw/AACGRIgdgJMGNy58Kr9_aCJDa?dl=0
  • And which Zotero version -- both version number and Firefox add-on vs. Standalone do you have on your Windows 8 machine?
  • Rintze, that worked! You all are amazing!!!
    Thanks so much!

    Just for future reference...what was I doing wrong? I'm just puzzled since it worked on one machine and not the other.

    adamsmith, the Zotero is through Firefox and 4.0.28.1 - I'm not sure how to find the add-on info.

    Thanks a million!
  • I just downloaded your style from Dropbox and saved it as a Gist at https://gist.github.com/. That my version works might indicate a problem with how you originally saved the file. Not sure, though.
Sign In or Register to comment.