Thesis type using "genre"
I am trying to format thesis citations in the bibliography as follows:
Bjorndal, K.A. 1979. Nutrition and grazing behavior of the Green Turtle, Chelonia mydas, a seagrass herbivore. Ph.D. Dissertation, University of Florida, Gainesville, Florida, USA. 73 p.
Saumure, R.A. 1997. Growth, mutilation, and age structure of two populations of Wood Turtles (Clemmys insculpta) in southern Québec. M.Sc. Thesis, McGill University, Montréal, Québec, Canada. 70 p.
Here is the code that I have set-up so far:
<macro name="container">
<choose>
<if type="article-journal article-magazine" match="any">
<group delimiter=" ">
<text variable="container-title"/>
<group delimiter=":">
<text variable="volume"/>
<text variable="page"/>
</group>
</group>
</if>
<else-if type="thesis">
<group delimiter=", ">
<text variable="genre"/>
<text variable="university"/>
<text variable="city"/>
<text variable="country"/>
</group>
</else-if>
<else>
<text variable="container-title"/>
</else>
</choose>
</macro>
However, I cannot seem to get the "genre" to display (i.e., the thesis type [M.Sc. Thesis or Ph.D. Dissertation] do not appear).
And, secondarily, what code is recommended to get the number of pages displayed as above for this reference type? I played around with several options in this container macro, but nothing worked - the number of pages (without p.) kept displaying after the title but before the rest of the container despite that the code was sequential.
Would it be better to set-up a pages macro or...? Aside from the journal article page display above, I use pages as part of chapters as follows:
<macro name="chapter-info">
<group delimiter=" ">
<choose>
<if type="chapter paper-conference" match="any">
<group delimiter=" ">
<label text-case="capitalize-first" variable="page" form="short"/>
<text variable="page"/>
<text term="in" text-case="capitalize-first" font-style="italic"/>
</group>
</if>
</choose>
<text macro="editor"/>
</group>
</macro>
Thanks!
Matt
Bjorndal, K.A. 1979. Nutrition and grazing behavior of the Green Turtle, Chelonia mydas, a seagrass herbivore. Ph.D. Dissertation, University of Florida, Gainesville, Florida, USA. 73 p.
Saumure, R.A. 1997. Growth, mutilation, and age structure of two populations of Wood Turtles (Clemmys insculpta) in southern Québec. M.Sc. Thesis, McGill University, Montréal, Québec, Canada. 70 p.
Here is the code that I have set-up so far:
<macro name="container">
<choose>
<if type="article-journal article-magazine" match="any">
<group delimiter=" ">
<text variable="container-title"/>
<group delimiter=":">
<text variable="volume"/>
<text variable="page"/>
</group>
</group>
</if>
<else-if type="thesis">
<group delimiter=", ">
<text variable="genre"/>
<text variable="university"/>
<text variable="city"/>
<text variable="country"/>
</group>
</else-if>
<else>
<text variable="container-title"/>
</else>
</choose>
</macro>
However, I cannot seem to get the "genre" to display (i.e., the thesis type [M.Sc. Thesis or Ph.D. Dissertation] do not appear).
And, secondarily, what code is recommended to get the number of pages displayed as above for this reference type? I played around with several options in this container macro, but nothing worked - the number of pages (without p.) kept displaying after the title but before the rest of the container despite that the code was sequential.
Would it be better to set-up a pages macro or...? Aside from the journal article page display above, I use pages as part of chapters as follows:
<macro name="chapter-info">
<group delimiter=" ">
<choose>
<if type="chapter paper-conference" match="any">
<group delimiter=" ">
<label text-case="capitalize-first" variable="page" form="short"/>
<text variable="page"/>
<text term="in" text-case="capitalize-first" font-style="italic"/>
</group>
</if>
</choose>
<text macro="editor"/>
</group>
</macro>
Thanks!
Matt
You'll want to make sure your style validates:
http://validator.citationstyles.org/
the variable for the number of pages is number-of-pages
See here for a full list of variables and their mappings to Zotero
aurimasv.github.io/z2csl/typeMap.xml
I got rid of the variables that don't exist and still genre gives me nothing. Anything else I can try?
And, I figured out the pages thing - my issue wasn't what the variable was called, but rather where to add the code so it was positioned correctly in the Bibliography entries. This is what I did:
<macro name="pages">
<choose>
<if type="thesis">
<text variable="number-of-pages" suffix=" p."/>
</if>
</choose>
</macro>
Then added this macro to the end of the bibliography layout set of code.
Here is the link:
https://gist.github.com/anonymous/2ed124b660f3dc0e751c
In this case, Mendeley isn't mapping Type to genre, you have to add the Genre field to Thesis (in the preferences) and use that. I've mentioned this to them before, not sure why they haven't fixed it.
That seems to do the trick and even cleaned up my code a bit because now I can just leave the 'genre' call in my publisher macro and take it out of my 'container' macro.
Thanks!!!