Skip to content
Permalink
Browse files

Conditional url (#3619)

* Update brain.csl closes #3616  

https://forums.zotero.org/discussion/72802/internet-inserted-to-ref-row#latest

* Conditional URL: acta-anaesthesiologica-scandinavica

* Add post and blogpost to accident-analysis-and-prevention
  • Loading branch information...
bwiernik authored and adam3smith committed Jul 26, 2018
1 parent a10698f commit cc61e8b259c26919742662145b6af7ada323837b
Showing with 87 additions and 63 deletions.
  1. +1 −1 accident-analysis-and-prevention.csl
  2. +62 −46 acta-anaesthesiologica-scandinavica.csl
  3. +24 −16 brain.csl
@@ -76,7 +76,7 @@
<if variable="DOI">
<text variable="DOI" prefix="doi:"/>
</if>
<else-if type="webpage">
<else-if type="post post-weblog webpage">
<group delimiter=" ">
<text value="URL"/>
<text variable="URL"/>
@@ -10,6 +10,10 @@
<name>Juho Heinonen</name>
<email>juho.aleksi.heinonen@gmail.com</email>
</author>
<contributor>
<name>Brenton M. Wiernik</name>
<email>zotero@wiernik.org</email>
</contributor>
<category citation-format="numeric"/>
<category field="medicine"/>
<issn>0001-5172</issn>
@@ -18,7 +22,7 @@
<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>
<macro name="author">
<names variable="author" suffix=". ">
<names variable="author">
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
<label form="long" prefix=", " text-case="lowercase"/>
<substitute>
@@ -27,7 +31,7 @@
</names>
</macro>
<macro name="editor">
<names variable="editor" suffix=". ">
<names variable="editor">
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
<label form="long" prefix=", " text-case="lowercase"/>
</names>
@@ -43,33 +47,64 @@
</group>
</macro>
<macro name="access">
<group>
<text value="Available from: "/>
<text variable="URL"/>
<choose>
<if type="bill book graphic legal_case legislation motion_picture song" match="any">
<text value="."/>
</if>
<else-if variable="page">
<group prefix="; " delimiter=": " suffix=".">
<text variable="volume"/>
<text variable="page"/>
</group>
</else-if>
<else-if variable="DOI">
<text variable="volume" prefix="; "/>
<text variable="DOI" prefix=". doi: "/>
</else-if>
<else-if variable="URL">
<group prefix=" " delimiter=" ">
<text macro="accessed-date"/>
<text value="Available from:"/>
<text variable="URL"/>
</group>
</else-if>
</choose>
</macro>
<macro name="accessed-date">
<group prefix="[" suffix="]." delimiter=" ">
<text term="cited" text-case="lowercase"/>
<date variable="accessed" delimiter=" ">
<date-part name="year"/>
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day"/>
</date>
</group>
</macro>
<macro name="accessed-date">
<macro name="journal-date">
<date variable="issued">
<date-part name="year"/>
</date>
<choose>
<if variable="URL">
<group prefix="[" suffix="]" delimiter=" ">
<text term="cited" text-case="lowercase"/>
<date variable="accessed">
<date-part name="year"/>
<date-part name="month" prefix=" " form="short" strip-periods="true"/>
<date-part name="day" prefix=" "/>
</date>
</group>
<if variable="page" match="none">
<date variable="issued" prefix=" " delimiter=" ">
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day"/>
</date>
</if>
</choose>
</macro>
<macro name="journal-title">
<choose>
<if type="article-journal article-magazine" match="any">
<group suffix=" ">
<group>
<text variable="container-title" form="short" strip-periods="true"/>
<choose>
<if variable="URL">
<text term="internet" prefix=" [" suffix="]" text-case="capitalize-first"/>
<choose>
<if variable="page DOI" match="none">
<text term="internet" prefix=" [" suffix="]" text-case="capitalize-first"/>
</if>
</choose>
</if>
</choose>
</group>
@@ -86,7 +121,11 @@
<if type="article-journal article-magazine" match="none">
<choose>
<if variable="URL">
<text term="internet" prefix="[" suffix="]" text-case="capitalize-first"/>
<choose>
<if variable="page DOI" type="bill book graphic legal_case legislation motion_picture song" match="none">
<text term="internet" prefix="[" suffix="]" text-case="capitalize-first"/>
</if>
</choose>
</if>
</choose>
</if>
@@ -117,8 +156,8 @@
<bibliography second-field-align="flush">
<layout>
<text variable="citation-number" suffix=". "/>
<text macro="author"/>
<text macro="title" suffix=". "/>
<text macro="author" suffix="."/>
<text macro="title" suffix="." prefix=" "/>
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<group prefix=" " delimiter=" ">
@@ -127,39 +166,16 @@
</group>
</if>
<else-if type="chapter paper-conference" match="any">
<group prefix=" " suffix=". ">
<group prefix=" " suffix=".">
<text term="in" suffix=": " text-case="capitalize-first"/>
<text macro="editor"/>
<text variable="container-title"/>
<text variable="container-title" prefix=". "/>
</group>
<text macro="publisher" prefix=" "/>
<group prefix=" " delimiter=" " suffix=".">
<label variable="page" plural="never"/>
<text variable="page"/>
</group>
</else-if>
<else>
<text macro="journal-title"/>
<group suffix=" ">
<date variable="issued">
<date-part name="year"/>
</date>
<text macro="accessed-date" prefix=" "/>
</group>
<group>
<text variable="volume" prefix="; "/>
<choose>
<if variable="volume"/>
<else-if variable="DOI">
<date variable="issued" delimiter=" ">
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day" suffix=". "/>
</date>
<text variable="DOI" prefix="doi: "/>
</else-if>
</choose>
<text variable="page" prefix=": " suffix=". "/>
</group>
<text macro="journal-date" prefix=" "/>
</else>
</choose>
<text macro="access"/>
@@ -4,7 +4,7 @@
<title>Brain</title>
<id>http://www.zotero.org/styles/brain</id>
<link href="http://www.zotero.org/styles/brain" rel="self"/>
<link href="http://www.oxfordjournals.org/our_journals/brainj/for_authors/general.html" rel="documentation"/>
<link href="https://academic.oup.com/brain/pages/General_Instructions" rel="documentation"/>
<author>
<name>Rintze Zelle</name>
<uri>http://twitter.com/rintzezelle</uri>
@@ -72,20 +72,24 @@
<macro name="access">
<choose>
<if variable="URL">
<group delimiter=" ">
<group prefix="[" suffix="]" delimiter=" ">
<text term="cited"/>
<date variable="accessed">
<date-part name="year"/>
<date-part name="month" prefix=" " form="short" strip-periods="true"/>
<date-part name="day" prefix=" "/>
</date>
</group>
<group>
<text value="Available from: "/>
<text variable="URL"/>
</group>
</group>
<choose>
<if variable="page" match="none">
<group delimiter=" ">
<group prefix="[" suffix="]" delimiter=" ">
<text term="cited"/>
<date variable="accessed">
<date-part name="year"/>
<date-part name="month" prefix=" " form="short" strip-periods="true"/>
<date-part name="day" prefix=" "/>
</date>
</group>
<group>
<text value="Available from: "/>
<text variable="URL"/>
</group>
</group>
</if>
</choose>
</if>
</choose>
</macro>
@@ -94,7 +98,11 @@
<text variable="title"/>
<choose>
<if variable="URL">
<text term="internet" prefix="[" suffix="]" text-case="capitalize-first"/>
<choose>
<if variable="page" match="none">
<text term="internet" prefix="[" suffix="]" text-case="capitalize-first"/>
</if>
</choose>
</if>
</choose>
</group>

0 comments on commit cc61e8b

Please sign in to comment.
You can’t perform that action at this time.