De Montfort University Harvard Style Update help

I have made some corrections to the De Montfort University - Harvard csl (mainly on how editors of books are managed when the item type is Book Section), but I am stuck with this problem:
If an article has no page number it should be treated as an online source and show doi or url, I have made some attempts at testing the variable "page" but didn't achieve anything.
Can somebody help please (my coding skills are very limited)?
Example
when the page number is not available the bibliography should show:

HEUS, T. and JONKER, H.J.J. (2008) Subsiding shells around shallow cumulous clouds. Journal of atmospheric sciences. [Online] 65 (3). Available from: doi:org/10.1175/2007Jas2322.1 [Accessed 28/06/16].
(with either doi or url whatever available)

what it shows at the moment is:

HEUS, T. and JONKER, H.J.J. (2008) Subsiding shells around shallow cumulous clouds. Journal of atmospheric sciences. 65 (3).

  • <choose>
    <if variable="URL">
    <choose>
    <if variable="DOI URL" match="any">
    <group delimiter=" ">
    <group delimiter=": ">
    <text term="available at" text-case="capitalize-first"/>
    <choose>
    <if variable="DOI">
    <text variable="DOI" prefix="https://doi.org/"/>
    </if>
    <else>
    <text variable="URL"/>
    </else>
    </choose>
    </group>
    <group delimiter=" ">
    <text term="accessed" text-case="capitalize-first"/>
    <date variable="accessed" form="numeric"/>
    </group>
    </group>
    </if>
    </choose>
    </if>
    </choose>


    Untested, but should be right.
    Put the whole thing in the macro and call it at the end of the bibliography section.
  • Thank you very much, I have tested damnation's csl and it works, there are still a few minor changes to do (es: insert "(online)" before the journal title), I don't have time over the next 2 days, but I will try to correct those little things and submit it as soon as I can.
    Thanks again, Pino
  • Just let me know what is wrong and I include them in my pull request.
  • Sorry if it takes time to answer: I have been out all day
    4 things:
    1- there should be an "[online]" field after the journal title (see example above), same as web pages
    2- in a citation in text, with multiple sources, they should be in order of date
    3- in a book section item type the book editors names should have the first name initial after the surname as they are for the author
    4- all et-al-min should be "4"
    Thank you again
  • Hi again
    Thank to Adamsmith and damnation and after some messing about, I have a version of the CSL that seems to solve most of the problems, could I send it to you or should I generate a pull request in github?
    I am not very confident that everything is working fine ( for example it doesn't manage correctly "anonymous" and "no date" in the bibliography), but I don't have any more time to spend on it
  • I'll get those fixes in for you over the weekend. I work full time and didn't have time in the last two days.
  • I know what you mean: I am working full time and trying to get a master at the same time. Anyway: I have already done those fixes: should I send you the code? What is the best way to do that?
  • edited December 1, 2017
    You can put the code here https://gist.github.com/ , create a secret Gist and post the link here :)
  • here is the Gist (I didn't even know what a Gist was until you mentioned it)

    https://gist.github.com/pinomaffei/d046a6c372363cc3cff041d1d3d6b3b8
  • @pinomaffei
    https://www.zotero.org/styles?q=id:de-montfort-university-harvard

    Thanks for doing the work on the style. That is reviewed and now on the repo as revised.

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.