From e0f6f023d8f51b39086d5e5310059fe3a3ef5e64 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 5 Sep 2006 01:09:04 +0000 Subject: [PATCH] various fixes to citation formatting (mostly Chicago Manual of Style) --- .../chromeFiles/content/scholar/xpcom/cite.js | 10 ++- .../locale/en-US/scholar/locales.xml | 7 +- scrapers.sql | 75 ++++++++++++------- 3 files changed, 57 insertions(+), 35 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/xpcom/cite.js b/chrome/chromeFiles/content/scholar/xpcom/cite.js index f68310726..0db476ecf 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/cite.js +++ b/chrome/chromeFiles/content/scholar/xpcom/cite.js @@ -1014,6 +1014,8 @@ CSL.prototype._formatDate = function(element, date, format) { } else { string = date.day.toString(); } + } else if(child.name == "text") { + string = this._getTerm(child["term-name"], false, child["form"]); } if(string) { @@ -1318,9 +1320,11 @@ CSL.prototype._getFieldValue = function(name, element, item, format, bibCitEleme data = this._formatLocator(name, element, field, format); } } else if(name == "pages") { - var field = item.getField("pages"); - if(field) { - data = this._formatLocator("page", element, field, format); + if(typeName != "book") { + var field = item.getField("pages"); + if(field) { + data = this._formatLocator("page", element, field, format); + } } } else if(name == "edition") { data = item.getField("edition"); diff --git a/chrome/chromeFiles/locale/en-US/scholar/locales.xml b/chrome/chromeFiles/locale/en-US/scholar/locales.xml index 2c7de21ff..364c44f24 100644 --- a/chrome/chromeFiles/locale/en-US/scholar/locales.xml +++ b/chrome/chromeFiles/locale/en-US/scholar/locales.xml @@ -1,11 +1,12 @@ - + in ibid accessed forthcoming References + nd and et al. @@ -19,7 +20,7 @@ paragraph volume - issue + number @@ -31,7 +32,7 @@ ΒΆΒΆ vol - iss + no diff --git a/scrapers.sql b/scrapers.sql index f06ae9e3d..0909bc87a 100644 --- a/scrapers.sql +++ b/scrapers.sql @@ -1,4 +1,4 @@ --- 77 +-- 78 -- Set the following timestamp to the most recent scraper update date 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', ' - + '); -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)', ' '); -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', '