various fixes to citation formatting (mostly Chicago Manual of Style)

This commit is contained in:
Simon Kornblith 2006-09-05 01:09:04 +00:00
parent dd0c537ce1
commit e0f6f023d8
3 changed files with 57 additions and 35 deletions

View File

@ -1014,6 +1014,8 @@ CSL.prototype._formatDate = function(element, date, format) {
} else { } else {
string = date.day.toString(); string = date.day.toString();
} }
} else if(child.name == "text") {
string = this._getTerm(child["term-name"], false, child["form"]);
} }
if(string) { if(string) {
@ -1318,9 +1320,11 @@ CSL.prototype._getFieldValue = function(name, element, item, format, bibCitEleme
data = this._formatLocator(name, element, field, format); data = this._formatLocator(name, element, field, format);
} }
} else if(name == "pages") { } else if(name == "pages") {
var field = item.getField("pages"); if(typeName != "book") {
if(field) { var field = item.getField("pages");
data = this._formatLocator("page", element, field, format); if(field) {
data = this._formatLocator("page", element, field, format);
}
} }
} else if(name == "edition") { } else if(name == "edition") {
data = item.getField("edition"); data = item.getField("edition");

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<terms> <terms xmlns="http://purl.org/net/xbiblio/csl">
<locale xml:lang="en"> <locale xml:lang="en">
<term name="in">in</term> <term name="in">in</term>
<term name="ibid">ibid</term> <term name="ibid">ibid</term>
<term name="accessed">accessed</term> <term name="accessed">accessed</term>
<term name="forthcoming">forthcoming</term> <term name="forthcoming">forthcoming</term>
<term name="references">References</term> <term name="references">References</term>
<term name="no date">nd</term>
<term name="and">and</term> <term name="and">and</term>
<term name="et-al">et al.</term> <term name="et-al">et al.</term>
@ -19,7 +20,7 @@
<multiple>paragraph</multiple> <multiple>paragraph</multiple>
</term> </term>
<term name="volume">volume</term> <term name="volume">volume</term>
<term name="issue">issue</term> <term name="issue">number</term>
<!-- SHORT LOCATOR FORMS --> <!-- SHORT LOCATOR FORMS -->
<term name="page" form="short"> <term name="page" form="short">
@ -31,7 +32,7 @@
<multiple>¶¶</multiple> <multiple>¶¶</multiple>
</term> </term>
<term name="volume" form="short">vol</term> <term name="volume" form="short">vol</term>
<term name="issue" form="short">iss</term> <term name="issue" form="short">no</term>
<!-- LONG ROLE FORMS --> <!-- LONG ROLE FORMS -->
<term name="editor"> <term name="editor">

View File

@ -1,4 +1,4 @@
-- 77 -- 78
-- 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-08-31 22:44:00')); REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-08-31 22:44:00'));
@ -5982,9 +5982,9 @@ function doImport() {
} }
}'); }');
REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/apa.csl', '2006-08-29 23:05:00', 'American Psychological Association', REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/apa.csl', '2006-09-04 20:14:00', 'American Psychological Association',
'<?xml version="1.0" encoding="UTF-8"?> '<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="file:/Users/darcusb/xbiblio/csl/schema/trunk/csl-alt.rnc" type="compact"?> <?oxygen RNGSchema="../schema/trunk/csl.rnc" type="compact"?>
<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>
<title>American Psychological Association</title> <title>American Psychological Association</title>
@ -6002,7 +6002,7 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/apa.csl', '200
<name>Johan Kool</name> <name>Johan Kool</name>
<email>johankool@users.sourceforge.net</email> <email>johankool@users.sourceforge.net</email>
</contributor> </contributor>
<updated>2006-08-29T23:05:00+05:00</updated> <updated>2006-09-04T20:14:00+05:00</updated>
</info> </info>
<defaults> <defaults>
<contributor name-as-sort-order="no"> <contributor name-as-sort-order="no">
@ -6047,7 +6047,6 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/apa.csl', '200
</date> </date>
<text term-name="from"/> <text term-name="from"/>
<url/> <url/>
<date prefix=", "/>
</access> </access>
</defaults> </defaults>
<citation prefix="(" suffix=")" delimiter="; "> <citation prefix="(" suffix=")" delimiter="; ">
@ -6144,7 +6143,7 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/apa.csl', '200
</bibliography> </bibliography>
</style>'); </style>');
REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/chicago-note.csl', '2006-08-30 17:40:00', 'Chicago Manual of Style (Note)', REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/chicago-note.csl', '2006-09-04 20:27:00', 'Chicago Manual of Style (Note)',
'<?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">
@ -6163,7 +6162,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-08-24T16:30:00+01:00</updated> <updated>2006-09-04T20:27: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>
@ -6188,6 +6187,8 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/chicago-note.c
<title/> <title/>
</titles> </titles>
<date> <date>
<month suffix=" " text-transform="capitalize"/>
<day suffix=", "/>
<year/> <year/>
</date> </date>
<publisher> <publisher>
@ -6196,10 +6197,15 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/chicago-note.c
</publisher> </publisher>
<access> <access>
<url/> <url/>
<date prefix=" "/> <date prefix=" (" suffix=")">
<text term-name="accessed" suffix=" "/>
<month suffix=" " text-transform="capitalize"/>
<day suffix=", "/>
<year/>
</date>
</access> </access>
</defaults> </defaults>
<citation suffix="."> <citation suffix="." delimiter="; ">
<et-al min-authors="4" use-first="1"/> <et-al min-authors="4" use-first="1"/>
<layout> <layout>
<item> <item>
@ -6209,11 +6215,15 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/chicago-note.c
<titles font-style="italic"/> <titles font-style="italic"/>
<editor prefix=", "/> <editor prefix=", "/>
<translator prefix=", "/> <translator prefix=", "/>
<titles relation="container" prefix=" "/>
<group prefix=" (" suffix=")" delimiter=", "> <group prefix=" (" suffix=")" delimiter=", ">
<publisher/> <publisher/>
<date/> <date>
<year/>
</date>
</group> </group>
<pages prefix=", "/> <pages prefix=", "/>
<access prefix=", "/>
</type> </type>
<type name="chapter"> <type name="chapter">
<author suffix=", "/> <author suffix=", "/>
@ -6223,30 +6233,37 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/chicago-note.c
<titles relation="container" prefix=" " font-style="italic"/> <titles relation="container" prefix=" " font-style="italic"/>
<editor prefix=", "/> <editor prefix=", "/>
<translator prefix=", "/> <translator prefix=", "/>
<pages prefix=", "/>
<group prefix=" (" suffix=")" delimiter=", "> <group prefix=" (" suffix=")" delimiter=", ">
<publisher/> <publisher/>
<date/> <date>
<year/>
</date>
</group> </group>
<pages prefix=", "/>
<access prefix=", "/>
</group> </group>
</type> </type>
<type name="journal-article">
<author suffix=", "/>
<titles prefix="&#8220;" suffix=",&#8221; "/>
<titles relation="container" font-style="italic"/>
<volume prefix=" "/>
<issue prefix=" (" suffix=")"/>
<pages prefix=": "/>
</type>
<type name="article"> <type name="article">
<author suffix=", "/> <author suffix=", "/>
<titles prefix="&#8220;" suffix=",&#8221; "/> <titles prefix="&#8220;" suffix=",&#8221; "/>
<titles relation="container" font-style="italic" suffix=", "/> <titles relation="container" font-style="italic" suffix=", "/>
<date> <group delimiter=", ">
<day suffix=" "/> <date/>
<month suffix=" " text-transform="capitalize"/> <access/>
<year/> </group>
</date> </type>
<type name="article-journal">
<author suffix=", "/>
<titles prefix="&#8220;" suffix=",&#8221; "/>
<titles relation="container" font-style="italic"/>
<volume prefix=" "/>
<issue prefix=", ">
<label form="short" text-transform="lowercase" suffix=". "/>
<number/>
</issue>
<date prefix=" (" suffix=")"/>
<pages prefix=": "/>
<access prefix=", "/>
</type> </type>
</choose> </choose>
</item> </item>
@ -6258,7 +6275,7 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/chicago-note.c
</citation> </citation>
</style>'); </style>');
REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/mla.csl', '2006-08-29 23:05:00', 'Modern Language Association', REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/mla.csl', '2006-09-04 20:28: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"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="author" xml:lang="en"> <style xmlns="http://purl.org/net/xbiblio/csl" class="author" xml:lang="en">
@ -6278,11 +6295,11 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/mla.csl', '200
<name>Simon Kornblith</name> <name>Simon Kornblith</name>
<email>simon@simonster.com</email> <email>simon@simonster.com</email>
</contributor> </contributor>
<updated>2006-08-29T23:05:00+05:00</updated> <updated>2006-09-04T20:28:00+05:00</updated>
</info> </info>
<defaults> <defaults>
<contributor name-as-sort-order="first"> <contributor name-as-sort-order="first">
<name and="text" sort-separator=", " delimiter=", "/> <name and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
<label form="short" suffix="."/> <label form="short" suffix="."/>
</contributor> </contributor>
<author> <author>
@ -6312,7 +6329,7 @@ REPLACE INTO "csl" VALUES('http://purl.org/net/xbiblio/csl/styles/mla.csl', '200
<month suffix=" "/> <month suffix=" "/>
<year/> <year/>
</date> </date>
<url prefix=" <" suffix=">"/> <url prefix=" &lt;" suffix="&gt;"/>
</access> </access>
</defaults> </defaults>
<citation prefix="(" suffix=")" delimiter="; "> <citation prefix="(" suffix=")" delimiter="; ">