Skip to content

Commit

Permalink
Added rendering for webpage
Browse files Browse the repository at this point in the history
  • Loading branch information
liammr committed Nov 9, 2011
1 parent 0ce5fb2 commit 2ca358d
Showing 1 changed file with 58 additions and 46 deletions.
104 changes: 58 additions & 46 deletions mcgill-guide-v7.csl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</contributor>
<updated>2008-10-29T21:01:24+00:00</updated>
<rights>This work is licensed under a Creative Commons
Attribution-Share Alike 3.0 Unported License
http://creativecommons.org/licenses/by-sa/3.0/</rights>
Attribution-Share Alike 3.0 Unported License
http://creativecommons.org/licenses/by-sa/3.0/</rights>
<category field="law"/>
<category citation-format="note"/>
</info>
Expand Down Expand Up @@ -76,9 +76,9 @@ http://creativecommons.org/licenses/by-sa/3.0/</rights>
<text variable="genre"/>
</macro>
<macro name="issued-long">
<date variable="issued">
<date-part name="day" suffix=" "/>
<date-part name="month" form="long" suffix=" "/>
<date variable="issued" delimiter=" ">
<date-part name="day" />
<date-part name="month" form="long" />
<date-part name="year" form="long"/>
</date>
</macro>
Expand Down Expand Up @@ -108,9 +108,9 @@ http://creativecommons.org/licenses/by-sa/3.0/</rights>
</else>
</choose>
</macro>
<!-- the 'rendering' macros mostly check if called from w/i bibliography so that author gets printed
right. Only actually need to check for 'first' because w/i cite,
all the other tests should have been done... -->
<!-- the 'rendering' macros mostly check if called from w/i bibliography so that author gets printed
right. Only actually need to check for 'first' because w/i cite,
all the other tests should have been done... -->
<macro name="render-chapter">
<group delimiter=" ">
<text variable="title" quotes="true"/>
Expand All @@ -131,16 +131,16 @@ all the other tests should have been done... -->
<text variable="issue" prefix=":"/>
<text macro="container-title" prefix=" "/>
<text variable="page-first" prefix=" "/>
<text macro="internet-location"/>
<text macro="internet-location"/>
</macro>
<macro name="render-book">
<group delimiter=", ">
<text variable="title" font-style="italic" />
<text macro="edition"/>
<text macro="translator"/>
<text macro="editor"/>
</group>
<text macro="publisher-place-year"/>
<group delimiter=", ">
<text variable="title" font-style="italic" />
<text macro="edition"/>
<text macro="translator"/>
<text macro="editor"/>
</group>
<text macro="publisher-place-year"/>
</macro>
<macro name="render-thesis">
<group delimiter=" ">
Expand All @@ -155,18 +155,29 @@ all the other tests should have been done... -->
<text variable="title" quotes="true" suffix=","/>
<text macro="container-title" font-style="italic"/>
<text macro="issued-long" prefix="(" suffix=")"/>
<text variable="page-first"/>
<text macro="internet-location"/>
<text variable="page-first"/>
</group>
<text macro="internet-location"/>
</macro>
<macro name="render-webpage">
<group delimiter=" ">
<text variable="title" quotes="true" suffix=","/>
<text macro="issued-long" prefix="(" suffix=")"/>
</group>
<group delimiter=" ">
<text term="online" prefix=", " suffix=":" />
<text macro="container-title" font-style="italic"/>
<text variable="URL" prefix="&lt;" suffix="&gt;"/>
</group>
</macro>
<!-- cases and bills render the same for biblio and (first) cite -->
<macro name="render-bill">
<group delimiter=" ">
<group delimiter=", ">
<text variable="title" font-style="italic"/>
<text macro="author-note" strip-periods="true"/>
<text macro="issued-long"/>
<text macro="container-title"/>
<text variable="title" font-style="italic"/>
<text macro="author-note" strip-periods="true"/>
<text macro="issued-long"/>
<text macro="container-title"/>
</group>
<text macro="references" prefix="(" suffix=")"/>
<text variable="title" prefix="[" suffix="]" font-style="italic" form="short"/>
Expand All @@ -176,11 +187,11 @@ all the other tests should have been done... -->
<group delimiter=", ">
<group delimiter=" ">
<text variable="title" font-style="italic"/>
<choose>
<if variable="volume">
<choose>
<if variable="volume">
<date form="text" variable="issued" date-parts="year" prefix="(" suffix=")"/>
</if>
</choose>
</if>
</choose>
</group>
<group delimiter=" ">
<text variable="volume"/>
Expand Down Expand Up @@ -211,7 +222,7 @@ all the other tests should have been done... -->
</macro>
<macro name="short-form">
<!-- Hump to overcome: cannot check against existence of short title.
Not implemented: "cited to" for cases, construct short casenames, adding ref to article -->
Not implemented: "cited to" for cases, construct short casenames, adding ref to article -->
<choose>
<if type="bill legal_case" match="none">
<names variable="author">
Expand Down Expand Up @@ -251,33 +262,28 @@ Not implemented: "cited to" for cases, construct short casenames, adding ref to
<else-if position="ibid">
<text term="ibid" font-style="italic" strip-periods="true" text-case="capitalize-first"/>
</else-if>
<!-- For future versions? Cannot test for whether short form exists
(Supra should be capitalized if no short form) -->
<!-- For future versions? Cannot test for whether short form exists (Supra should be capitalized if no short form) -->
<else-if position="subsequent">
<group delimiter=" ">
<group delimiter=", ">
<text macro="short-form"/>
<text value="supra" font-style="italic"/>
</group>
<text value="note"/>
<text variable="first-reference-note-number"/>
<text macro="pinpoint"/>
<group delimiter=", ">
<text macro="short-form"/>
<text value="supra" font-style="italic"/>
</group>
<text value="note"/>
<text variable="first-reference-note-number"/>
<text macro="pinpoint"/>
</group>
</else-if>
<else>
<group>
<group delimiter=", ">
<choose>
<if type="bill legal_case" match="any">
<choose>
<if type="bill">
<text macro="render-bill"/>
</if>
<else-if type="legal_case">
<text macro="render-case"/>
</else-if>
</choose>
<if type="bill">
<text macro="render-bill"/>
</if>
<else-if type="legal_case">
<text macro="render-case"/>
</else-if>
<else>
<text macro="author-note" strip-periods="true"/>
<choose>
Expand All @@ -292,6 +298,9 @@ Not implemented: "cited to" for cases, construct short casenames, adding ref to
</else-if>
<else-if type="article-newspaper">
<text macro="render-article-newspaper"/>
</else-if>
<else-if type="webpage">
<text macro="render-webpage"/>
</else-if>
<else>
<group delimiter=" ">
Expand Down Expand Up @@ -349,6 +358,9 @@ Not implemented: "cited to" for cases, construct short casenames, adding ref to
</else-if>
<else-if type="book">
<text macro="render-book"/>
</else-if>
<else-if type="webpage">
<text macro="render-webpage"/>
</else-if>
<else>
<group>
Expand All @@ -358,7 +370,7 @@ Not implemented: "cited to" for cases, construct short casenames, adding ref to
<text macro="translator"/>
<text macro="editor"/>
</group>
<text macro="publisher-place-year"/>
<text macro="publisher-place-year"/>
</group>
</else>
</choose>
Expand Down

0 comments on commit 2ca358d

Please sign in to comment.