Skip to content

Commit

Permalink
Fix sort by a single macro (#5136)
Browse files Browse the repository at this point in the history
So styles don't rely on the behavior described in 
citation-style-language/test-suite#31
  • Loading branch information
adam3smith authored Nov 27, 2020
1 parent 5d1a7e8 commit ca3839b
Show file tree
Hide file tree
Showing 10 changed files with 115 additions and 10 deletions.
2 changes: 1 addition & 1 deletion beltz-padagogik.csl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<bibliography>
<sort>
<key macro="creator-short"/>
<key macro="creator-year-short"/>
<key macro="year"/>
</sort>
<layout>
<group delimiter=". " suffix=".">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
<bibliography>
<sort>
<key macro="creator-short"/>
<key macro="creator-year-short"/>
<key macro="year"/>
</sort>
<layout>
<group delimiter=", ">
Expand Down
5 changes: 4 additions & 1 deletion biuletyn-polskiego-towarzystwa-jezykoznawczego.csl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
</else>
</choose>
</macro>
<macro name="year">
<date date-parts="year" form="text" variable="issued"/>
</macro>
<macro name="collection-title-number">
<group delimiter=" " prefix="(= " suffix=")">
<text variable="collection-title"/>
Expand Down Expand Up @@ -132,7 +135,7 @@
<bibliography delimiter-precedes-et-al="never" et-al-min="3" et-al-use-first="2" hanging-indent="true">
<sort>
<key macro="creator-short"/>
<key macro="creator-year-short"/>
<key macro="year"/>
</sort>
<layout>
<group delimiter=". " suffix=".">
Expand Down
5 changes: 4 additions & 1 deletion deutsche-sprache.csl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
<date date-parts="year" form="text" variable="issued"/>
</group>
</macro>
<macro name="year">
<date date-parts="year" form="text" variable="issued"/>
</macro>
<macro name="edition">
<choose>
<if match="any" is-numeric="edition">
Expand Down Expand Up @@ -135,7 +138,7 @@
<bibliography et-al-min="4" et-al-use-first="1">
<sort>
<key macro="creator-short"/>
<key macro="creator-year-short"/>
<key macro="year"/>
</sort>
<layout>
<group delimiter=". " suffix=".">
Expand Down
2 changes: 1 addition & 1 deletion hochschule-hannover-soziale-arbeit.csl
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<bibliography>
<sort>
<key macro="creator-short"/>
<key macro="creator-year-short"/>
<key macro="year"/>
</sort>
<layout>
<group delimiter=". " suffix=".">
Expand Down
5 changes: 4 additions & 1 deletion keel-ja-kirjandus.csl
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
<date date-parts="year" form="text" variable="issued"/>
</group>
</macro>
<macro name="year">
<date date-parts="year" form="text" variable="issued"/>
</macro>
<macro name="edition">
<choose>
<if match="any" is-numeric="edition">
Expand Down Expand Up @@ -138,7 +141,7 @@
<bibliography et-al-min="4" et-al-use-first="1">
<sort>
<key macro="creator-short"/>
<key macro="creator-year-short"/>
<key macro="year"/>
</sort>
<layout>
<group delimiter=". " suffix=".">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,36 @@
</else>
</choose>
</macro>
<macro name="author-sort">
<choose>
<if type="legislation" match="any">
<group delimiter=" ">
<text variable="title"/>
<text variable="title-short" prefix="(" suffix=")"/>
</group>
</if>
<else>
<choose>
<if type="bill" match="any">
<choose>
<if match="none" variable="author editor">
<text variable="title-short"/>
</if>
<else>
<text macro="u__author"/>
</else>
</choose>
</if>
<else-if type="article-newspaper" match="any">
<text variable="container-title"/>
</else-if>
<else>
<text macro="u__author"/>
</else>
</choose>
</else>
</choose>
</macro>
<macro name="b__container">
<choose>
<if type="chapter report paper-conference" match="any">
Expand Down Expand Up @@ -412,7 +442,9 @@
</citation>
<bibliography et-al-min="4" et-al-use-first="3" initialize="false" entry-spacing="0" hanging-indent="true">
<sort>
<key macro="b__author-year-title"/>
<key macro="author-sort"/>
<key macro="u__issued"/>
<key macro="u__title"/>
</sort>
<layout suffix=".">
<group delimiter=". ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,36 @@
</else>
</choose>
</macro>
<macro name="author-sort">
<choose>
<if type="legislation" match="any">
<group delimiter=" ">
<text variable="title"/>
<text variable="title-short" prefix="(" suffix=")"/>
</group>
</if>
<else>
<choose>
<if type="bill" match="any">
<choose>
<if match="none" variable="author editor">
<text variable="title-short"/>
</if>
<else>
<text macro="u__author"/>
</else>
</choose>
</if>
<else-if type="article-newspaper" match="any">
<text variable="container-title"/>
</else-if>
<else>
<text macro="u__author"/>
</else>
</choose>
</else>
</choose>
</macro>
<macro name="b__container">
<choose>
<if type="chapter report paper-conference" match="any">
Expand Down Expand Up @@ -389,7 +419,9 @@
</citation>
<bibliography entry-spacing="0" hanging-indent="true">
<sort>
<key macro="b__author-year-title"/>
<key macro="author-sort"/>
<key macro="u__issued"/>
<key macro="u__title"/>
</sort>
<layout suffix=".">
<choose>
Expand Down
34 changes: 33 additions & 1 deletion wirtschaftsuniversitat-wien-wirtschaftspadagogik.csl
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,36 @@
</else>
</choose>
</macro>
<macro name="author-sort">
<choose>
<if type="legislation" match="any">
<group delimiter=" ">
<text variable="title"/>
<text variable="title-short" prefix="(" suffix=")"/>
</group>
</if>
<else>
<choose>
<if type="bill" match="any">
<choose>
<if match="none" variable="author editor">
<text variable="title-short"/>
</if>
<else>
<text macro="u__author"/>
</else>
</choose>
</if>
<else-if type="article-newspaper" match="any">
<text variable="container-title"/>
</else-if>
<else>
<text macro="u__author"/>
</else>
</choose>
</else>
</choose>
</macro>
<macro name="b__in-editor-container">
<choose>
<if type="chapter report paper-conference" match="any">
Expand Down Expand Up @@ -459,7 +489,9 @@
<bibliography initialize="false" entry-spacing="0" hanging-indent="true">
<sort>
<key macro="sort_keys"/>
<key macro="b__author-year-title"/>
<key macro="author-sort"/>
<key macro="u__issued"/>
<key macro="u__title"/>
</sort>
<layout>
<group delimiter=". ">
Expand Down
2 changes: 1 addition & 1 deletion zeitschrift-fur-qualitative-forschung.csl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<bibliography>
<sort>
<key macro="creator-short"/>
<key macro="creator-year-short"/>
<key macro="year"/>
</sort>
<layout>
<group delimiter=". " suffix=".">
Expand Down

0 comments on commit ca3839b

Please sign in to comment.