Fix various BibTex styling problems.

Need to get out of the BibTeX formatting game as quickly as possible this is a loosing battle, but until then plugging holes in the ship.
This commit is contained in:
John Chilton
2014-09-25 13:49:04 -04:00
parent 965d1a3a52
commit a7f59b24be
2 changed files with 8 additions and 6 deletions
+1
View File
@@ -93,6 +93,7 @@ function BibtexParser(arg0) {
'booklet' : 14,
'masterthesis' : 15,
'conference' : 16
,'online' : 998 // Galaxy MOD: Handle @online entries for preprints.
,'data' : 999 // Galaxy MOD: Handle @data citations coming from figshare.
}
/** @private */ this.MACROS_ = {
@@ -24,11 +24,12 @@ var CitationView = Backbone.View.extend({
var pages = fields.pages ? ("pp. " + fields.pages) : "";
var address = fields.address;
if( entryType == "article" ) {
var volume = (fields.volume ? fields.volume : "") +
(fields.number ? ( " (" + fields.number + ")" ) : "") +
(pages ? ", " + pages : "");
ref = authorsAndYear + this._asSentence(title) +
(fields.journal ? ("In <em>" + fields.journal + ", ") : "") +
(fields.volume ? fields.volume : "") +
(fields.number ? ( "(" + fields.number + "), " ) : ", " ) +
this._asSentence(pages) +
this._asSentence(volume) +
this._asSentence(fields.address) +
"<\/em>";
} else if( entryType == "inproceedings" || entryType == "proceedings" ) {
@@ -43,14 +44,14 @@ var CitationView = Backbone.View.extend({
(fields.howpublished ? fields.howpublished + ". " : "") +
(fields.note ? fields.note + "." : "");
} else if( entryType == "techreport" ) {
ref = authorsAndYear + ". " + this._asSentence(title) +
ref = authorsAndYear + this._asSentence(title) +
this._asSentence(fields.institution) +
this._asSentence(fields.number) +
this._asSentence(fields.type);
} else if( entryType == "book" || entryType == "inbook" || entryType == "incollection" ) {
ref = this._asSentence(authorsAndYear) + " " + this._formatBookInfo(fields);
ref = authorsAndYear + " " + this._formatBookInfo(fields);
} else {
ref = this._asSentence(authorsAndYear) + " " + this._asSentence(title) +
ref = authorsAndYear + " " + this._asSentence(title) +
this._asSentence(fields.howpublished) +
this._asSentence(fields.note);
}