commit 8d583926578b2e0d077a93a00517390487df30ac
parent 73a9db59fb8ac4ddd7a1622b42283aded549fe91
Author: Bruce D'Arcus <bdarcus@gmail.com>
Date: Wed, 9 Jan 2008 18:30:39 +0000
updated style to rely more on macros; need testing
Diffstat:
| M | csl/apa.csl | | | 166 | +++++++++++++++++++++++++++++++++++++++---------------------------------------- |
1 file changed, 82 insertions(+), 84 deletions(-)
diff --git a/csl/apa.csl b/csl/apa.csl
@@ -12,18 +12,18 @@
<category term="psychology"/>
<category term="generic-base"/>
<category term="author-date"/>
- <updated></updated>
+ <updated/>
</info>
<macro name="editor-translator">
- <names variable="editor translator" prefix="(" suffix=")" delimiter=", ">
+ <names variable="editor translator" delimiter=", ">
<name and="symbol" initialize-with=". " delimiter=", "/>
- <label form="short" prefix=", " text-case="capitalize-first" suffix="."/>
+ <label form="short" prefix=" (" text-case="capitalize-first" suffix=".)"/>
</names>
</macro>
<macro name="author">
<names variable="author">
- <name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with=". "
- delimiter=", " delimiter-precedes-last="always"/>
+ <name name-as-sort-order="all" and="symbol" sort-separator=", "
+ initialize-with=". " delimiter=", " delimiter-precedes-last="always"/>
<label form="short" prefix=" (" suffix=".)" text-case="capitalize-first"/>
<substitute>
<names variable="editor"/>
@@ -52,21 +52,21 @@
<macro name="access">
<choose>
<if variable="DOI">
- <text variable="DOI" prefix="doi: "/>
+ <text variable="DOI" prefix="doi: "/>
</if>
<else>
- <group>
- <text term="retrieved" text-case="capitalize-first" suffix=" "/>
- <date variable="accessed" suffix=", ">
- <date-part name="month" suffix=" "/>
- <date-part name="day" suffix=", "/>
- <date-part name="year"/>
- </date>
- <group>
- <text term="from" suffix=" "/>
- <text variable="URL"/>
- </group>
- </group>
+ <group>
+ <text term="retrieved" text-case="capitalize-first" suffix=" "/>
+ <date variable="accessed" suffix=", ">
+ <date-part name="month" suffix=" "/>
+ <date-part name="day" suffix=", "/>
+ <date-part name="year"/>
+ </date>
+ <group>
+ <text term="from" suffix=" "/>
+ <text variable="URL"/>
+ </group>
+ </group>
</else>
</choose>
</macro>
@@ -90,6 +90,55 @@
<text variable="event"/>
<text variable="event-place" prefix=", "/>
</macro>
+ <macro name="issued">
+ <group prefix=" (" suffix=").">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ <choose>
+ <if type="book chapter article-journal" match="none">
+ <date variable="issued">
+ <date-part prefix=", " name="month"/>
+ <date-part prefix=" " name="day"/>
+ </date>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="issued-year">
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </macro>
+ <macro name="citation-locator">
+ <group>
+ <label variable="locator" include-period="true" form="short"/>
+ <text variable="locator" prefix=" "/>
+ </group>
+ </macro>
+ <macro name="container-prefix">
+ <choose>
+ <if type="chapter">
+ <text term="in" text-case="capitalize-first" suffix=" "/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="pages">
+ <choose>
+ <if type="chapter">
+ <group prefix=" (" suffix=")">
+ <label variable="page" form="short" include-period="true" suffix=" "/>
+ <text variable="page"/>
+ </group>
+ </if>
+ <else>
+ <text variable="page" prefix=", "/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="edition">
+ <text variable="edition"/>
+ </macro>
<citation>
<option name="et-al-min" value="6"/>
<option name="et-al-use-first" value="1"/>
@@ -106,13 +155,8 @@
<layout prefix="(" suffix=")" delimiter="; ">
<group delimiter=", ">
<text macro="author-short"/>
- <date variable="issued">
- <date-part name="year"/>
- </date>
- <group>
- <label variable="locator" include-period="true" form="short"/>
- <text variable="locator" prefix=" "/>
- </group>
+ <text macro="issued-year"/>
+ <text macro="citation-locator"/>
</group>
</layout>
</citation>
@@ -124,66 +168,20 @@
<key macro="author"/>
<key variable="issued"/>
</sort>
- <layout>
+ <layout suffix=".">
<text macro="author" suffix="."/>
- <group prefix=" (" suffix=").">
- <date variable="issued">
- <date-part name="year"/>
- </date>
- <choose>
- <if type="book chapter article-journal" match="none">
- <date variable="issued">
- <date-part prefix=", " name="month"/>
- <date-part prefix=" " name="day"/>
- </date>
- </if>
- </choose>
- </group>
- <choose>
- <if type="book">
- <group suffix=".">
- <text macro="title" prefix=" "/>
- <text macro="editor-translator" prefix=" "/>
- <text variable="edition" prefix=" (" suffix=")"/>
- </group>
- <text prefix=" " suffix="." macro="publisher"/>
- </if>
- <else-if type="chapter">
- <text macro="title" prefix=" "/>
- <group class="container" prefix=". ">
- <text term="in" text-case="capitalize-first" suffix=" "/>
- <group delimiter=", " suffix=".">
- <names variable="editor translator" delimiter=", ">
- <name and="symbol" sort-separator=", " initialize-with=". "/>
- <label form="short" prefix=" (" suffix=".)" text-case="capitalize-first"/>
- </names>
- <group delimiter=" ">
- <text variable="container-title" font-style="italic"/>
- <group prefix="(" suffix=")">
- <label variable="page" form="short" include-period="true" suffix=" "/>
- <text variable="page"/>
- </group>
- </group>
- </group>
- <text variable="collection-title" prefix=" " suffix="."/>
- <text macro="publisher" prefix=" " suffix="."/>
- </group>
- </else-if>
- <else>
- <group suffix=".">
- <text macro="title" prefix=" "/>
- <text macro="editor-translator" prefix=" "/>
- </group>
- <group class="container" prefix=" " suffix=".">
- <text variable="container-title" font-style="italic"/>
- <group prefix=", ">
- <text variable="volume" font-style="italic"/>
- </group>
- <text variable="page" prefix=", "/>
- </group>
- </else>
- </choose>
- <text prefix=" " macro="access"/>
+ <text macro="issued"/>
+ <text macro="title" prefix=" "/>
+ <text macro="container-prefix" prefix=" "/>
+ <text macro="editor-translator" prefix=" "/>
+ <text variable="container-title" prefix=", " font-style="italic"/>
+ <text variable="collection-title" prefix=", " suffix="."/>
+ <text macro="edition" prefix=" (" suffix=")"/>
+ <text variable="volume" prefix=", "/>
+ <text variable="issue" prefix="(" suffix=")"/>
+ <text macro="pages"/>
+ <text macro="publisher" prefix=". "/>
+ <text macro="access" prefix=". " />
</layout>
</bibliography>
</style>