diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js index e343f0c7f..eb2c2a35c 100644 --- a/chrome/content/zotero/xpcom/cite.js +++ b/chrome/content/zotero/xpcom/cite.js @@ -319,6 +319,9 @@ Zotero.Cite.makeFormattedBibliography = function(cslEngine, format) { } } + var leftMarginDivs = xml..div.(@class == "csl-left-margin"); + var clearEntries = leftMarginDivs.length() > 0; + // csl-entry var divs = xml..div.(@class == "csl-entry"); var num = divs.length(); @@ -327,6 +330,10 @@ Zotero.Cite.makeFormattedBibliography = function(cslEngine, format) { var first = i == 0; var last = i == num - 1; + if (clearEntries) { + div.@style += "clear: left; "; + } + if(entrySpacing) { if(!last) { div.@style += "margin-bottom: " + entrySpacing + "em;"; @@ -341,7 +348,7 @@ Zotero.Cite.makeFormattedBibliography = function(cslEngine, format) { var rightPadding = .5; // div.csl-left-margin - for each(var div in xml..div.(@class == "csl-left-margin")) { + for each(var div in leftMarginDivs) { div.@style = "float: left; padding-right: " + rightPadding + "em;"; // Right-align the labels if aligning second line, since it looks