Bibliography - Removing delimiters on empty fields
Hi there
I'm slowly creating my own CSL style for my university based on the Monash University - Harvard one. I've got it working good enough for now, but one thing that's bugging me is the bibliography. For certain citations, it will print delimiters for an empty field in the bibliography. For example:
McFarlane, James 1976, ‘The mind of modernism’, in M. Bradbury & J. McFarlane (eds), Modernism, , pp. 71–93, Penguin.
As you can see, after 'Modernism' and before the page range, there is an extra comma. I can't figure out how to get it to not print that when it's not needed. Here's the bibliography section of the CSL:
Can anyone give me some pointers?
I'm slowly creating my own CSL style for my university based on the Monash University - Harvard one. I've got it working good enough for now, but one thing that's bugging me is the bibliography. For certain citations, it will print delimiters for an empty field in the bibliography. For example:
McFarlane, James 1976, ‘The mind of modernism’, in M. Bradbury & J. McFarlane (eds), Modernism, , pp. 71–93, Penguin.
As you can see, after 'Modernism' and before the page range, there is an extra comma. I can't figure out how to get it to not print that when it's not needed. Here's the bibliography section of the CSL:
<bibliography et-al-use-last="true" entry-spacing="0" line-spacing="2" hanging-indent="true" subsequent-author-substitute="_____">
<sort>
<key macro="author"/>
<key macro="issued-sort" sort="ascending"/>
<key macro="title"/>
</sort>
<layout>
<group delimiter=", ">
<group delimiter=" ">
<text macro="author"/>
<text macro="issued" suffix=","/>
<text macro="title-plus-extra" suffix=", "/>
<text macro="container"/>
</group>
<text macro="legal-cites"/>
<text macro="locators"/>
<group delimiter=", ">
<text macro="event"/>
<text macro="publisher" suffix="."/>
</group>
</group>
<text macro="access" prefix=". "/>
<text macro="original-date" prefix=" "/>
</layout>
</bibliography>
Can anyone give me some pointers?
You'd want to include your code in code brackets
style
but if you're pasting a whole style, it's better to use a Gist. Make a secret gist and share the link: http://gist.github.com/
Here are some good best practices to avoid extra commas:
https://zoteromusings.wordpress.com/2013/10/28/writing-csl-features-and-best-practices/
@bwiernik thanks for the link :) I've managed to clean it up by grouping it. My CSL style is probably a bit of a hodge-podge at the moment as I'm adjusting it to my requirements as issues come up with references I'm using. I'm pretty new to this, so thanks for the help!