Skip to content

Commit

Permalink
Add workaround for software style in ASA (sociology) (#5464)
Browse files Browse the repository at this point in the history
* Add workaround for software style in ASA (sociology)

* Include condition for CSL to interpret an item with type=book and an entry for version as a computer program following: https://forums.zotero.org/discussion/comment/363537/#Comment_363537
* Make citation entry for computer programs when type=book and version is present following style:

Last, First. Year. Program Name (version #) [Computer program]. Retrieved from <url>.

* Some code clean-up

* re-indent

* Fix validation

* Adapt database and machine-readable data format for software

Address inconsistencies in form raised in #5464

* Debug keyword error in terms

* Remove 'computer program' localization

* Hardcodes '[computer program]' into citation
* Add to-do item to use localization when proper term exists
* Notes software hack in title macro that allows lower-case letters in title

Co-authored-by: Sebastian Karcher <karcher@u.northwestern.edu>
  • Loading branch information
mikebader and adam3smith committed Aug 22, 2021
1 parent 459dfb7 commit 9cc3797
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion american-sociological-association.csl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<updated>2020-09-18T10:38:12+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<locale xml:lang="en">
<terms>
<term name="version">version</term>
</terms>
</locale>
<macro name="editor">
<names variable="editor">
<label form="verb" suffix=" "/>
Expand Down Expand Up @@ -69,7 +74,7 @@
<text prefix="(" suffix=")" variable="URL"/>
</group>
</if>
<else-if type="article-journal" match="any">
<else-if type="article-journal report" match="any">
<text variable="DOI" prefix="doi: "/>
</else-if>
</choose>
Expand All @@ -80,6 +85,11 @@
<if type="thesis">
<text variable="title" text-case="title"/>
</if>
<!-- Software Hack -->
<else-if type="book" variable="version" match="all">
<!-- Allow lower-case initial letters, e.g., iPhone, ggplot2 -->
<text variable="title" font-style="italic"/>
</else-if>
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<text variable="title" font-style="italic" text-case="title"/>
</else-if>
Expand Down Expand Up @@ -221,6 +231,20 @@
<text macro="publisher"/>
</group>
</else-if>
<!--Software hack-->
<else-if type="book" variable="version" match="all">
<group prefix=" " delimiter=". ">
<group>
<!-- To Do: localize once we have a proper term -->
<text macro="title" suffix=" [computer program]" />
</group>
<group delimiter=" ">
<text term="version" text-case="capitalize-first"/>
<text variable="version"/>
</group>
<text variable="URL"/>
</group>
</else-if>
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<group delimiter=". ">
<text macro="title" prefix=" "/>
Expand Down

0 comments on commit 9cc3797

Please sign in to comment.