- closes #536, Hanging indent missing in APA citations in Word
- closes #736, bring Zotero up to date with latest CSL revisions - allows citing multiple sources in IEEE and Nature styles, collapse citation numbers, and sort citations by citation number - fixes a bug in the add citation dialog when adding items to the "Multiple Sources" pane, then turning off multiple sources
This commit is contained in:
parent
fa698c1622
commit
9a40d041b3
|
@ -165,6 +165,9 @@ var Zotero_Citation_Dialog = new function () {
|
||||||
|
|
||||||
// delete item list
|
// delete item list
|
||||||
_itemData = new Object();
|
_itemData = new Object();
|
||||||
|
|
||||||
|
// delete all items
|
||||||
|
_clearCitationList();
|
||||||
}
|
}
|
||||||
_updateAccept();
|
_updateAccept();
|
||||||
_updatePreview();
|
_updatePreview();
|
||||||
|
@ -254,14 +257,11 @@ var Zotero_Citation_Dialog = new function () {
|
||||||
_getCitation();
|
_getCitation();
|
||||||
|
|
||||||
// delete all existing items from list
|
// delete all existing items from list
|
||||||
var citationList = document.getElementById("citation-list");
|
_clearCitationList();
|
||||||
while(citationList.firstChild) {
|
|
||||||
citationList.removeChild(citationList.firstChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
// run preview function to re-sort, if it hasn't already been
|
// run preview function to re-sort, if it hasn't already been
|
||||||
// run
|
// run
|
||||||
if(!_previewShown) io.previewFunction();
|
io.previewFunction();
|
||||||
|
|
||||||
// add items back to list
|
// add items back to list
|
||||||
for(var i=0; i<io.citation.citationItems.length; i++) {
|
for(var i=0; i<io.citation.citationItems.length; i++) {
|
||||||
|
@ -469,4 +469,14 @@ var Zotero_Citation_Dialog = new function () {
|
||||||
itemNode.setAttribute("image", item.getImageSrc());
|
itemNode.setAttribute("image", item.getImageSrc());
|
||||||
document.getElementById("citation-list").appendChild(itemNode);
|
document.getElementById("citation-list").appendChild(itemNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Removes all items from the multiple sources list
|
||||||
|
*/
|
||||||
|
function _clearCitationList() {
|
||||||
|
var citationList = document.getElementById("citation-list");
|
||||||
|
while(citationList.firstChild) {
|
||||||
|
citationList.removeChild(citationList.firstChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -214,7 +214,7 @@ Zotero.CSL.prototype.formatCitation = function(citation, format) {
|
||||||
// loop through, collecting citations (sans date) in an array
|
// loop through, collecting citations (sans date) in an array
|
||||||
var lastNames = {};
|
var lastNames = {};
|
||||||
for(var i=0; i<citation.citationItems.length; i++) {
|
for(var i=0; i<citation.citationItems.length; i++) {
|
||||||
var citationString = new Zotero.CSL.FormattedString(this, format);
|
var citationString = new Zotero.CSL.FormattedString(context, format);
|
||||||
this._processElements(citation.citationItems[i].item, context.layout, citationString,
|
this._processElements(citation.citationItems[i].item, context.layout, citationString,
|
||||||
context, null, [{"issued":true}, {}]);
|
context, null, [{"issued":true}, {}]);
|
||||||
var cite = citationString.get();
|
var cite = citationString.get();
|
||||||
|
@ -296,12 +296,12 @@ Zotero.CSL.prototype.formatCitation = function(citation, format) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var string = new Zotero.CSL.FormattedString(this, format, context.layout.@delimiter.toString());
|
var string = new Zotero.CSL.FormattedString(context, format, context.layout.@delimiter.toString());
|
||||||
for(var i=0; i<citationItems.length; i++) {
|
for(var i=0; i<citationItems.length; i++) {
|
||||||
var citationItem = citationItems[i];
|
var citationItem = citationItems[i];
|
||||||
if(!citationItem) continue;
|
if(!citationItem) continue;
|
||||||
|
|
||||||
var citationString = new Zotero.CSL.FormattedString(this, format);
|
var citationString = string.clone();
|
||||||
|
|
||||||
// suppress author if requested
|
// suppress author if requested
|
||||||
var ignore = citationItem.suppressAuthor ? [{"author":true}, {}] : undefined;
|
var ignore = citationItem.suppressAuthor ? [{"author":true}, {}] : undefined;
|
||||||
|
@ -332,7 +332,7 @@ Zotero.CSL.prototype.formatCitation = function(citation, format) {
|
||||||
string.concat(citationString);
|
string.concat(citationString);
|
||||||
}
|
}
|
||||||
|
|
||||||
var returnString = new Zotero.CSL.FormattedString(this, format);
|
var returnString = string.clone();
|
||||||
returnString.append(string.get(), context.layout, false, true);
|
returnString.append(string.get(), context.layout, false, true);
|
||||||
var returnString = returnString.get();
|
var returnString = returnString.get();
|
||||||
|
|
||||||
|
@ -354,27 +354,46 @@ Zotero.CSL.prototype.formatBibliography = function(itemSet, format) {
|
||||||
var isCitation = true;
|
var isCitation = true;
|
||||||
}
|
}
|
||||||
if(!context) {
|
if(!context) {
|
||||||
throw "CSL: createBibliography called on style with no bibliography context";
|
throw "CSL: formatBibliography called on style with no bibliography context";
|
||||||
}
|
}
|
||||||
|
|
||||||
var output = "";
|
if(!itemSet.items.length) return "";
|
||||||
|
|
||||||
|
var hangingIndent = !!(context.option.(@name == "hanging-indent").@value == "true");
|
||||||
|
var secondFieldAlign = context.option.(@name == "second-field-align").@value.toString();
|
||||||
|
|
||||||
var hangingIndent = !!context.layout.option.(@name == "hanging-indent");
|
|
||||||
var index = 0;
|
var index = 0;
|
||||||
|
var output = "";
|
||||||
|
var preamble = "";
|
||||||
if(format == "HTML") {
|
if(format == "HTML") {
|
||||||
if(this.class == "note" && isCitation) {
|
if(this.class == "note" && isCitation) {
|
||||||
output += '<ol>\r\n';
|
preamble = '<ol>\r\n';
|
||||||
} else if(hangingIndent) {
|
secondFieldAlign = false;
|
||||||
output += '<div style="margin-left:0.5in;text-indent:-0.5in;">\r\n';
|
} else {
|
||||||
|
if(hangingIndent) {
|
||||||
|
preamble = '<div style="margin-left:0.5in;text-indent:-0.5in;">\r\n';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(secondFieldAlign) {
|
||||||
|
preamble += '<table style="border-collapse:collapse;">\r\n';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if(format == "RTF") {
|
} else if(format == "RTF" || format == "Integration") {
|
||||||
output += "{\\rtf\\ansi{\\fonttbl\\f0\\froman Times New Roman;}{\\colortbl;\\red255\\green255\\blue255;}\\pard\\f0";
|
if(format == "RTF") {
|
||||||
|
preamble = "{\\rtf\\ansi{\\fonttbl\\f0\\froman Times New Roman;}{\\colortbl;\\red255\\green255\\blue255;}\\pard\\f0";
|
||||||
|
}
|
||||||
|
|
||||||
|
var tabStop = null;
|
||||||
if(hangingIndent) {
|
if(hangingIndent) {
|
||||||
output += "\\li720\\fi-720";
|
var indent = 720; // 720 twips = 0.5 in
|
||||||
|
var firstLineIndent = -720; // -720 twips = -0.5 in
|
||||||
|
} else {
|
||||||
|
var indent = 0;
|
||||||
|
var firstLineIndent = 0;
|
||||||
}
|
}
|
||||||
output += "\r\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var maxFirstFieldLength = 0;
|
||||||
for(var i in itemSet.items) {
|
for(var i in itemSet.items) {
|
||||||
var item = itemSet.items[i];
|
var item = itemSet.items[i];
|
||||||
if(item == undefined) continue;
|
if(item == undefined) continue;
|
||||||
|
@ -382,9 +401,8 @@ Zotero.CSL.prototype.formatBibliography = function(itemSet, format) {
|
||||||
// try to get custom bibliography
|
// try to get custom bibliography
|
||||||
var string = item.getProperty("bibliography-"+format);
|
var string = item.getProperty("bibliography-"+format);
|
||||||
if(!string) {
|
if(!string) {
|
||||||
string = new Zotero.CSL.FormattedString(this, format);
|
string = new Zotero.CSL.FormattedString(context, format);
|
||||||
this._processElements(item, context.layout, string,
|
this._processElements(item, context.layout, string, context);
|
||||||
context);
|
|
||||||
if(!string) {
|
if(!string) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -397,6 +415,17 @@ Zotero.CSL.prototype.formatBibliography = function(itemSet, format) {
|
||||||
|
|
||||||
string = string.get();
|
string = string.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(secondFieldAlign && (format == "RTF" || format == "Integration")) {
|
||||||
|
if(format == "RTF") {
|
||||||
|
var tab = string.indexOf("\\tab ");
|
||||||
|
} else {
|
||||||
|
var tab = string.indexOf("\t");
|
||||||
|
}
|
||||||
|
if(tab > maxFirstFieldLength) {
|
||||||
|
maxFirstFieldLength = tab;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// add line feeds
|
// add line feeds
|
||||||
if(format == "HTML") {
|
if(format == "HTML") {
|
||||||
|
@ -406,6 +435,9 @@ Zotero.CSL.prototype.formatBibliography = function(itemSet, format) {
|
||||||
|
|
||||||
if(this.class == "note" && isCitation) {
|
if(this.class == "note" && isCitation) {
|
||||||
output += "<li>"+string+span+"</li>\r\n";
|
output += "<li>"+string+span+"</li>\r\n";
|
||||||
|
} else if(secondFieldAlign) {
|
||||||
|
output += '<tr style="vertical-align:top;"><td>'+string+span+"<td></tr>\r\n"
|
||||||
|
+'<tr><td colspan="2"> </td></tr>\r\n';
|
||||||
} else {
|
} else {
|
||||||
output += "<p>"+string+span+"</p>\r\n";
|
output += "<p>"+string+span+"</p>\r\n";
|
||||||
}
|
}
|
||||||
|
@ -422,25 +454,54 @@ Zotero.CSL.prototype.formatBibliography = function(itemSet, format) {
|
||||||
}
|
}
|
||||||
// attach \n on mac (since both \r and \n count as newlines for
|
// attach \n on mac (since both \r and \n count as newlines for
|
||||||
// clipboard purposes)
|
// clipboard purposes)
|
||||||
output += string+(Zotero.isMac ? "\n\n" : "\r\n\r\n");
|
output += string+(Zotero.isWin ? "\r\n\r\n" : "\n\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(format == "HTML") {
|
if(format == "HTML") {
|
||||||
if(this.class == "note" && isCitation) {
|
if(this.class == "note" && isCitation) {
|
||||||
output += '</ol>';
|
output += '</ol>';
|
||||||
} else if(hangingIndent) {
|
} else {
|
||||||
output += '</div>';
|
if(secondFieldAlign) {
|
||||||
|
output += '</table>';
|
||||||
|
}
|
||||||
|
if(hangingIndent) {
|
||||||
|
output += '</div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if(format == "RTF") {
|
} else if(format == "RTF" || format == "Integration") {
|
||||||
// drop last 6 characters of output (last two returns)
|
if(secondFieldAlign) {
|
||||||
output = output.substr(0, output.length-6)+"}";
|
// this is a really sticky issue. the below works for first fields
|
||||||
} else {
|
// that look like "[1]" and "1." otherwise, i have no idea. luckily,
|
||||||
// drop last 4 characters (last two returns)
|
// this will be good enough 99% of the time.
|
||||||
output = output.substr(0, (Zotero.isMac ? output.length-2 : output.length-4));
|
var alignAt = 24+maxFirstFieldLength*120;
|
||||||
|
|
||||||
|
if(secondFieldAlign == "margin") {
|
||||||
|
firstLineIndent -= alignAt;
|
||||||
|
tabStop = 0;
|
||||||
|
} else {
|
||||||
|
indent += alignAt;
|
||||||
|
firstLineIndent = -indent;
|
||||||
|
tabStop = indent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
preamble += "\\li"+indent+" \\fi"+firstLineIndent+" ";
|
||||||
|
if(tabStop !== null) {
|
||||||
|
preamble += "\\tx"+tabStop+" ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(format == "RTF") {
|
||||||
|
// drop last 6 characters of output (last two returns)
|
||||||
|
output = output.substr(0, output.length-6)+"}";
|
||||||
|
} else {
|
||||||
|
// drop last 4 characters (last two returns)
|
||||||
|
output = output.substr(0, (Zotero.isWin ? output.length-4 : output.length-2));
|
||||||
|
}
|
||||||
|
preamble += "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return preamble+output;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -923,6 +984,7 @@ Zotero.CSL.prototype._processElements = function(item, element, formattedString,
|
||||||
|| newChild.localName() == "else-if") {
|
|| newChild.localName() == "else-if") {
|
||||||
|
|
||||||
var matchAny = newChild.@match == "any";
|
var matchAny = newChild.@match == "any";
|
||||||
|
var matchNone = newChild.@match == "none";
|
||||||
if(matchAny) {
|
if(matchAny) {
|
||||||
// if matching any, begin with false, then set to true
|
// if matching any, begin with false, then set to true
|
||||||
// if a condition is true
|
// if a condition is true
|
||||||
|
@ -934,10 +996,14 @@ Zotero.CSL.prototype._processElements = function(item, element, formattedString,
|
||||||
}
|
}
|
||||||
|
|
||||||
// inspect variables
|
// inspect variables
|
||||||
for each(var attribute in ["variable", "type", "disambiguate", "locator", "position"]) {
|
var done = false;
|
||||||
|
var attributes = ["variable", "type", "disambiguate", "locator", "position"];
|
||||||
|
for(var k=0; !done && k<attributes.length; k++) {
|
||||||
|
var attribute = attributes[k];
|
||||||
|
|
||||||
if(newChild["@"+attribute].length()) {
|
if(newChild["@"+attribute].length()) {
|
||||||
var variables = newChild["@"+attribute].toString().split(" ");
|
var variables = newChild["@"+attribute].toString().split(" ");
|
||||||
for(var j=0; j<variables.length; j++) {
|
for(var j=0; !done && j<variables.length; j++) {
|
||||||
if(attribute == "variable") {
|
if(attribute == "variable") {
|
||||||
if(Zotero.CSL._dateVariables[variables[j]]) {
|
if(Zotero.CSL._dateVariables[variables[j]]) {
|
||||||
// getDate not false/undefined
|
// getDate not false/undefined
|
||||||
|
@ -975,14 +1041,18 @@ Zotero.CSL.prototype._processElements = function(item, element, formattedString,
|
||||||
if(matchAny) {
|
if(matchAny) {
|
||||||
if(exists) {
|
if(exists) {
|
||||||
truthValue = true;
|
truthValue = true;
|
||||||
break;
|
done = true;
|
||||||
|
}
|
||||||
|
} else if(matchNone) {
|
||||||
|
if(exists) {
|
||||||
|
truthValue = false;
|
||||||
|
done = true;
|
||||||
}
|
}
|
||||||
} else if(!exists) {
|
} else if(!exists) {
|
||||||
truthValue = false;
|
truthValue = false;
|
||||||
break;
|
done = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(truthValue != undefined) break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -990,7 +1060,7 @@ Zotero.CSL.prototype._processElements = function(item, element, formattedString,
|
||||||
if(truthValue) {
|
if(truthValue) {
|
||||||
// if true, process
|
// if true, process
|
||||||
var newString = formattedString.clone(newChild.@delimiter.toString());
|
var newString = formattedString.clone(newChild.@delimiter.toString());
|
||||||
var success = this._processElements(item, newChild,
|
var success = this._processElements(item, newChild,
|
||||||
newString, context, citationItem, ignore);
|
newString, context, citationItem, ignore);
|
||||||
|
|
||||||
formattedString.concat(newString, child);
|
formattedString.concat(newString, child);
|
||||||
|
@ -1073,11 +1143,12 @@ Zotero.CSL.prototype._compareCitations = function(a, b, context) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var aString = new Zotero.CSL.FormattedString(this, "Text");
|
var option = (context ? context.option : null);
|
||||||
|
var aString = new Zotero.CSL.FormattedString(option, "Text");
|
||||||
this._processElements(a, this._csl.citation.layout, aString,
|
this._processElements(a, this._csl.citation.layout, aString,
|
||||||
context, "subsequent");
|
context, "subsequent");
|
||||||
|
|
||||||
var bString = new Zotero.CSL.FormattedString(this, "Text");
|
var bString = new Zotero.CSL.FormattedString(option, "Text");
|
||||||
this._processElements(b, this._csl.citation.layout, bString,
|
this._processElements(b, this._csl.citation.layout, bString,
|
||||||
context, "subsequent");
|
context, "subsequent");
|
||||||
|
|
||||||
|
@ -1462,28 +1533,28 @@ Zotero.CSL.Item._optionalTypeMap = {
|
||||||
magazineArticle:"article-magazine",
|
magazineArticle:"article-magazine",
|
||||||
newspaperArticle:"article-newspaper",
|
newspaperArticle:"article-newspaper",
|
||||||
thesis:"thesis",
|
thesis:"thesis",
|
||||||
letter:"personal communication",
|
letter:"personal_communication",
|
||||||
manuscript:"manuscript",
|
manuscript:"manuscript",
|
||||||
interview:"interview",
|
interview:"interview",
|
||||||
film:"motion picture",
|
film:"motion_picture",
|
||||||
artwork:"graphic",
|
artwork:"graphic",
|
||||||
webpage:"webpage",
|
webpage:"webpage",
|
||||||
report:"paper-conference", // ??
|
report:"paper-conference", // ??
|
||||||
bill:"bill",
|
bill:"bill",
|
||||||
case:"legal case",
|
case:"legal_case",
|
||||||
hearing:"bill", // ??
|
hearing:"bill", // ??
|
||||||
patent:"patent",
|
patent:"patent",
|
||||||
statute:"bill", // ??
|
statute:"bill", // ??
|
||||||
email:"personal communication",
|
email:"personal_communication",
|
||||||
map:"map",
|
map:"map",
|
||||||
blogPost:"webpage",
|
blogPost:"webpage",
|
||||||
instantMessage:"personal communication",
|
instantMessage:"personal_communication",
|
||||||
forumPost:"webpage",
|
forumPost:"webpage",
|
||||||
audioRecording:"song", // ??
|
audioRecording:"song", // ??
|
||||||
presentation:"paper-conference",
|
presentation:"paper-conference",
|
||||||
videoRecording:"motion picture",
|
videoRecording:"motion_picture",
|
||||||
tvBroadcast:"motion picture",
|
tvBroadcast:"motion_picture",
|
||||||
radioBroadcast:"motion picture",
|
radioBroadcast:"motion_picture",
|
||||||
podcast:"speech", // ??
|
podcast:"speech", // ??
|
||||||
computerProgram:"book" // ??
|
computerProgram:"book" // ??
|
||||||
};
|
};
|
||||||
|
@ -1647,7 +1718,7 @@ Zotero.CSL.ItemSet = function(items, csl) {
|
||||||
|
|
||||||
// collect options
|
// collect options
|
||||||
this.options = new Object();
|
this.options = new Object();
|
||||||
options = this.citation.option.(@name.substr(0, 12) == "disambiguate")
|
var options = this.citation.option.(@name.substr(0, 12) == "disambiguate")
|
||||||
+ this.bibliography.option.(@name == "subsequent-author-substitute");
|
+ this.bibliography.option.(@name == "subsequent-author-substitute");
|
||||||
for each(var option in options) {
|
for each(var option in options) {
|
||||||
this.options[option.@name.toString()] = option.@value.toString();
|
this.options[option.@name.toString()] = option.@value.toString();
|
||||||
|
@ -2020,14 +2091,22 @@ Zotero.CSL.ItemSet.prototype._copyDisambiguation = function(fromItem, toItem) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Zotero.CSL.FormattedString = function(CSL, format, delimiter) {
|
Zotero.CSL.FormattedString = function(context, format, delimiter, subsequent) {
|
||||||
this.CSL = CSL;
|
this.context = context;
|
||||||
|
this.option = context.option;
|
||||||
this.format = format;
|
this.format = format;
|
||||||
this.delimiter = delimiter;
|
this.delimiter = delimiter;
|
||||||
this.string = "";
|
this.string = "";
|
||||||
this.closePunctuation = false;
|
this.closePunctuation = false;
|
||||||
this.useBritishStyleQuotes = false;
|
this.useBritishStyleQuotes = false;
|
||||||
|
|
||||||
|
// insert tab iff second-field-align is on
|
||||||
|
this.insertTabAfterField = (!subsequent && this.option.(@name == "second-field-align").@value.toString());
|
||||||
|
// whether to remove whitespace from next appended string
|
||||||
|
this.suppressLeadingWhitespace = false;
|
||||||
|
// whether to prepend a newline to the next appended string
|
||||||
|
this.prependLine = false;
|
||||||
|
|
||||||
if(format == "RTF") {
|
if(format == "RTF") {
|
||||||
this._openQuote = "\\uc0\\u8220 ";
|
this._openQuote = "\\uc0\\u8220 ";
|
||||||
this._closeQuote = "\\uc0\\u8221 ";
|
this._closeQuote = "\\uc0\\u8221 ";
|
||||||
|
@ -2072,6 +2151,10 @@ Zotero.CSL.FormattedString.prototype.concat = function(formattedString, element)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Zotero.CSL.FormattedString._rtfEscapeFunction = function(aChar) {
|
||||||
|
return "{\\uc0\\u"+aChar.charCodeAt(0).toString()+"}"
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* appends a string (with format parameters) to the current one
|
* appends a string (with format parameters) to the current one
|
||||||
*/
|
*/
|
||||||
|
@ -2088,9 +2171,23 @@ Zotero.CSL.FormattedString.prototype.append = function(string, element, dontDeli
|
||||||
|
|
||||||
// append prefix before closing punctuation
|
// append prefix before closing punctuation
|
||||||
if(element && element.@prefix.length()) {
|
if(element && element.@prefix.length()) {
|
||||||
this.append(element.@prefix.toString(), null, true);
|
var prefix = element.@prefix.toString();
|
||||||
}
|
if(this.suppressLeadingWhitespace) {
|
||||||
|
var newPrefix = prefix.replace(/^\s+/, "");
|
||||||
|
if(newPrefix != "" && newPrefix != prefix) {
|
||||||
|
this.suppressLeadingWhitespace = false;
|
||||||
|
}
|
||||||
|
prefix = newPrefix
|
||||||
|
}
|
||||||
|
|
||||||
|
this.append(prefix, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.suppressLeadingWhitespace) {
|
||||||
|
string = string.replace(/^\s+/, "");
|
||||||
|
this.suppressLeadingWhitespace = false;
|
||||||
|
}
|
||||||
|
|
||||||
if(string.length && string[0] == "." &&
|
if(string.length && string[0] == "." &&
|
||||||
Zotero.CSL.FormattedString._punctuation.indexOf(this.string[this.string.length-1]) != -1) {
|
Zotero.CSL.FormattedString._punctuation.indexOf(this.string[this.string.length-1]) != -1) {
|
||||||
// if string already ends in punctuation, preserve the existing stuff
|
// if string already ends in punctuation, preserve the existing stuff
|
||||||
|
@ -2126,83 +2223,85 @@ Zotero.CSL.FormattedString.prototype.append = function(string, element, dontDeli
|
||||||
|
|
||||||
if(!dontEscape) {
|
if(!dontEscape) {
|
||||||
if(this.format == "HTML") {
|
if(this.format == "HTML") {
|
||||||
var newString = "";
|
string = string.replace("<", "<", "g")
|
||||||
|
.replace(">", ">", "g")
|
||||||
for(var i=0; i<string.length; i++) {
|
.replace("&", "&", "g")
|
||||||
var charCode = string.charCodeAt(i);
|
.replace(/(\r\n|\r|\n)/g, "<br />")
|
||||||
// Replace certain characters with HTML entities
|
.replace(/[\x00-\x1F]/g, "");
|
||||||
switch (charCode) {
|
|
||||||
case 38: // &
|
|
||||||
newString += '&';
|
|
||||||
break;
|
|
||||||
case 60: // <
|
|
||||||
newString += '<';
|
|
||||||
break;
|
|
||||||
case 62: // >
|
|
||||||
newString += '>';
|
|
||||||
break;
|
|
||||||
case 8211: // en-dash
|
|
||||||
newString += '–'
|
|
||||||
break;
|
|
||||||
case 8212: // em-dash
|
|
||||||
newString += '—'
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
newString += string[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string = newString;
|
|
||||||
|
|
||||||
} else if(this.format == "RTF") {
|
} else if(this.format == "RTF") {
|
||||||
var newString = "";
|
string = string.replace(/[\x7F-\uFFFF]/g, Zotero.CSL.FormattedString._rtfEscapeFunction)
|
||||||
|
.replace("\\", "\\\\", "g")
|
||||||
// go through and fix up unicode entities
|
.replace("\t", "\\tab ", "g")
|
||||||
for(var i=0; i<string.length; i++) {
|
.replace(/(\r\n|\r|\n)/g, "\\line ");
|
||||||
var charCode = string.charCodeAt(i);
|
|
||||||
if(charCode > 127) { // encode unicode
|
|
||||||
newString += "{\\uc0\\u"+charCode.toString()+"}";
|
|
||||||
} else if(charCode == 92) { // double backslashes
|
|
||||||
newString += "\\\\";
|
|
||||||
} else {
|
|
||||||
newString += string[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string = newString;
|
|
||||||
} else if(this.format == "Integration") {
|
} else if(this.format == "Integration") {
|
||||||
string = string.replace(/\\/g, "\\\\");
|
string = string.replace(/\\/g, "\\\\")
|
||||||
|
.replace(/(\r\n|\r|\n)/g, "\\line ");
|
||||||
|
} else {
|
||||||
|
string = string.replace(/(\r\n|\r|\n)/g, (Zotero.isWin ? "\r\n" : "\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(element) {
|
if(element) {
|
||||||
|
// style attributes
|
||||||
if(this.format == "HTML") {
|
if(this.format == "HTML") {
|
||||||
var style = "";
|
var style = "";
|
||||||
|
|
||||||
var cssAttributes = ["font-family", "font-style", "font-variant",
|
var cssAttributes = ["font-family", "font-style", "font-variant",
|
||||||
"font-weight"];
|
"font-weight", "vertical-align", "display"];
|
||||||
for(var j in cssAttributes) {
|
for(var j in cssAttributes) {
|
||||||
var value = element["@"+cssAttributes[j]].toString();
|
var value = element["@"+cssAttributes[j]].toString();
|
||||||
if(value && value.indexOf('"') == -1) {
|
if(value && value.indexOf('"') == -1) {
|
||||||
style += cssAttributes[j]+":"+value;
|
style += cssAttributes[j]+":"+value+";";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(style) {
|
if(element["@display"] == "block") {
|
||||||
|
if(this.option.(@name == "hanging-indent").@value == "true") {
|
||||||
|
style += "text-indent:0.5in;"
|
||||||
|
}
|
||||||
|
|
||||||
|
if(style) {
|
||||||
|
string = '<div style="'+style+'">'+string+'</div>';
|
||||||
|
} else {
|
||||||
|
string = '<div>'+string+'</div>';
|
||||||
|
}
|
||||||
|
} else if(style) {
|
||||||
string = '<span style="'+style+'">'+string+'</span>';
|
string = '<span style="'+style+'">'+string+'</span>';
|
||||||
}
|
}
|
||||||
} else if(this.format == "RTF" || this.format == "Integration") {
|
} else {
|
||||||
if(element["@font-style"] == "oblique" || element["@font-style"] == "italic") {
|
if(this.format == "RTF" || this.format == "Integration") {
|
||||||
string = "\\i "+string+"\\i0 ";
|
if(element["@font-style"] == "oblique" || element["@font-style"] == "italic") {
|
||||||
|
string = "\\i "+string+"\\i0 ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(element["@font-variant"] == "small-caps") {
|
||||||
|
string = "\\scaps "+string+"\\scaps0 ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(element["@font-weight"] == "bold") {
|
||||||
|
string = "\\b "+string+"\\b0 ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(element["@text-decoration"] == "underline") {
|
||||||
|
string = "\\ul "+string+"\\ul0 ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(element["@vertical-align"] == "sup") {
|
||||||
|
string = "\\super "+string+"\\super0 ";
|
||||||
|
} else if(element["@vertical-align"] == "sub") {
|
||||||
|
string = "\\sub "+string+"\\sub0 ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(element["@font-variant"] == "small-caps") {
|
|
||||||
string = "\\scaps "+string+"\\scaps0 ";
|
if(element["@display"] == "block" || this.appendLine) {
|
||||||
}
|
if(this.format == "RTF") {
|
||||||
if(element["@font-weight"] == "bold") {
|
string = "\r\n\\line "+string;
|
||||||
string = "\\b "+string+"\\b0 ";
|
} else if(this.format == "Integration") {
|
||||||
}
|
string = "\x0B"+string;
|
||||||
if(element["@text-decoration"] == "underline") {
|
} else {
|
||||||
string = "\\ul "+string+"\\ul0 ";
|
string = (Zotero.isWin ? "\r\n" : "\n")+string;
|
||||||
|
}
|
||||||
|
this.appendLine = element["@display"] == "block";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2227,6 +2326,25 @@ Zotero.CSL.FormattedString.prototype.append = function(string, element, dontDeli
|
||||||
this.append(element.@suffix.toString(), null, true);
|
this.append(element.@suffix.toString(), null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// save for second-field-align
|
||||||
|
if(!dontDelimit && this.insertTabAfterField) {
|
||||||
|
// replace any space following this entry
|
||||||
|
this.string = this.string.replace(/\s+$/, "");
|
||||||
|
|
||||||
|
if(this.format == "HTML") {
|
||||||
|
this.string += '</td><td style="padding-left:4pt;">';
|
||||||
|
} else if(this.format == "RTF") {
|
||||||
|
this.string += "\\tab ";
|
||||||
|
} else if(this.format == "Integration") {
|
||||||
|
this.string += "\t";
|
||||||
|
} else {
|
||||||
|
this.string += " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
this.insertTabAfterField = false;
|
||||||
|
this.suppressLeadingWhitespace = true;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2241,7 +2359,7 @@ Zotero.CSL.FormattedString.prototype.get = function() {
|
||||||
* creates a new formatted string with the same formatting parameters as this one
|
* creates a new formatted string with the same formatting parameters as this one
|
||||||
*/
|
*/
|
||||||
Zotero.CSL.FormattedString.prototype.clone = function(delimiter) {
|
Zotero.CSL.FormattedString.prototype.clone = function(delimiter) {
|
||||||
return new Zotero.CSL.FormattedString(this.CSL, this.format, delimiter);
|
return new Zotero.CSL.FormattedString(this.context, this.format, delimiter, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -283,11 +283,11 @@ Zotero.OpenURL = new function() {
|
||||||
} else {
|
} else {
|
||||||
co += "&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article";
|
co += "&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article";
|
||||||
}
|
}
|
||||||
co += _mapTag(item.title, "atitle", version)
|
if(item.title) co += _mapTag(item.title, "atitle", version)
|
||||||
co += _mapTag(item.publicationTitle, (version == "0.1" ? "title" : "jtitle"), version)
|
if(item.publicationTitle) co += _mapTag(item.publicationTitle, (version == "0.1" ? "title" : "jtitle"), version)
|
||||||
co += _mapTag(item.journalAbbreviation, "stitle", version);
|
if(item.journalAbbreviation) co += _mapTag(item.journalAbbreviation, "stitle", version);
|
||||||
co += _mapTag(item.volume, "volume", version);
|
if(item.volume) co += _mapTag(item.volume, "volume", version);
|
||||||
co += _mapTag(item.issue, "issue", version);
|
if(item.issue) co += _mapTag(item.issue, "issue", version);
|
||||||
} else if(item.itemType == "book" || item.itemType == "bookitem") {
|
} else if(item.itemType == "book" || item.itemType == "bookitem") {
|
||||||
if(version == "0.1") {
|
if(version == "0.1") {
|
||||||
co += "&genre=book";
|
co += "&genre=book";
|
||||||
|
@ -297,29 +297,29 @@ Zotero.OpenURL = new function() {
|
||||||
|
|
||||||
if(item.itemType == "book") {
|
if(item.itemType == "book") {
|
||||||
co += "&rft.genre=book";
|
co += "&rft.genre=book";
|
||||||
co += _mapTag(item.title, (version == "0.1" ? "title" : "btitle"), version);
|
if(item.title) co += _mapTag(item.title, (version == "0.1" ? "title" : "btitle"), version);
|
||||||
} else {
|
} else {
|
||||||
co += "&rft.genre=bookitem";
|
co += "&rft.genre=bookitem";
|
||||||
co += _mapTag(item.title, "atitle", version)
|
if(item.title) co += _mapTag(item.title, "atitle", version)
|
||||||
co += _mapTag(item.publicationTitle, (version == "0.1" ? "title" : "btitle"), version);
|
if(item.publicationTitle) co += _mapTag(item.publicationTitle, (version == "0.1" ? "title" : "btitle"), version);
|
||||||
}
|
}
|
||||||
|
|
||||||
co += _mapTag(item.place, "place", version);
|
if(item.place) co += _mapTag(item.place, "place", version);
|
||||||
co += _mapTag(item.publisher, "publisher", version)
|
if(item.publisher) co += _mapTag(item.publisher, "publisher", version)
|
||||||
co += _mapTag(item.edition, "edition", version);
|
if(item.edition) co += _mapTag(item.edition, "edition", version);
|
||||||
co += _mapTag(item.series, "series", version);
|
if(item.series) co += _mapTag(item.series, "series", version);
|
||||||
} else if(item.itemType == "thesis" && version == "1.0") {
|
} else if(item.itemType == "thesis" && version == "1.0") {
|
||||||
co += "&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adissertation";
|
co += "&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adissertation";
|
||||||
|
|
||||||
_mapTag(item.title, "title", version);
|
if(item.title) co += _mapTag(item.title, "title", version);
|
||||||
_mapTag(item.publisher, "inst", version);
|
if(item.publisher) co += _mapTag(item.publisher, "inst", version);
|
||||||
_mapTag(item.type, "degree", version);
|
if(item.type) co += _mapTag(item.type, "degree", version);
|
||||||
} else if(item.itemType == "patent" && version == "1.0") {
|
} else if(item.itemType == "patent" && version == "1.0") {
|
||||||
co += "&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Apatent";
|
co += "&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Apatent";
|
||||||
|
|
||||||
_mapTag(item.title, "title", version);
|
if(item.title) co += _mapTag(item.title, "title", version);
|
||||||
_mapTag(item.assignee, "assignee", version);
|
if(item.assignee) co += _mapTag(item.assignee, "assignee", version);
|
||||||
_mapTag(item.patentNumber, "number", version);
|
if(item.patentNumber) co += _mapTag(item.patentNumber, "number", version);
|
||||||
|
|
||||||
if(item.issueDate) {
|
if(item.issueDate) {
|
||||||
co += _mapTag(Zotero.Date.strToISO(item.issueDate), "date", version);
|
co += _mapTag(Zotero.Date.strToISO(item.issueDate), "date", version);
|
||||||
|
@ -352,9 +352,9 @@ Zotero.OpenURL = new function() {
|
||||||
if(item.date) {
|
if(item.date) {
|
||||||
co += _mapTag(Zotero.Date.strToISO(item.date), (item.itemType == "patent" ? "appldate" : "date"), version);
|
co += _mapTag(Zotero.Date.strToISO(item.date), (item.itemType == "patent" ? "appldate" : "date"), version);
|
||||||
}
|
}
|
||||||
co += _mapTag(item.pages, "pages", version);
|
if(item.pages) co += _mapTag(item.pages, "pages", version);
|
||||||
co += _mapTag(item.ISBN, "isbn", version);
|
if(item.ISBN) co += _mapTag(item.ISBN, "isbn", version);
|
||||||
co += _mapTag(item.ISSN, "issn", version);
|
if(item.ISSN) co += _mapTag(item.ISSN, "issn", version);
|
||||||
|
|
||||||
if(version == "0.1") {
|
if(version == "0.1") {
|
||||||
// chop off leading & sign if version is 0.1
|
// chop off leading & sign if version is 0.1
|
||||||
|
|
|
@ -915,9 +915,15 @@ Zotero.Integration.Session.prototype.updateItemSet = function() {
|
||||||
Zotero.Integration.Session.prototype.sortItemSet = function() {
|
Zotero.Integration.Session.prototype.sortItemSet = function() {
|
||||||
if(!this.itemSetIsSorted) {
|
if(!this.itemSetIsSorted) {
|
||||||
if(!this.itemSet.sortable) {
|
if(!this.itemSet.sortable) {
|
||||||
// sort by order in document
|
// sort by order in document. we need a stable sort, so first we
|
||||||
|
// collect old indices.
|
||||||
|
var oldItemIndices = new Object();
|
||||||
|
for(var i=0; i<this.itemSet.items.length; i++) {
|
||||||
|
oldItemIndices[this.itemSet.items[i].getID()] = i;
|
||||||
|
}
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
this.itemSet.items.sort(function(a, b) { return me.sortByOrderAdded(a, b) });
|
this.itemSet.items.sort(function(a, b) { return me.sortByOrderAdded(a, b, oldItemIndices) });
|
||||||
}
|
}
|
||||||
|
|
||||||
var citationChanged = this.itemSet.resort();
|
var citationChanged = this.itemSet.resort();
|
||||||
|
@ -934,18 +940,20 @@ Zotero.Integration.Session.prototype.sortItemSet = function() {
|
||||||
/*
|
/*
|
||||||
* sorts items by order added
|
* sorts items by order added
|
||||||
*/
|
*/
|
||||||
Zotero.Integration.Session.prototype.sortByOrderAdded = function(a, b) {
|
Zotero.Integration.Session.prototype.sortByOrderAdded = function(a, b, oldItemIndices) {
|
||||||
var aID = a.getID();
|
var aID = a.getID();
|
||||||
var bID = b.getID();
|
var bID = b.getID();
|
||||||
|
|
||||||
if(this.citationsByItemID[aID] && this.citationsByItemID[aID].length) {
|
if(this.citationsByItemID[aID] && this.citationsByItemID[aID].length) {
|
||||||
if(!this.citationsByItemID[bID] || !this.citationsByItemID[bID].length) return -1;
|
if(!this.citationsByItemID[bID] || !this.citationsByItemID[bID].length) return -1;
|
||||||
return this.citationsByItemID[aID][0].properties.index-this.citationsByItemID[bID][0].properties.index;
|
|
||||||
|
var diff = this.citationsByItemID[aID][0].properties.index-this.citationsByItemID[bID][0].properties.index;
|
||||||
|
if(diff != 0) return diff;
|
||||||
} else if(this.citationsByItemID[bID] && this.citationsByItemID[bID].length) {
|
} else if(this.citationsByItemID[bID] && this.citationsByItemID[bID].length) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return oldItemIndices[aID]-oldItemIndices[bID];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<terms xmlns="http://purl.org/net/xbiblio/csl">
|
<terms xmlns="http://purl.org/net/xbiblio/csl">
|
||||||
<locale xml:lang="en">
|
<locale xml:lang="en">
|
||||||
|
<term name="at">at</term>
|
||||||
<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>
|
||||||
|
|
64
scrapers.sql
64
scrapers.sql
|
@ -17491,10 +17491,10 @@ REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/asa.csl', '2007-
|
||||||
</style>');
|
</style>');
|
||||||
|
|
||||||
|
|
||||||
REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/nature.csl', '2007-09-06 19:30:00', 'Nature Journal',
|
REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/nature.csl', '2007-09-19 04:01:40', 'Nature Journal',
|
||||||
'<?xml version="1.0" encoding="UTF-8"?>
|
'<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?oxygen RNGSchema="file:/Users/mikowitz/Documents/Development/CSLs/csl.rnc" type="compact"?>
|
<?oxygen RNGSchema="file:/Users/mikowitz/Documents/Development/CSLs/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="in-text" xml:lang="en">
|
||||||
<info>
|
<info>
|
||||||
<title>Nature Journals</title>
|
<title>Nature Journals</title>
|
||||||
<id>http://purl.org/net/xbiblio/csl/styles/nature.csl</id>
|
<id>http://purl.org/net/xbiblio/csl/styles/nature.csl</id>
|
||||||
|
@ -17505,23 +17505,38 @@ REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/nature.csl', '20
|
||||||
</author>
|
</author>
|
||||||
<category term="biology"/>
|
<category term="biology"/>
|
||||||
<category term="generic-base"/>
|
<category term="generic-base"/>
|
||||||
<updated>2007-08-29T15:15:00+08:00</updated>
|
<updated>2007-09-19T04:01:40+00:00</updated>
|
||||||
</info>
|
</info>
|
||||||
<macro name="author">
|
<macro name="author">
|
||||||
<names variable="author">
|
<names variable="author">
|
||||||
<name sort-separator=", " delimiter=", " and="symbol" initialize-with="." delimiter-precedes-last="never" name-as-sort-order="all"/>
|
<name sort-separator=", " delimiter=", " and="symbol" initialize-with="." delimiter-precedes-last="never" name-as-sort-order="all"/>
|
||||||
</names>
|
</names>
|
||||||
</macro>
|
</macro>
|
||||||
<macro name="access">
|
<macro name="access">
|
||||||
<text variable="DOI" prefix=" doi: "/>
|
<choose>
|
||||||
<substitute>
|
<if variable="volume"/>
|
||||||
<text variable="URL" prefix=" at <" suffix=">"/>
|
<else-if variable="DOI">
|
||||||
</substitute>
|
<text variable="DOI" prefix="doi:"/>
|
||||||
</macro>
|
</else-if>
|
||||||
<citation></citation>
|
<else-if variable="URL">
|
||||||
|
<text term="at"/>
|
||||||
|
<text variable="URL" prefix=" <" suffix=">"/>
|
||||||
|
</else-if>
|
||||||
|
</choose>
|
||||||
|
</macro>
|
||||||
|
<citation>
|
||||||
|
<option name="collapse" value="citation-number"/>
|
||||||
|
<sort>
|
||||||
|
<key variable="citation-number"/>
|
||||||
|
</sort>
|
||||||
|
<layout vertical-align="sup" delimiter=",">
|
||||||
|
<text variable="citation-number"/>
|
||||||
|
</layout>
|
||||||
|
</citation>
|
||||||
<bibliography>
|
<bibliography>
|
||||||
<option name="et-al-min" value="4"/>
|
<option name="et-al-min" value="4"/>
|
||||||
<option name="et-al-use-first" value="1"/>
|
<option name="et-al-use-first" value="1"/>
|
||||||
|
<option name="second-field-align" value="true"/>
|
||||||
<layout>
|
<layout>
|
||||||
<text variable="citation-number" suffix=". "/>
|
<text variable="citation-number" suffix=". "/>
|
||||||
<text macro="author"/>
|
<text macro="author"/>
|
||||||
|
@ -17538,7 +17553,7 @@ REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/nature.csl', '20
|
||||||
</style>'
|
</style>'
|
||||||
);
|
);
|
||||||
|
|
||||||
REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/nlm.csl', '2007-09-06 19:30:00', 'National Library of Medicine',
|
REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/nlm.csl', '2007-09-19 04:01:40', 'National Library of Medicine',
|
||||||
'<?xml version="1.0" encoding="UTF-8"?>
|
'<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?oxygen RNGSchema="file:/Users/mikowitz/Documents/Development/CSLs/csl.rnc" type="compact"?>
|
<?oxygen RNGSchema="file:/Users/mikowitz/Documents/Development/CSLs/csl.rnc" type="compact"?>
|
||||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en">
|
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en">
|
||||||
|
@ -17551,7 +17566,7 @@ REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/nlm.csl', '2007-
|
||||||
<email>michael@songsaboutsnow.com</email>
|
<email>michael@songsaboutsnow.com</email>
|
||||||
</author>
|
</author>
|
||||||
<category term="generic-base"/>
|
<category term="generic-base"/>
|
||||||
<updated>2007-08-31T15:15:00+08:00</updated>
|
<updated>2007-09-19T04:01:40+00:00</updated>
|
||||||
</info>
|
</info>
|
||||||
<macro name="author">
|
<macro name="author">
|
||||||
<names variable="author" suffix=". ">
|
<names variable="author" suffix=". ">
|
||||||
|
@ -17571,6 +17586,10 @@ REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/nlm.csl', '2007-
|
||||||
</date>
|
</date>
|
||||||
</macro>
|
</macro>
|
||||||
<citation>
|
<citation>
|
||||||
|
<option name="collapse" value="citation-number"/>
|
||||||
|
<sort>
|
||||||
|
<key variable="citation-number"/>
|
||||||
|
</sort>
|
||||||
<layout prefix="(" suffix=")" delimiter="; ">
|
<layout prefix="(" suffix=")" delimiter="; ">
|
||||||
<text variable="citation-number"/>
|
<text variable="citation-number"/>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -17578,6 +17597,7 @@ REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/nlm.csl', '2007-
|
||||||
<bibliography>
|
<bibliography>
|
||||||
<option name="et-al-min" value="7"/>
|
<option name="et-al-min" value="7"/>
|
||||||
<option name="et-al-use-first" value="6"/>
|
<option name="et-al-use-first" value="6"/>
|
||||||
|
<option name="second-field-align" value="true"/>
|
||||||
<layout>
|
<layout>
|
||||||
<text variable="citation-number" suffix=". "/>
|
<text variable="citation-number" suffix=". "/>
|
||||||
<text macro="author"/>
|
<text macro="author"/>
|
||||||
|
@ -17611,7 +17631,7 @@ REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/nlm.csl', '2007-
|
||||||
</bibliography>
|
</bibliography>
|
||||||
</style>');
|
</style>');
|
||||||
|
|
||||||
REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/ieee.csl', '2007-09-06 19:35:00', 'IEEE',
|
REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/ieee.csl', '2007-09-19 04:01:40', 'IEEE',
|
||||||
'<?xml version="1.0" encoding="UTF-8"?>
|
'<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?oxygen RNGSchema="file:/Users/mikowitz/Documents/Development/CSLs/csl.rnc" type="compact"?>
|
<?oxygen RNGSchema="file:/Users/mikowitz/Documents/Development/CSLs/csl.rnc" type="compact"?>
|
||||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en">
|
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en">
|
||||||
|
@ -17625,11 +17645,8 @@ REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/ieee.csl', '2007
|
||||||
</author>
|
</author>
|
||||||
<category term="engineering"/>
|
<category term="engineering"/>
|
||||||
<category term="generic-base"/>
|
<category term="generic-base"/>
|
||||||
<updated>2007-08-31T15:15:00+08:00</updated>
|
<updated>2007-09-19T04:01:40+00:00</updated>
|
||||||
</info>
|
</info>
|
||||||
<macro name="citation-number">
|
|
||||||
<text variable="citation-number" prefix="[" suffix="]"/>
|
|
||||||
</macro>
|
|
||||||
<macro name="author">
|
<macro name="author">
|
||||||
<names variable="author">
|
<names variable="author">
|
||||||
<name initialize-with="." delimiter=", " and="text" name-as-sort-order="all"/>
|
<name initialize-with="." delimiter=", " and="text" name-as-sort-order="all"/>
|
||||||
|
@ -17653,16 +17670,21 @@ REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/ieee.csl', '2007
|
||||||
</date>
|
</date>
|
||||||
</macro>
|
</macro>
|
||||||
<citation>
|
<citation>
|
||||||
<layout>
|
<option name="collapse" value="citation-number"/>
|
||||||
<text macro="citation-number"/>
|
<sort>
|
||||||
|
<key variable="citation-number"/>
|
||||||
|
</sort>
|
||||||
|
<layout prefix="[" suffix="]" delimiter=",">
|
||||||
|
<text variable="citation-number"/>
|
||||||
</layout>
|
</layout>
|
||||||
</citation>
|
</citation>
|
||||||
<bibliography>
|
<bibliography>
|
||||||
<option name="et-al-min" value="4"/>
|
<option name="et-al-min" value="4"/>
|
||||||
<option name="et-al-use-first" value="1"/>
|
<option name="et-al-use-first" value="1"/>
|
||||||
|
<option name="second-field-align" value="margin"/>
|
||||||
<layout>
|
<layout>
|
||||||
<text macro="citation-number"/>
|
<text variable="citation-number" prefix="[" suffix="]"/>
|
||||||
<text macro="author" prefix=" " suffix=", "/>
|
<text macro="author" prefix=" " suffix=", "/>
|
||||||
<choose>
|
<choose>
|
||||||
<if type="book">
|
<if type="book">
|
||||||
<text macro="title" suffix=". "/>
|
<text macro="title" suffix=". "/>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user