closes #214, add footnote support to word integration

closes #215, allow user to select desired citation style and change citation styles on the fly
This commit is contained in:
Simon Kornblith 2006-09-04 04:13:12 +00:00
parent 0515e4cb9e
commit 10f4b28c63
5 changed files with 463 additions and 279 deletions

View file

@ -265,7 +265,9 @@ var Scholar_File_Interface = new function() {
}
// generate bibliography
var bibliography = Scholar.Cite.getBibliography(io.style, items, format);
var csl = Scholar.Cite.getStyle(io.style);
csl.preprocessItems(items);
var bibliography = csl.createBibliography(items, format);
if(io.output == "print") {
// printable bibliography, using a hidden browser
@ -343,7 +345,7 @@ var Scholar_File_Interface = new function() {
transferable.addDataFlavor("text/html");
transferable.setTransferData("text/html", str, bibliography.length*2);
// add text
var bibliography = Scholar.Cite.getBibliography(io.style, items, "Text");
var bibliography = csl.createBibliography(items, "Text");
var str = Components.classes["@mozilla.org/supports-string;1"].
createInstance(Components.interfaces.nsISupportsString);
str.data = bibliography;