Skip to content

Commit

Permalink
Fix various BibTex styling problems.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jmchilton committed Sep 25, 2014
1 parent 965d1a3 commit a7f59b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions client/galaxy/scripts/libs/bibtex.js
Original file line number Diff line number Diff line change
Expand Up @@ -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_ = {
Expand Down
13 changes: 7 additions & 6 deletions client/galaxy/scripts/mvc/citation/citation-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) {
Expand All @@ -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);
}
Expand Down

0 comments on commit a7f59b2

Please sign in to comment.