Fix indentation in bibliography
Fix indentation in bibliography when a new item is added and therefore the recalculation of indents are needed. https://forums.zotero.org/discussion/23689/bibliography-indentation
This commit is contained in:
parent
1766f8bb53
commit
b60fb28313
1 changed files with 6 additions and 13 deletions
|
@ -1348,18 +1348,11 @@ Zotero.Integration.Session.prototype._updateDocument = async function(forceCitat
|
||||||
} else {
|
} else {
|
||||||
bibliographyText = bib[0].bibstart+bib[1].join("")+bib[0].bibend;
|
bibliographyText = bib[0].bibstart+bib[1].join("")+bib[0].bibend;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if bibliography style not set, set it
|
var bibStyle = Zotero.Cite.getBibliographyFormatParameters(bib);
|
||||||
if(!this.data.style.bibliographyStyleHasBeenSet) {
|
await this._doc.setBibliographyStyle(bibStyle.firstLineIndent, bibStyle.indent,
|
||||||
var bibStyle = Zotero.Cite.getBibliographyFormatParameters(bib);
|
bibStyle.lineSpacing, bibStyle.entrySpacing, bibStyle.tabStops, bibStyle.tabStops.length);
|
||||||
|
this.data.style.bibliographyStyleHasBeenSet = true;
|
||||||
// set bibliography style
|
|
||||||
await this._doc.setBibliographyStyle(bibStyle.firstLineIndent, bibStyle.indent,
|
|
||||||
bibStyle.lineSpacing, bibStyle.entrySpacing, bibStyle.tabStops, bibStyle.tabStops.length);
|
|
||||||
|
|
||||||
// set bibliographyStyleHasBeenSet parameter to prevent further changes
|
|
||||||
this.data.style.bibliographyStyleHasBeenSet = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set bibliography text
|
// set bibliography text
|
||||||
|
@ -3639,4 +3632,4 @@ Zotero.Integration.LegacyPluginWrapper.wrapDocument = function wrapDocument(doc)
|
||||||
return doc.convert.apply(doc, arguments);
|
return doc.convert.apply(doc, arguments);
|
||||||
}
|
}
|
||||||
return wrapped;
|
return wrapped;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue