Advice on editing harvard style

Hi all,

I am just preparing the bibliography for my PhD thesis, and looking for some advice on modifying a style. The Harvard Cite Them Right style is closest to what I want to use, but I need to make a couple of modifications. I have been playing around with the XML script, but I basically don't know what I am doing, so I am hoping someone might be able to help.

Firstly, I want to add in the original-date field, so that my in-text references look like the following: (Smith 2014 [1776]).

Secondly, the style orders the bibliography by author name (which is good), but then by title. I want it ordered by author name and then by year of publication.

Any advice would be gratefully appreciated!

Leo

  • 1. original-date
    Change lines 266... to this:

    <citation et-al-min="4" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" collapse="year">
    <sort>
    <key macro="year-date"/>
    </sort>
    <layout prefix="(" suffix=")" delimiter="; ">
    <group delimiter=", ">
    <group delimiter=" ">
    <text macro="author-short"/>
    <text macro="year-date"/>
    <date date-parts="year" form="text" variable="original-date"/>
    </group>
    <group>
    <label variable="locator" form="short" suffix=" "/>
    <text variable="locator"/>
    </group>
    </group>
    </layout>
    </citation>



    2. sorting of bib:
    It already does what you want. It is handled by these lines in line 278...:

    <sort>
    <key macro="author"/>
    <key macro="year-date"/>
    <key variable="title"/>
    </sort>
  • Thanks very much for the reply damnation, I will try the code you have provided for the original-date shortly.

    But, with regards to point two, I saw those lines of code and indeed thought that they should be doing what I wanted. Yet when I make my bibliography in LibreOffice, I get (for example) the following output:

    Elden, S., 2019. Canguilhem. Medford, MA: Polity Press.
    Elden, S., 2016. Foucault’s last decade. Cambridge ; Malden, MA: Polity Press.
    Elden, S., 2013a. ‘How Should We Do the History of Territory?’, Territory, Politics, Governance, 1(1), pp. 5–20. doi: 10.1080/21622671.2012.733317.
    Elden, S., 2010. ‘Land, terrain, territory’, Progress in Human Geography, 34(6), p. 799.
    Elden, S., 2003. ‘Reading Genealogy as Historical Ontology’, in Milchman, A. and Rosenberg, A. (eds) Foucault and Heidegger: critical encounters. Minneapolis, Minn. ; London: University of Minnesota Press

    As you can see, the entries are grouped by author (and these are correctly ordered alphabetically), but then they are secondarily ordered by title, rather than by date.

    Do you have any idea why this might be?
  • They are reverse-chronologically ordered from what I can see (2019-2003). You can reverse that.
  • but the above code should sort ascending, so that's not it. I'd want to see the full modified style before troubleshooting further. Post e.g. to hastebin.com and provide a link here.
  • Ah, apologies. I think the ordering problem was something I had done. I wanted to remove the sorting from the in-text citations, so that I could do things like the following:

    (see Schabas 2009; see also Morgan 1992; 2007; Smith 2002)

    As it stands, if I tried to do that, then style would rearrange it to:

    (see also Morgan 1992; Smith 2002; 2007; see Schabas 2009)

    This is not very helpful. Of course I can rearrange this afterwards, but it would be easier if the style would not re-order the in-text citations.

    Is it possible to keep the citations unsorted with the bibliography sorted?
  • I have just encountered a further issue in relation to my original-date question. Some of the old texts I deal with don't have an exact publication date but give the date of publication as, for example, 1703-4.

    When I enter "original-date: 1703-4" in the extras field, currently the output in my bibliography is Law (1994) [1703].

    Am I right in thinking that this is because the code damnation provided above tells it to look for a year only? If so, is there any way to get it to read the entry only as text, so that I can keep the date range?

    Thanks.
  • There are separate sort sections under <citation> and <bibliography>, so yes, you can absolutely do the one without the other. Moreover, the Word add-on has a "Keep sources sourted" checkbox when you click on the arrow at the left of the box that allows you to turn this of for individual cites.

    For the second question, enter date ranges as original data: 1703/1704
    slashed signal ranges in ISO 8601 date notation and the citations pick that up (Zotero needs a better date field -- clearly this isn't at all intuitive -- but that's what we currently have).
  • edited September 26, 2019
    Hi, thanks very much for the replies. One quick follow up question.

    I have used the code damnation provided, and it provides citations in the following format:

    (Skinner, 2014, 1976) where the latter is the original date.

    But what I am after is the folllowing:

    (Skinner 2014 [1976])

    Such are my skills that I managed to get rid of the comma, but I can't figure out how to add in the square brackets.

    I have a related problem also with the bibliography. I tried to use the following:

    But this outputs:

    Skinner, A. (2014) 1976

    I would ideally prefer the following:

    Skinner, A., 2014 [1976].

    Though the following would also be okay:

    Skinner, A. (2014 [1976])

    Again though, this seems to be beyond my extremely limited coding skills unfortunately. If anyone has any advice on this, that would be very much appreciated!
  • It would seem I also don't know how to post code...
  • Please post the full current style code to hastebin.com click save at the top right and provide a link
  • Thanks Adam Smith

    I couldn't seem to figure out hastebin... But here is a link to a text file. I hope that's okay.

    https://www.dropbox.com/s/vm58d6p36aegcu8/Harvard style.rtf?dl=0

  • I've added comments on DB
  • Brilliant. That did it. Thanks so much for your help!
  • I have one final minor issue. The in-text citations place "p." in front of the page number, e.g. (Smith 1776, p.250). I don't normally include the "p." when writing citations manually, but when I noticed it I reasoned that it wouldn't be a problem. That is, until I realized that I also have a load of references which are to chapters in the form "ch. 3". This ends up with something like (Skinner 2014, p.ch.3).

    I had a look through the code, but with my extremely limited abilities I can't seem to find where the "p." is coming from. If anyone has any advice that would be much appreciated.
  • edited September 27, 2019
    So, if you look under citation.... you will see:

    <group>
    <label variable="locator" form="short" suffix=" "/>
    <text variable="locator"/>
    </group>


    This prints "p.233" or "ch.12". Locator is generic and can be a page or a chapter.
    Now if you only want "233", but still include the "ch." for chapter 12, then you need to build a conditional like such:


    <group>
    <choose>
    <if type="chapter" match="any">
    <label variable="locator" form="short" suffix=" "/>
    </if>
    </choose>
    <text variable="locator"/>
    </group>


    However, that you get "p.ch.3" is weird. Where did you enter the letter "p"?
  • I think they entered ch. 3 into the page field in the Word add-on rather than selecting chapter.
    Given that, I'd simply delete the line starting with <label
Sign In or Register to comment.