- add Chicago Manual of Style (Note with Bibliography)
- only use numbers when outputting note citations - fix type conditionals
This commit is contained in:
parent
e5575d0643
commit
9ae9045664
|
@ -474,7 +474,7 @@ Zotero.CSL.prototype.createBibliography = function(items, format) {
|
||||||
|
|
||||||
var index = 0;
|
var index = 0;
|
||||||
if(format == "HTML") {
|
if(format == "HTML") {
|
||||||
if(this.class == "note") {
|
if(this.class == "note" && this._bib == this._cit) {
|
||||||
output += '<ol>\r\n';
|
output += '<ol>\r\n';
|
||||||
} else if(this._bib.hangingIndent) {
|
} else if(this._bib.hangingIndent) {
|
||||||
output += '<div style="margin-left:0.5in;text-indent:-0.5in;">\r\n';
|
output += '<div style="margin-left:0.5in;text-indent:-0.5in;">\r\n';
|
||||||
|
@ -513,19 +513,19 @@ Zotero.CSL.prototype.createBibliography = function(items, format) {
|
||||||
string += '<span class="Z3988" title="'+coins.replace("&", "&")+'"></span>';
|
string += '<span class="Z3988" title="'+coins.replace("&", "&")+'"></span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.class == "note") {
|
if(this.class == "note" && this._bib == this._cit) {
|
||||||
output += "<li>"+string+"</li>\r\n";
|
output += "<li>"+string+"</li>\r\n";
|
||||||
} else {
|
} else {
|
||||||
output += "<p>"+string+"</p>\r\n";
|
output += "<p>"+string+"</p>\r\n";
|
||||||
}
|
}
|
||||||
} else if(format == "RTF") {
|
} else if(format == "RTF") {
|
||||||
if(this.class == "note") {
|
if(this.class == "note" && this._bib == this._cit) {
|
||||||
index++;
|
index++;
|
||||||
output += index+". ";
|
output += index+". ";
|
||||||
}
|
}
|
||||||
output += string+"\\\r\n\\\r\n";
|
output += string+"\\\r\n\\\r\n";
|
||||||
} else {
|
} else {
|
||||||
if(format == "Text" && this.class == "note") {
|
if(format == "Text" && this.class == "note" && this._bib == this._cit) {
|
||||||
index++;
|
index++;
|
||||||
output += index+". ";
|
output += index+". ";
|
||||||
}
|
}
|
||||||
|
@ -536,7 +536,7 @@ Zotero.CSL.prototype.createBibliography = function(items, format) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(format == "HTML") {
|
if(format == "HTML") {
|
||||||
if(this.class == "note") {
|
if(this.class == "note" && this._bib == this._cit) {
|
||||||
output += '</ol>';
|
output += '</ol>';
|
||||||
} else if(this._bib.hangingIndent) {
|
} else if(this._bib.hangingIndent) {
|
||||||
output += '</div>';
|
output += '</div>';
|
||||||
|
@ -1273,11 +1273,12 @@ Zotero.CSL.prototype._getFieldValue = function(name, element, item, formattedStr
|
||||||
if(condition.name == "if" || condition.name == "else-if") {
|
if(condition.name == "if" || condition.name == "else-if") {
|
||||||
// evaluate condition for if/else if
|
// evaluate condition for if/else if
|
||||||
if(condition.type) {
|
if(condition.type) {
|
||||||
|
var typeNames = this._getTypeFromItem(item);
|
||||||
|
for each(var typeName in typeNames) {
|
||||||
if(typeName == condition.type) {
|
if(typeName == condition.type) {
|
||||||
status = true;
|
status = true;
|
||||||
} else if(Zotero.CSL.Global.typeInheritance[typeName] &&
|
break;
|
||||||
Zotero.CSL.Global.typeInheritance[typeName] == condition.type) {
|
}
|
||||||
status = true;
|
|
||||||
}
|
}
|
||||||
} else if(condition.field) {
|
} else if(condition.field) {
|
||||||
var testString = new Zotero.CSL.FormattedString(this, "Text");
|
var testString = new Zotero.CSL.FormattedString(this, "Text");
|
||||||
|
|
187
scrapers.sql
187
scrapers.sql
|
@ -1,4 +1,4 @@
|
||||||
-- 150
|
-- 151
|
||||||
|
|
||||||
-- ***** BEGIN LICENSE BLOCK *****
|
-- ***** BEGIN LICENSE BLOCK *****
|
||||||
--
|
--
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
-- Set the following timestamp to the most recent scraper update date
|
-- Set the following timestamp to the most recent scraper update date
|
||||||
REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-12-19 23:51:00'));
|
REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-12-20 03:57:00'));
|
||||||
|
|
||||||
REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b3.r1', '', '2006-12-15 03:40:00', 1, 100, 4, 'Amazon.com', 'Sean Takats', '^https?://(?:www\.)?amazon',
|
REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b3.r1', '', '2006-12-15 03:40:00', 1, 100, 4, 'Amazon.com', 'Sean Takats', '^https?://(?:www\.)?amazon',
|
||||||
'function detectWeb(doc, url) {
|
'function detectWeb(doc, url) {
|
||||||
|
@ -9677,7 +9677,7 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/apa.csl', '200
|
||||||
</bibliography>
|
</bibliography>
|
||||||
</style>');
|
</style>');
|
||||||
|
|
||||||
REPLACE INTO "csl" VALUES('http://www.zotero.org/namespaces/CSL/chicago-author-date.csl', '2006-12-19 23:51:00', 'Chicago Manual of Style (Author-Date)',
|
REPLACE INTO "csl" VALUES('http://www.zotero.org/namespaces/CSL/chicago-author-date.csl', '2006-12-20 03:33:00', 'Chicago Manual of Style (Author-Date)',
|
||||||
'<?xml version="1.0" encoding="UTF-8"?>
|
'<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="author-date" xml:lang="en">
|
<style xmlns="http://purl.org/net/xbiblio/csl" class="author-date" xml:lang="en">
|
||||||
<info>
|
<info>
|
||||||
|
@ -9687,7 +9687,7 @@ REPLACE INTO "csl" VALUES('http://www.zotero.org/namespaces/CSL/chicago-author-d
|
||||||
<name>Simon Kornblith</name>
|
<name>Simon Kornblith</name>
|
||||||
<email>simon@simonster.com</email>
|
<email>simon@simonster.com</email>
|
||||||
</author>
|
</author>
|
||||||
<updated>2006-09-04T20:27:00+05:00</updated>
|
<updated>2006-12-20T03:33:00+05:00</updated>
|
||||||
<summary>The author-date variant of the Chicago style.</summary>
|
<summary>The author-date variant of the Chicago style.</summary>
|
||||||
</info>
|
</info>
|
||||||
<defaults>
|
<defaults>
|
||||||
|
@ -9697,7 +9697,7 @@ REPLACE INTO "csl" VALUES('http://www.zotero.org/namespaces/CSL/chicago-author-d
|
||||||
</contributor>
|
</contributor>
|
||||||
<author name-as-sort-order="first">
|
<author name-as-sort-order="first">
|
||||||
<name and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
|
<name and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
|
||||||
<label form="verb-short" prefix=", " suffix="."/>
|
<label form="short" prefix=", " suffix="."/>
|
||||||
<substitute>
|
<substitute>
|
||||||
<choose>
|
<choose>
|
||||||
<editor/>
|
<editor/>
|
||||||
|
@ -9798,7 +9798,10 @@ REPLACE INTO "csl" VALUES('http://www.zotero.org/namespaces/CSL/chicago-author-d
|
||||||
<editor/>
|
<editor/>
|
||||||
<translator/>
|
<translator/>
|
||||||
</group>
|
</group>
|
||||||
<date prefix=" " suffix="."/>
|
<group class="container" prefix=" " suffix="." delimiter=", ">
|
||||||
|
<titles relation="container" font-style="italic"/>
|
||||||
|
<date/>
|
||||||
|
</group>
|
||||||
<access prefix=" "/>
|
<access prefix=" "/>
|
||||||
</type>
|
</type>
|
||||||
<type name="article-journal">
|
<type name="article-journal">
|
||||||
|
@ -9838,7 +9841,7 @@ REPLACE INTO "csl" VALUES('http://www.zotero.org/namespaces/CSL/chicago-author-d
|
||||||
</bibliography>
|
</bibliography>
|
||||||
</style>');
|
</style>');
|
||||||
|
|
||||||
REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/chicago-note.csl', '2006-10-02 17:00:00', 'Chicago Manual of Style (Note)',
|
REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/chicago-note.csl', '2006-12-20 04:20:00', 'Chicago Manual of Style (Note without Bibliography)',
|
||||||
'<?xml version="1.0" encoding="UTF-8"?>
|
'<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?oxygen RNGSchema="../schema/trunk/csl.rnc" type="compact"?>
|
<?oxygen RNGSchema="../schema/trunk/csl.rnc" type="compact"?>
|
||||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" xml:lang="en">
|
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" xml:lang="en">
|
||||||
|
@ -9857,7 +9860,7 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/chicago-note.c
|
||||||
<name>Johan Kool</name>
|
<name>Johan Kool</name>
|
||||||
<email>johankool@users.sourceforge.net</email>
|
<email>johankool@users.sourceforge.net</email>
|
||||||
</contributor>
|
</contributor>
|
||||||
<updated>2006-09-04T20:27:00+05:00</updated>
|
<updated>2006-12-20T04:20:00+05:00</updated>
|
||||||
<summary>The note-without-bibliography variant of the Chicago style.</summary>
|
<summary>The note-without-bibliography variant of the Chicago style.</summary>
|
||||||
</info>
|
</info>
|
||||||
<defaults>
|
<defaults>
|
||||||
|
@ -9971,12 +9974,178 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/chicago-note.c
|
||||||
</item>
|
</item>
|
||||||
<item position="subsequent" ibid="true">
|
<item position="subsequent" ibid="true">
|
||||||
<author/>
|
<author/>
|
||||||
<title prefix=", "/>
|
<conditional>
|
||||||
|
<if type="book">
|
||||||
|
<titles prefix=", " font-style="italic" form="short"/>
|
||||||
|
</if><else>
|
||||||
|
<titles prefix=", " quotes="true" form="short"/>
|
||||||
|
</else>
|
||||||
|
</conditional>
|
||||||
|
<pages prefix=", "/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</citation>
|
</citation>
|
||||||
</style>');
|
</style>');
|
||||||
|
|
||||||
|
REPLACE INTO "csl" VALUES('http://www.zotero.org/namespaces/CSL/chicago-note-bibliography.csl', '2006-12-20 03:57:00', 'Chicago Manual of Style (Note with Bibliography)',
|
||||||
|
'<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" xml:lang="en">
|
||||||
|
<info>
|
||||||
|
<title>Chicago Note With Bibliography Style</title>
|
||||||
|
<id>http://www.zotero.org/namespaces/CSL/chicago-note-bibliography.csl</id>
|
||||||
|
<author>
|
||||||
|
<name>Simon Kornblith</name>
|
||||||
|
<email>simon@simonster.com</email>
|
||||||
|
</author>
|
||||||
|
<updated>2006-12-20T03:29:00+05:00</updated>
|
||||||
|
<summary>The note-with-bibliography variant of the Chicago style.</summary>
|
||||||
|
</info>
|
||||||
|
<defaults>
|
||||||
|
<contributor name-as-sort-order="no">
|
||||||
|
<label form="verb" suffix=" "/>
|
||||||
|
<name and="text" delimiter=", "/>
|
||||||
|
</contributor>
|
||||||
|
<author name-as-sort-order="first">
|
||||||
|
<name and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
|
||||||
|
<label form="short" prefix=", " suffix="."/>
|
||||||
|
<substitute>
|
||||||
|
<choose>
|
||||||
|
<editor/>
|
||||||
|
<translator/>
|
||||||
|
<titles relation="container" font-style="italic"/>
|
||||||
|
<titles/>
|
||||||
|
</choose>
|
||||||
|
</substitute>
|
||||||
|
</author>
|
||||||
|
<locator>
|
||||||
|
<number/>
|
||||||
|
</locator>
|
||||||
|
<identifier>
|
||||||
|
<number/>
|
||||||
|
</identifier>
|
||||||
|
<titles>
|
||||||
|
<title/>
|
||||||
|
</titles>
|
||||||
|
<date>
|
||||||
|
<month suffix=" " text-transform="capitalize"/>
|
||||||
|
<day suffix=", "/>
|
||||||
|
<year/>
|
||||||
|
</date>
|
||||||
|
<publisher>
|
||||||
|
<place suffix=": "/>
|
||||||
|
<name/>
|
||||||
|
</publisher>
|
||||||
|
<access>
|
||||||
|
<url/>
|
||||||
|
<text term-name="accessed" prefix=" (" suffix=" "/>
|
||||||
|
<date suffix=")">
|
||||||
|
<month suffix=" " text-transform="capitalize"/>
|
||||||
|
<day suffix=", "/>
|
||||||
|
<year/>
|
||||||
|
</date>
|
||||||
|
</access>
|
||||||
|
</defaults>
|
||||||
|
<citation suffix="." delimiter="; ">
|
||||||
|
<et-al min-authors="3" use-first="1"/>
|
||||||
|
<layout>
|
||||||
|
<item suffix=".">
|
||||||
|
<author/>
|
||||||
|
<conditional>
|
||||||
|
<if type="book">
|
||||||
|
<titles prefix=", " font-style="italic" form="short"/>
|
||||||
|
</if><else>
|
||||||
|
<titles prefix=", " quotes="true" form="short"/>
|
||||||
|
</else>
|
||||||
|
</conditional>
|
||||||
|
<pages prefix=", "/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</citation>
|
||||||
|
<bibliography hanging-indent="true" subsequent-author-substitute="---">
|
||||||
|
<sort algorithm="author-date"/>
|
||||||
|
<et-al min-authors="6" use-first="6"/>
|
||||||
|
<layout>
|
||||||
|
<list>
|
||||||
|
<heading>
|
||||||
|
<text term-name="works cited"/>
|
||||||
|
</heading>
|
||||||
|
</list>
|
||||||
|
<item suffix=".">
|
||||||
|
<choose>
|
||||||
|
<type name="book">
|
||||||
|
<author suffix="."/>
|
||||||
|
<titles prefix=" " suffix="." font-style="italic"/>
|
||||||
|
<group prefix=" " suffix="." delimiter=", " text-transform="capitalize">
|
||||||
|
<editor/>
|
||||||
|
<translator/>
|
||||||
|
</group>
|
||||||
|
<group prefix=" " suffix="." delimiter=", ">
|
||||||
|
<publisher/>
|
||||||
|
<date>
|
||||||
|
<year/>
|
||||||
|
</date>
|
||||||
|
</group>
|
||||||
|
<access prefix=" "/>
|
||||||
|
</type>
|
||||||
|
<type name="chapter">
|
||||||
|
<author suffix="."/>
|
||||||
|
<titles prefix=" " suffix="." quotes="true"/>
|
||||||
|
<group class="container" suffix=".">
|
||||||
|
<text prefix=" " term-name="in" text-transform="capitalize"/>
|
||||||
|
<titles prefix=" " relation="container" font-style="italic"/>
|
||||||
|
<editor prefix=", "/>
|
||||||
|
<translator prefix=", "/>
|
||||||
|
<pages prefix=", "/>
|
||||||
|
<group prefix=". " delimiter=", ">
|
||||||
|
<publisher/>
|
||||||
|
<date>
|
||||||
|
<year/>
|
||||||
|
</date>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<access prefix=" "/>
|
||||||
|
</type>
|
||||||
|
<type name="article">
|
||||||
|
<author suffix="."/>
|
||||||
|
<titles prefix=" " quotes="true"/>
|
||||||
|
<group prefix=" " suffix="." delimiter=", " text-transform="capitalize">
|
||||||
|
<editor/>
|
||||||
|
<translator/>
|
||||||
|
</group>
|
||||||
|
<group class="container" prefix=" " suffix="." delimiter=", ">
|
||||||
|
<titles prefix=" " relation="container" font-style="italic"/>
|
||||||
|
<date/>
|
||||||
|
</group>
|
||||||
|
<access prefix=" "/>
|
||||||
|
</type>
|
||||||
|
<type name="article-journal">
|
||||||
|
<author suffix="."/>
|
||||||
|
<titles prefix=" " suffix="." quotes="true"/>
|
||||||
|
<group prefix=" " suffix="." delimiter=", " text-transform="capitalize">
|
||||||
|
<editor/>
|
||||||
|
<translator/>
|
||||||
|
</group>
|
||||||
|
<group class="container" prefix=" " suffix=".">
|
||||||
|
<titles relation="container" font-style="italic"/>
|
||||||
|
<volume prefix=" "/>
|
||||||
|
<issue prefix=", no. "/>
|
||||||
|
<conditional>
|
||||||
|
<if field="date">
|
||||||
|
<date prefix=" (" suffix=")"/>
|
||||||
|
<pages prefix=": "/>
|
||||||
|
</if><else>
|
||||||
|
<pages prefix=":"/>
|
||||||
|
</else>
|
||||||
|
</conditional>
|
||||||
|
</group>
|
||||||
|
<access prefix=" "/>
|
||||||
|
</type>
|
||||||
|
</choose>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</bibliography>
|
||||||
|
</style>');
|
||||||
|
|
||||||
REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/mla.csl', '2006-10-23 00:21:00', 'Modern Language Association',
|
REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/mla.csl', '2006-10-23 00:21:00', 'Modern Language Association',
|
||||||
'<?xml version="1.0" encoding="UTF-8"?>
|
'<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?oxygen RNGSchema="../schema/trunk/csl.rnc" type="compact"?>
|
<?oxygen RNGSchema="../schema/trunk/csl.rnc" type="compact"?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user