Custom reference style help

Hi there, our group made a customized reference style and we want it to list references in the bibliography numerically (in the order that they are refereed in the document) and display those numbers as superscript values within the document. However, it is currently listing the references in alphabetical order the bibliography and assigning the references in the document with the corresponding numerical value. For example, the very first reference in our document has an author with the last name beginning with "W", and instead of showing the reference within the document as a superscript "1", it shows a superscript "30" due to it's alphabetical order in the bibliography. When I open the "style editor" for the customized style, I have no idea how to fix this...any help would be appreciated!

Thanks.
  • Copy the style code, post it to pastebin.com, hastebin.com or a similar site and provide the link here so we can take a look.
    (The place to look is the sort section for the bibliography, which for your purposes you should simply delete completely)
  • yeah, so simply delete this:
    <sort>
    <key macro="author"/>
    <key variable="author" sort="ascending"/>
    </sort>


    I'd also guess that you'll want to replace hanging-indent="true" with second-field-align="flush" right above that
  • Thank you so much, I appreciate the fast response and fix. When I tried to make your second edit, it did not work so I left it as is. Thanks again!
  • I've got another quick fix I need help with: https://hastebin.com/mihotejisa.xml

    Currently the output for a reference looks like this: "Araki A et al. (2014). Phosphorus flame retardants in indoor dust and their relation to asthma and allergies of inhabitants. Indoor Air. 24:pp 3–15. doi: 10.1111/ina.12054."

    I need the volume, issue and page numbers to show as: "24(1):3-15.":

    Can anyone change the coding to change the format? Thank you!
  • edited November 6, 2020
    This
    <group delimiter=":">
    <text variable="volume" suffix=":"/>
    <text variable="page" prefix="pp " suffix="."/>
    </group>


    Needs to be
    <group delimiter=":">
    <group>
    <text variable="volume"/>
    <text variable="issue" prefix="(" suffix=")"/>
    </group>
    <text variable="page" suffix="."/>
    </group>


  • Thank you so much, that worked.

    I have one other Style version here: https://hastebin.com/afoqatoqef.xml

    I want the same thing for this style, but it appears it is already written that way? However, it doesn't display correctly...once again, thank you so much for your help!
  • how are you testing? This looks right -- make sure that you change ID and title for different styles
  • My issue seemed to stem from using the Zotero Style editor...once I began editing the code outside of Zotero, my issues went away. Once again, thank you so much for these quick responses!
  • Alright, hi there again, I have a few more issues that I need help in sorting out.

    1) "Since et al. is plural, it should always be a substitute for more than one name. In the case that et al. would stand in for just one author, write the author’s name instead." So, when there are two authors, we need both names shown. When there are three or more authors, we want to use "et al.". Also, when there is the same first author published in the same year, we need the "a, b, c..." notation to function correctly.

    2) When there are multiple citations with the same first author (ex. U.S. EPA 2020, 2018, 2016, etc.), we want them organized in the bibliography by date (most recent first; this only needs to be true for the "Regular" style). Currently, we can't tell how they are ordered, they appear random and are not sorted by date.

    Here is the link to our "Regular" style: https://hastebin.com/zoqepeyuxe.xml

    Here is the link to our "Numerical" style: https://hastebin.com/gicogatiqe.xml

    These two styles should be identical, except that "Numerical" displays citations as superscript numbers in the text body (vs. "Author, year") and that it organizes the bibliography in number order (vs. alphabetically).

    I clearly have zero coding skills, so if you can help me make these changes + any other errors you might see in our code, that would be awesome!
  • 1. The Regular style should already do a/b/c and use et al for 3+ authors in text. If you also want et al in the bibliography take
    <bibliography hanging-indent="true">
    change to
    <bibliography hanging-indent="true" et-al-min="3" et-al-use-first="1">

    Ditto for Numerical

    2. Find
    <sort>
    <key macro="author"/>
    <key variable="author" sort="ascending"/>
    </sort>


    change to

    <sort>
    <key macro="author"/>
    <key variable="issued"/>
    </sort>
  • Since et al. is plural, it should always be a substitute for more than one name. In the case that et al. would stand in for just one author, write the author’s name instead.
    Just to note that this isn’t strictly correct. “Et al.” is not necessarily plural. It could be short for “et alia” (“and others”, plural), but it could also be short for “et alius” (“and another”, single).
  • Okay, thanks for the help. But we are still having issues with the a/b/c formatting. For example, the style is generating:

    "Liu and Mejia Avendaño 2013a"
    "Liu et al. 2013b"

    Since there isn't another "Liu et al. 2013", we don't think that the a/b notation should be applied, and it should just be:

    "Liu and Mejia Avendaño 2013"
    "Liu et al. 2013"

    Thoughts?

  • That's the et-al-subsequent-min="2" et-al-subsequent-use-first="1" you have in several places in the style (the one that matters I think is the one all the way up top under style):

    Since that tells the style to abbreviate citations to first author et al. starting with _2_ authors on subsequent citations, your example would actually start being ambiguous as soon as you add a second citation to either of these. Remove it.
Sign In or Register to comment.