Skip to content

Commit

Permalink
[CSE] Tweak dates
Browse files Browse the repository at this point in the history
From #1005 and the manual
  • Loading branch information
aurimasv committed Jul 13, 2014
1 parent b208f74 commit badb613
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 65 deletions.
81 changes: 50 additions & 31 deletions council-of-science-editors-alphabetical.csl
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,16 @@
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text variable="title" form="short"/>
</substitute>
</names>
</macro>
<macro name="author-short">
<names variable="author">
<name form="short" and="symbol" delimiter=", " initialize-with="."/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text variable="title" form="short"/>
<text variable="title"/>
</substitute>
</names>
</macro>
<macro name="access">
<group>
<text value="Available from:" suffix=" "/>
<text variable="URL"/>
</group>
<choose>
<if variable="accessed" match="any">
<text variable="URL"/>
</if>
</choose>
</macro>
<macro name="title">
<group delimiter=" ">
Expand All @@ -72,18 +63,50 @@
</group>
</macro>
<macro name="issued">
<date variable="issued" delimiter=" ">
<date-part name="year"/>
<date-part name="month" prefix=" "/>
<date-part name="day" prefix=" "/>
</date>
<group prefix=" [" suffix="]" delimiter=" ">
<text term="cited"/>
<date variable="accessed">
<group delimiter=" ">
<date variable="issued" delimiter=" ">
<date-part name="year"/>
<date-part name="month" prefix=" "/>
<date-part name="day" prefix=" "/>
</date>
<!-- (8th edition. 2014-07-13)
The month and day of the month or the season must be included in 4
situations:
-->
<choose>
<if type="patent article-newspaper webpage" match="any">
<!--
2) when citing patents;
3) with newspaper articles;
4) for dates of update/revision and citation when citing electronic
publications. If desired, the month, day, and season may be used in
other situations. (electronic journal/magazine articles covered below?)
-->
<date variable="issued" delimiter=" ">
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day"/>
</date>
</if>
<else-if type="article-journal article-magazine" match="any">
<choose>
<if variable="volume issue" match="none">
<!--
1) when citing a journal that has no volume or issue number;
-->
<date variable="issued" delimiter=" ">
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day"/>
</date>
</if>
</choose>
</else-if>
</choose>
<group prefix=" [" suffix="]" delimiter=" ">
<text term="accessed"/>
<date variable="accessed" delimiter=" ">
<date-part name="year"/>
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day"/>
</date>
</group>
</group>
</macro>
<macro name="pages">
Expand Down Expand Up @@ -140,9 +163,7 @@
</group>
<text prefix=" " macro="publisher"/>
<group suffix="." prefix="; " delimiter=" ">
<date variable="issued">
<date-part name="year"/>
</date>
<text macro="issued"/>
<text macro="pages"/>
</group>
</if>
Expand All @@ -158,9 +179,7 @@
<group suffix=".">
<text macro="publisher"/>
<group suffix="." prefix="; " delimiter=". ">
<date variable="issued">
<date-part name="year"/>
</date>
<text macro="issued"/>
<text macro="pages"/>
</group>
</group>
Expand Down
63 changes: 54 additions & 9 deletions council-of-science-editors-author-date.csl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text variable="title" form="short"/>
<text variable="title"/>
</substitute>
</names>
</macro>
Expand All @@ -43,15 +43,26 @@
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text variable="title" form="short"/>
<text variable="title-short"/>
</substitute>
</names>
</macro>
<macro name="access">
<group>
<text value="Available from:" suffix=" "/>
<text variable="URL"/>
</group>
<choose>
<if variable="accessed" match="any">
<group delimiter=". ">
<group prefix=" [" suffix="]" delimiter=" ">
<text term="accessed"/>
<date variable="accessed" delimiter=" ">
<date-part name="year"/>
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day"/>
</date>
</group>
<text variable="URL"/>
</group>
</if>
</choose>
</macro>
<macro name="title">
<group delimiter=" ">
Expand All @@ -74,9 +85,43 @@
<text variable="page"/>
</macro>
<macro name="year-date">
<date variable="issued">
<date-part name="year"/>
</date>
<group delimiter=" ">
<date variable="issued" delimiter=" ">
<date-part name="year"/>
</date>
<!-- (8th edition. 2014-07-13)
The month and day of the month or the season must be included in 4
situations:
-->
<choose>
<if type="patent article-newspaper webpage" match="any">
<!--
2) when citing patents;
3) with newspaper articles;
4) for dates of update/revision and citation when citing electronic
publications. If desired, the month, day, and season may be used in
other situations. (electronic journal/magazine articles covered below?)
-->
<date variable="issued" delimiter=" ">
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day"/>
</date>
</if>
<else-if type="article-journal article-magazine" match="any">
<choose>
<if variable="volume issue" match="none">
<!--
1) when citing a journal that has no volume or issue number;
-->
<date variable="issued" delimiter=" ">
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day"/>
</date>
</if>
</choose>
</else-if>
</choose>
</group>
</macro>
<macro name="journal">
<text variable="container-title" form="short"/>
Expand Down
73 changes: 48 additions & 25 deletions council-of-science-editors.csl
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,16 @@
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text variable="title" form="short"/>
</substitute>
</names>
</macro>
<macro name="author-short">
<names variable="author">
<name form="short" and="symbol" delimiter=", " initialize-with="."/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text variable="title" form="short"/>
<text variable="title"/>
</substitute>
</names>
</macro>
<macro name="access">
<group>
<text value="Available from:" suffix=" "/>
<text variable="URL"/>
</group>
<choose>
<if variable="accessed" match="any">
<text variable="URL"/>
</if>
</choose>
</macro>
<macro name="title">
<group delimiter=" ">
Expand All @@ -67,18 +58,50 @@
</group>
</macro>
<macro name="issued">
<date variable="issued" delimiter=" ">
<date-part name="year"/>
<date-part name="month" prefix=" "/>
<date-part name="day" prefix=" "/>
</date>
<group prefix=" [" suffix="]" delimiter=" ">
<text term="cited"/>
<date variable="accessed">
<group delimiter=" ">
<date variable="issued" delimiter=" ">
<date-part name="year"/>
<date-part name="month" prefix=" "/>
<date-part name="day" prefix=" "/>
</date>
<!-- (8th edition. 2014-07-13)
The month and day of the month or the season must be included in 4
situations:
-->
<choose>
<if type="patent article-newspaper webpage" match="any">
<!--
2) when citing patents;
3) with newspaper articles;
4) for dates of update/revision and citation when citing electronic
publications. If desired, the month, day, and season may be used in
other situations. (electronic journal/magazine articles covered below?)
-->
<date variable="issued" delimiter=" ">
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day"/>
</date>
</if>
<else-if type="article-journal article-magazine" match="any">
<choose>
<if variable="volume issue" match="none">
<!--
1) when citing a journal that has no volume or issue number;
-->
<date variable="issued" delimiter=" ">
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day"/>
</date>
</if>
</choose>
</else-if>
</choose>
<group prefix=" [" suffix="]" delimiter=" ">
<text term="accessed"/>
<date variable="accessed" delimiter=" ">
<date-part name="year"/>
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day"/>
</date>
</group>
</group>
</macro>
<macro name="pages">
Expand Down

0 comments on commit badb613

Please sign in to comment.