in italics

et al...

how can I auto-italicise it? Can someone please explain exactly what has to be written and where to write it.

</macro>
<citation et-al-min="3" et-al-use-first="1" et-al-subsequent-min="3" et-al-subsequent-use-first="1" et-al font-style="italic" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true">
<layout prefix="(" suffix=")" delimiter="; ">
<group delimiter=", ">
<group delimiter=" ">
<text macro="author-short"/>
<text macro="year-date"/>
</group>
<group>
<label variable="locator" suffix="." form="short" strip-periods="true"/>
<text variable="locator"/>
</group>
</group>
</layout>
</citation>

Thanks
Dodgey-Damo
  • It doesn't go into the code you've posted above, but in the author-short macro. You can find pretty complete guidance here:

    http://citationstyles.org/downloads/specification.html#et-al
  • hmmmm. I had a look at the link. Its not very clear.

    <names variable="author">
    <name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with="." delimiter-precedes-last="never" delimiter=", "/>
    <label form="short" prefix=" " suffix="." text-case="lowercase" strip-periods="true"/>
    <et-al term="and others" font-style="italic"/>
    <substitute>
    <names variable="editor"/>
    <text macro="anon"/>
    </substitute>
    </names>

    I'm still getting citations such as....

    (M. Venter et al. 2011)

    Also how can I get rid of the initial "M." in the citations? Do I just delete initialize-with="."
  • A few questions:
    • What version of Zotero are you using?
    • What style are you using?
    • For revisions in a style to take effect, you need to switch to another style, then switch back. Have you tried that, and if not, does doing it cause the italics to show up?
  • I received your modified version of the harvard style by mail, thanks. What's this doing in there?
    <citation et-al-min="3" et-al-use-first="1"
    et-al-subsequent-min="3" et-al-subsequent-use-first="1"
    et-al font-style="italic"
    disambiguate-add-year-suffix="true"
    disambiguate-add-names="true"
    disambiguate-add-givenname="true">
  • edited September 28, 2011
    As I wrote above, you'll need to modify the "author-short" macro. You've modified the "author" macro instead, which is only used in the bibliography (so you'll get italic et-al there instead, not in the citations).
    <macro name="author">
    <names variable="author">
    <name name-as-sort-order="all" and="symbol" sort-separator=", "
    initialize-with="." delimiter-precedes-last="never"
    delimiter=", "/>
    <label form="short" prefix=" " suffix="."
    text-case="lowercase" strip-periods="true"/>
    <et-al term="and others" font-style="italic"/>
    <substitute>
    <names variable="editor"/>
    <text macro="anon"/>
    </substitute>
    </names>
    </macro>
  • Thanks for getting back to me so fast.

    I'm actually using Mendeley (Safari)
    The style I'm using is called emerald-harvard
    Yes I've tried switching styles.

    et-al font-style="italic" I take it that it should not be there?
  • CSL works in Mendeley as well (and they have very helpful support forums :).

    Yes, if you look through the specification, you'll see that options inside the angle braces are always (without any exceptions) written in the form some-option="some_value". So what you have written there is invalid, and probably breaks the style completely (it's probably not even being installed -- I don't know whether Mendeley issues an error message in that case, but you can find out by posting a query to the excellent Mendeley support forums).
  • Does this look correct? I still cannot get et al to italicise....

    </info>
    <macro name="editor-translator">
    <names variable="editor translator" prefix="(" suffix=")" delimiter=", ">
    <name and="text" initialize-with="" delimiter=", "/>
    <et-al font-style="italic"/>
    <label form="short" prefix=", " text-case="capitalize-first" suffix="." strip-periods="true"/>
    </names>
    </macro>
    <macro name="author">
    <names variable="author">
    <name name-as-sort-order="all" sort-separator=" " initialize-with="" delimiter=", " delimiter-precedes-last="always"/>
    <et-al font-style="italic"/>
    <label form="short" prefix=" (" suffix=".)" text-case="capitalize-first" strip-periods="true"/>
    <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
    <text macro="title"/>
    </substitute>
    </names>
    </macro>
    <macro name="author-short">
    <names variable="author">
    <name form="short" and="text" delimiter=", " initialize-with=". "/>
    <et-al font-style="italic"/>
    <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
    <choose>
    <if type="bill book graphic legal_case motion_picture report song" match="any">
    <text variable="title" form="short" font-style="italic"/>
    </if>
    <else>
    <text variable="title" form="short" quotes="true"/>
    </else>
    </choose>
    </substitute>
    </names>
    </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"/>
    <text variable="publisher-place"/>
    </group>
    </macro>
    <citation collapse="year-suffix" et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true">
    <sort>
    <key variable="issued"/>
    <key variable="author"/>
    </sort>
    <layout prefix="(" suffix=")" delimiter="; ">
    <group delimiter=" ">
    <text macro="author-short"/>
    <date variable="issued">
    <date-part name="year"/>
    </date>
    <group>
    <label variable="locator" suffix="." form="short" strip-periods="true"/>
    <text variable="locator" prefix=" "/>
    </group>
    </group>
    </layout>
    </citation>
    <bibliography hanging-indent="true" line-spacing="2">
    <sort>
    <key macro="author-short"/>
    <key variable="issued"/>
    </sort>
    <layout>
    <text macro="author" suffix=","/>
    <date variable="issued" prefix=" " suffix="">
    <date-part name="year"/>
    </date>
    <choose>
    <if type="bill book graphic legal_case motion_picture report song" match="any">
    <group suffix=".">
    <text macro="title" prefix=" "/>
    <text macro="editor-translator" prefix=" "/>
    </group>
    <text prefix=" " suffix="." macro="publisher"/>
    </if>
    <else-if type="chapter paper-conference" match="any">
    <text macro="title" prefix=" "/>
    <group prefix=".">
    <group prefix=" In:" suffix="">
    <names variable="editor translator">
    <name name-as-sort-order="all" sort-separator=" " initialize-with="" delimiter=", " delimiter-precedes-last="always" prefix=" "/>
    <et-al font-style="italic"/>
    <label form="short" prefix=" (" suffix=".), " text-case="capitalize-first" strip-periods="true"/>
    </names>
    <text variable="container-title" font-style="italic" prefix=" " suffix=","/>
    <text variable="collection-title" prefix=" " suffix="."/>
    <group suffix=".">
    <text macro="publisher" prefix=" "/>
    <label variable="page" form="short" prefix=", " suffix=". " strip-periods="true"/>
    <text variable="page" suffix="."/>
    </group>
    </group>
    </group>
    </else-if>
    <else>
    <group suffix=".">
    <text macro="title" prefix=" "/>
    <text macro="editor-translator" prefix=" "/>
    </group>
    <group prefix=" " suffix=".">
    <text variable="container-title" font-style="italic"/>
    <group prefix=" ">
    <text variable="volume" font-weight="bold"/>
    </group>
    <text variable="page" prefix=": "/>
    </group>
    </else>
    </choose>
    </layout>
    </bibliography>
    </style>
  • The modification you want to make will look something like this:
    <macro name="author-short">
    <names variable="author">
    <name form="short" and="symbol" delimiter=", "
    delimiter-precedes-last="never" initialize-with=". "/>
    <et-al font-style="italic"/>
    <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
    <text macro="anon"/>
    </substitute>
    </names>
    </macro>
  • edited September 29, 2011
    You need to study things a little more carefully before diving in and making changes. CSL is quite a simple language once you understand how it fits together, but like any other language there is a logic to it that you have to follow in order to get predictable results. Undo the edit from your second attempt, and follow my example above.

    CSL code is made up of nested blocks, like a Russian doll. The macro blocks can be plugged into other blocks using <text macro="some_macro_name"/>. Inside the layout block in your pasted code above, you've added the italicized et-al to the names element that prints editor and translator names (you can tell because it has an attribute on it that says variable="editor translator", which is of course different from author). What you want to change instead is the author-short macro, which is located elsewhere.

    (Edit: I missed the fact that you also made the change to the author-short macro. That should work; if it doesn't, you'll need to ask for help on the Mendeley forums.)
  • Note that after you get the style working as you want, you should change its name and ID string, as explained here. This should assure that it doesn't get clobbered if Mendeley does automatic style updates.
  • edited September 29, 2011
    fbennet I really appreciate all your help. Please dont give up on me yet...
    But i still cannot get et al to go italics.
    I cut and paste your edit into the author short macro and removed italics from the citation macro

    What am I missing?


    Author short macro

    <macro name="author-short">
    <names variable="author">
    <name form="short" and="symbol" delimiter=", "
    delimiter-precedes-last="never" initialize-with=". "/>
    <et-al font-style="italic"/>
    <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
    <text macro="anon"/>
    </substitute>
    </names>
    </macro>

    And the citation...

    <citation et-al-min="3" et-al-use-first="1" et-al-subsequent-min="3" et-al-subsequent-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true">
    <layout prefix="(" suffix=")" delimiter="; ">
    <group delimiter=", ">
    <group delimiter=" ">
    <text macro="author-short"/>
    <text macro="year-date"/>
    </group>
    <group>
    <label variable="locator" suffix="." form="short" strip-periods="true"/>
    <text variable="locator"/>
    </group>
    </group>
    </layout>
    </citation>
  • post the whole style to a public gist at gist.github.com and paste the URL here - my impression has been that Mendeley's implementation of csl/citeproc doesn't always work as it should, so I'd want to see if this works in Zotero.
  • actually, the style that you post above puts et al in italics. If it doesn't on Mendeley that's likely an issue on their part.
  • As adamsmith says, you really need to seek support from Mendeley for this. Mendeley uses the same tool as Zotero to format citations (citeproc-js), but the processor version and runtime environment differs between the two applications. It's not that we don't want to help; we really aren't the right people to be giving you advice at this point.
  • Okay. Thanks for your help guys. I will just keep trying.
    Really appreciate your comments...
  • edited September 29, 2011
    and just in the faint hope that someone notices:
    Dear Mendeley users - we are happy to help you here with questions regarding csl/styles, but this it the fourth of fifth thread that is unnecessarily long because a user doesn't specify that s/he is using a different piece of software. Just say you're using Mendeley from the start, we might think you're foolish ;-), but we won't discriminate and you'll save us and yourself unnecessary puzzlement.

    edit: @Damo - no need to keep trying. If this doesn't work it's a bug in Mendeley. They need to fix it. Not much you can do.
  • https://gist.github.com/1250043
    Trying to get a Harvard format for Biological Sciences.

    Issues =
    1) "et al" does not italicise

    2) Incorrect in text citation;

    (Viji et al., 2000) should be Viji et al. (2000)
  • yep - style is valid and shows et al in italics in Zotero. It's a Mendeley bug.

    The citation format you can change in the style - Zotero's word plugin has a function for suppressing the author, which is really what should be done here, but if you really want to change this:

    <layout delimiter="; ">
    <group delimiter=" ">
    <text macro="author-short"/>
    <group prefix="(" suffix=")" delimiter=", ">
    <text macro="year-date"/>
    <group>
    <label variable="locator" suffix="." form="short" strip-periods="true"/>
    <text variable="locator"/>
    </group>
    </group>
    </group>
    </layout>
  • edited September 29, 2011
    @adam
    Sorry adam could you please explain a bit further?
    Using the gist could you please tell me what I need to change, in what line number to make
    (Venter et al. 2011)
    into
    Venter et al. (2011)

    I think you mean

    Line No. + Your edit
    116. <layout delimiter="; ">
    117. <group delimiter=" ">
    118. <text macro="author-short"/>
    119. <group prefix="(" suffix=")" delimiter=", ">
    120. <text macro="year-date"/>
    121. <group>
    122. <label variable="locator" suffix="." form="short" strip-periods="true"/>
    123. <text variable="locator"/>
    124. </group>
    125. </group>
    126. </group>
    127. </layout>
  • I see that as 115 to 126, but yes, exactly.
  • Wait. Dont even reply to that. Dumb questions. My bad.
    Cheers for all your help.
  • Hey 1 more question,
    I have found a citation Style "Fungal Ecology" which italisies et-al
    However in the reference section it fails to place a "." between author initials or a ".," after authors last inital...
    Blogs, A.B., Doe, P.Q. 2011
    Can anyone tell me what "exactly" I have to write and where to write it? I tried in <macro name = "author"> but that doesnt seem to be right....

    any help?

    Thanks in advance
    Damo
  • I am trying to get "," after surname and "." between initials and "," after last initial.
    something like.....
    Blogs, A.B., Doe, P.Q. 2011

    Does this look correct?
    If not could you please correct it for me....

    </macro>
    <macro name="author">
    <names variable="author">
    <name name-as-sort-order="all" sort-separator="," initialize-with="." delimiter=", " delimiter-precedes-last="always"/>
    <et-al font-style="italic"/>
    <label form="short" prefix=" (" suffix=".)" text-case="capitalize-first" strip-periods="true"/>
    <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
    <text macro="title"/>
    </substitute>
    </names>
    </macro>
  • Praise be to the Flying Spaghetti Monster...I finally got it (almost) perfect.

    All thats left is to get the "," removed after the last initial and put a "." after the year

    Any suggestions?
  • that isn't in the part of the style you posted - look at the macro that has the year - in most style it's either "year-date" or "issued" and at it's prefix and suffix in the bibliography section of the style.
  • edited October 7, 2011
    Okay I'm getting close.

    https://gist.github.com/1271783#comments

    I have managed to add "." as a prefix and suffix to year.

    However I can't figure out how to get rid of the "," in ".," after the last inital of the last author......

    Hacke, U., Sperry, J., Pockman, W., Davis, S., Mcculloch, K.,. 2001. Trends in wood density and structure are linked to prevention of xylem implosion by negative pressure. Oecologia 126: 457 - 461.

    Incorrect > Hacke, U., Sperry, J., Pockman, W., Davis, S., Mcculloch, K.,. 2001.
    Correct > Hacke, U., Sperry, J., Pockman, W., Davis, S., Mcculloch, K. 2001.

    Is it in this macro?

    </macro>
    <macro name="author">
    <names variable="author">
    <name name-as-sort-order="all" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="never"/>
  • edited October 7, 2011
    It's coming from line 79 of your code -- the suffix="," added to the author macro.

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.

Sign In or Register to comment.