Editing the Zotero Harvard style to display the original publication date in Word

authored by Frank Lynam at 11/04/2013 16:43:15

I love using Zotero but up to now I have been put off editing any of the inbuilt styles. The reason being I had never found any really satisfactory online guides and generally I felt the whole styles feature was not done particularly well by Zotero. One major annoyance that has always bothered me about Zotero was that it does not support the displaying of two dates when using the Harvard style (author-date) and it would appear that I’m not alone in lamenting this lacuna. Anyway, this morning, I set about getting this working once and for all and here’s how I did it.

  1. Go to the very nice visual editor that has been developed by Columbia University Library and Mendeley and search for the Harvard style.
  2. This should bring up a number of results. Choose to edit ‘Harvard Reference format 1 (author-date)’.
  3. This brings up the visual editor, whose interface is setup as follows. The structure of the chosen style is displayed on the left and in the top-right you see an example output representing the styling of a few example citations. As you click on the elements on the left, various display-formatting options are revealed on the bottom-right. As you change settings here, the example output in the top-right changes dynamically.
  4. Now go to your Firefox Zotero plugin and find a sample reference (I went for Walter Benjamin’s The Work of Art in the Age of Mechanical Reproduction). This will be used as a test case with which to try out your changes in the Visual Editor.Zotero Benjamin entry
  5. It seems that there is a problem when using date fields for the method that I propose in the following steps so you need to add your date text into the ‘Extra’ field as is shown below.
    Zotero Extra field
  6. Then right-click on the citation and chose to ‘Export Item...’, selecting ‘CSL JSON’ as your format. Pick a save location and now you have your sample reference.
  7. Go to the location of the JSON file and open it in a text browser of your choice. I used TextMate. Select all the text and copy it to the clipboard.
  8. Return to the Visual Editor and chose ‘Example citations’/’Citation 1’ in the top-right corner. Deselect the current example citation information and in the ‘Advanced’ section paste your JSON data into the field provided and click ‘Add new reference’. Hey presto, the first example citation now refers to your exported citation.
  9. In the top-left pane, underneath ‘EXAMPLE CITATIONS’ click on the first example’s date. If you have removed the date field, by default it should read ‘n.d.’.
  10. Within the left-hand pane, the tree should have expanded. Underneath the selected ‘year-date (macro)’ node, select the ‘Conditional/Else/no date’ node.
  11. Go to the bottom-right-hand pane and select ‘Variable’ for the ‘Type’ field. For ‘variable’ choose the ‘note’ field.
  12. You should now see that your example citation has changed and that its date portion displays the text that you entered in the ‘Extra’ field in Zotero. Basically, what has happened is that you have told the parser of your custom Harvard style to look for a value under the ‘Date’ field but if that is missing then to use the value under ‘Extra’ instead.
  13. Now you need to give your custom style a name. Do this by selecting the style title at the top of the page. Then edit the ‘text value’ field, which is displayed in the bottom-right-hand pane.
  14. Now select ‘Style’-‘Save Style’ and a popup dialog will appear. Follow the instructions for installing the new style in Zotero and it should then be available as a style when you are using the Zotero plugin for Word.


In my experience, Zotero is not capable of producing a bibliography that exactly matches a journal style. Rather than endlessly experimenting with Zotero options, I would suggest manually editing the Zotero bibliography. Copy the bibliography and treat it as text and then edit it for the given journal style. Even in a very long work, this probably won't take longer than a few hours and it guarantees the accuracy of the bibliography.

To provide a degree of automation, a script in Python or PHP or Perl could be written to parse the Zotero output...


(henry, 11/04/2013 22:30:23)

I don't agree. Zotero has saved me huge amounts of time formatting my citations in papers. I remember when I used to do it all manually and it was nightmare. No matter how fastidious you think that you are, you will always end up missing the odd comma or italicized entry. Automation is the way to go and besides the odd quirk, Zotero generally works pretty well.

(frank, 13/04/2013 21:34:03)

Thanks, a little tedious, but I hope it pays off in the long run!


Jean Boucher

(Jean Boucher, 10/07/2013 17:01:24)


(a, 01/03/2015 04:32:19)


Thanks for your advice. Currently, a more stable method is available in Zotero until original date support is fully implemented (which should hopefully happen this year).

Please follow the advice given by bwiernik and adamsmith at the bottom of the page here:



This will allow you to use standard Zotero styles and be more future-proof than the custom method you describe here. If you have any issues, please post to the Zotero forums.

(bwiernik, 01/03/2015 04:36:36)