Add report month and day to end of citation
Hi there,
I've tweaked the Springer-Basic (author-date, no "et al.") CSL style to what I need, but the last thing I'm hoping you guys can help me figure out is how/if I can include the month and day at the very end of the bibliographic entry for any Report (or just the month if only that is provided). For example "February 2" or "February"
I see how Zotero recognizes when you enter M D Y in the Date field, so I'm hoping I can have the CSL use that information.
I've tweaked the Springer-Basic (author-date, no "et al.") CSL style to what I need, but the last thing I'm hoping you guys can help me figure out is how/if I can include the month and day at the very end of the bibliographic entry for any Report (or just the month if only that is provided). For example "February 2" or "February"
I see how Zotero recognizes when you enter M D Y in the Date field, so I'm hoping I can have the CSL use that information.
<macro name="month-day"/>
<date variable="issued">
<date-part name="month"/>
<date-part name="day" prefix=" "/>
</date>
</macro>
When attempting this using the visual editor, it will only let me choose a format that includes the year (year-month-day, year-month, or year) for the date-parts, which is not what I want.
I also tried adding this portion of the macro straight in to where I wanted it to show up and it was also rejected.
<date variable="issued">
<date-part name="month"/>
<date-part name="day" prefix=" "/>
</date>
I'm at the end of my rope in things to try. I read the CSL Specifications on date but I'm guessing I'm not understanding a higher-level context here.
<date variable="issued">
<date-part name="month"/>
<date-part name="day" prefix=" "/>
</date>
This is exactly right -- if that doesn't work, you likely put it somewhere "illegal" (e.g. between a choose and an if element or so)
Also try validator.citationstyles.org/ which can be helpful in spotting XML errors
I did put it between a choose and an if element. I figured I was doing something wrong like that. I don't know where else to put this type of info.
To reiterate, I want Reports to include the month and year at the very end of the citation ("February 5"), or just the month ("February"), if that info is present in the Zotero date field.
The pastebin URL for my code is https://pastebin.com/Pykb5MGV
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<group delimiter=", " prefix=". " suffix=".">
<text variable="publisher"/>
<text variable="publisher-place"/>
</group>
</else-if>
And change it to two separate conditions:
<else-if type="bill book graphic legal_case legislation motion_picture song" match="any">
<group delimiter=", " prefix=". " suffix=".">
<text variable="publisher"/>
<text variable="publisher-place"/>
</group>
</else-if>
<else-if type="report" match="any">
<group delimiter=", " prefix=". " suffix=".">
<text variable="publisher"/>
<text variable="publisher-place"/>
<date variable="issued">
<date-part name="month"/>
<date-part name="day" prefix=" "/>
</date>
</group>
</else-if>
I did not have the confidence to edit that much code, so I was trying to make it fit in a place that it obviously didn't belong.
Thank you so much :)
Any suggestions?
<group delimiter=" ">
<text variable="genre"/>
<text variable="number"/>
</group>
To the custom report section above, likely right before publisher.