Modifying word plug-in: Using journal abbreviation instead of publication name
Hi,
Is there a way to modify Zotero's word plug in? Currently, when I use the Harvard style for my bibliography in Word, Zotero uses publication name instead of journal abbreviation when it creates a reference. Normally, that would be ok except that Pub Med often stores more information than necessary in their publication name field. For example, when I want to reference AIDS the information in publication name looks like: AIDS (London, England). The information in the journal abbreviation is: AIDS. The latter is correct and all I need for the reference. Can I change the fields that Zotero looks at when creating a reference so that the journal abbreviation field is used to provide information about which journal the article came from?
Thanks,
Katie
Is there a way to modify Zotero's word plug in? Currently, when I use the Harvard style for my bibliography in Word, Zotero uses publication name instead of journal abbreviation when it creates a reference. Normally, that would be ok except that Pub Med often stores more information than necessary in their publication name field. For example, when I want to reference AIDS the information in publication name looks like: AIDS (London, England). The information in the journal abbreviation is: AIDS. The latter is correct and all I need for the reference. Can I change the fields that Zotero looks at when creating a reference so that the journal abbreviation field is used to provide information about which journal the article came from?
Thanks,
Katie
Open the Zotero Test Pane
chrome://zotero/content/tools/csledit.xul
select a citation from a journal in Zotero.
Select Harvard stlyle from the drop down menu
Look at the (xml) code you see in the upper half of your split screen.
Find the line:
<text variable="container-title" font-style="italic"/>
and change it to
<text variable="container-title" form="short" font-style="italic"/>
- so you're telling Zotero to use the short form of the "container" (in this case journal) publication. You'll see the change immediately below in the bibliography.
Now you need rename your new style.
Go all the way to the top of the code and find the two lines
<title>Harvard Reference format 1 (Author-Date)</title>
<id>http://www.zotero.org/styles/harvard1</id>
change them both to something like Harvard-Journal Short and
http://www.zotero.org/styles/harvardJS
(to the experts: what makes sense tu put in the id field?)
Last step - how do you get this new style into Zotero?
You select the entire code and paste it into a text editor (NOT Word or Wordpad. On windows use notepad).
Then you save the file as HarvardJS.csl - the important part here is the .csl - and drag it to Firefox, which will automatically install it in Zotero. Done.
How can I get rid of the .txt? I have tried renaming it in its properties. No go.
http://www.fileinfo.net/help/windows-show-extensions.html
Thanks,
Fred
<macro name="container-title">
<group>
<choose>
<if type="article-journal">
<text variable="container-title" form="short" strip-periods="true"/>
</if>
<else>
<text variable="container-title" form="short"/>
</else>
</choose>
</group>
</macro>
<text variable="container-title" form="short"/>
I adapted this style from the Oecologia style (upgraded to CSL 1.0 and tweaked a bit). If you just use Oecologia style -- which has that code with the "short" form container title -- the journal name comes out long, not short.
2) Please post your style to http://gist.github.com (instructions are available at http://www.zotero.org/support/dev/submitting_citation_styles#submitting_for_casual_coders)
Thanks in advance!
We can help you troubleshoot styles if you post them as public gists to
gist.github.com and put a link here. If the problem is your data that's more complicated.
Also, any tips on adding a 'series abbr' field, so that I can use abbreviated series titles (i.e. for book series) in both the footnotes and bibliography?
Thanks!!!
<text variable="container-title" font-style="italic"/>
in the container-title macro
(it should be line 327 or very close)
and add form="short" as in the "container-title-note" macro.
Series abbreviations are currently not supported in Zotero, though if I understand correctly, once they are, they can be used by csl without any problems
( using form="short" on the collection-title variable)