Bibliography Paste to Google docs has improper hanging indent

edited April 10, 2018
I have noticed that for some time pasting a zotero generated bibliography from clipboard to google docs results in a hanging indent that is not half an inch (it is instead 2 em, or a third of an inch at 12 pts). I do understand th diffs among em, pt, and px, but figure that one should be able to manage a stable setting among the apps.

Pasting the clipboard into anything else results in no hanging indent unless the receiving app interprets html, and then there is often an error based on the default font-size (although setting font-size to 12 px results in identical indents for 4 em and .5 as would be expected). Using zotero's insert bibliography feature works without a hitch. Google Docs has for some time precluded users from access to an html editor, but it is supposed to honor mark-up that is included in an imported file, but uploading an html file generated by Zotero produces no hanging indent. If I crate an html file with font-size set to 12px, margin-left set to .5in and indent set to -5in, though this works in say, wordpress, in Google docs it produces a 1 inch margin, a .5 in indent, and no hanging indent.

I had set up a heading style to do the proper indent, and then discovered that using that style also removed all italics from the cites, so as this point, one must highlight the entire bibliography and then set margin and indent manually.

I have to assume that google docs is getting the 2 em from Zotero, but don't quite understand how zotero is producing that, and why it would produce that at 12 points.

So, is there something I can do so that pasting from the generated bibliography from zotero clipboard into a 12pt Google doc generates a bibliography in 12 pt Times Roman with .5in hanging indent in the google doc?
_____

Bib entry
<div class="csl-bib-body">
<div class="csl-entry">Allen, S. L., Howlett, M. D., Coulombe, J. A., &amp; Corkum, P. V. (2016). ABCs of SLEEPING: A review of the evidence behind pediatric sleep practice recommendations. <i>Sleep Medicine Reviews</i>, <i>29</i>, 1–14. <a href="https://doi.org/10.1016/j.smrv.2015.08.006">https://doi.org/10.1016/j.smrv.2015.08.006</a></div>;


Additional code where html is used
<div class="csl-bib-body" style="line-height: 2; margin-left: 2em; text-indent:-2em;">
<div class="csl-entry">Allen, S. L., Howlett, M. D., Coulombe, J. A., &amp; Corkum, P. V. (2016). ABCs of SLEEPING: A review of the evidence behind pediatric sleep practice recommendations. <i>Sleep Medicine Reviews</i>, <i>29</i>, 1–14. <a href="https://doi.org/10.1016/j.smrv.2015.08.006">https://doi.org/10.1016/j.smrv.2015.08.006</a></div>;
<span class="Z3988" title="url_ver=Z39.88-2004&amp;ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzotero.org%3A2&amp;rft_id=info%3Adoi%2F10.1016%2Fj.smrv.2015.08.006&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.atitle=ABCs%20of%20SLEEPING%3A%20A%20review%20of%20the%20evidence%20behind%20pediatric%20sleep%20practice%20recommendations&amp;rft.jtitle=Sleep%20Medicine%20Reviews&amp;rft.volume=29&amp;rft.aufirst=Stephanie%20L.&amp;rft.aulast=Allen&amp;rft.au=Stephanie%20L.%20Allen&amp;rft.au=Melissa%20D.%20Howlett&amp;rft.au=J.%20Aim%C3%A9e%20Coulombe&amp;rft.au=Penny%20V.%20Corkum&amp;rft.date=2016-10&amp;rft.pages=1-14&amp;rft.spage=1&amp;rft.epage=14&amp;rft.issn=10870792&amp;rft.language=en"></span></div>


  • edited April 10, 2018
    (You'll want to surround your code blocks with <code> and </code>. I've changed that for you.)
  • but figure that one should be able to manage a stable setting among the apps.
    Unfortunately that's not the case. Google Docs, Word, and LibreOffice all parse HTML from the clipboard differently when converting to their internal representation. I don't think anyone has looked at this in a while, and if there are changes we can make to improve compatibility, we'd be interested in doing so, but it may not be possible without breaking things in something else. (LibreOffice I believe fares the worst here in general, but is also the lowest priority.)
  • Whoops.... thanks for fixing my post.

    Zotero has been very stable with LO since the move to standalone Z and LO getting beyond issues in 5.4. Google Docs of course has been a pain in the ass but that is virtually all on Google since they hobbled the apps to secure them.

    I am a little familiar with the style editor, but this line
    <bibliography hanging-indent="true" et-al-min="8" et-al-use-first="6" et-al-use-last="true" entry-spacing="0" line-spacing="2">
    is the only line referencing hanging indent, and per the CSL docs it doesn't look like CSL can set the amount of the hanging indent (which might/could address the problem?) Have I missed anything there (is there no search feature in the style editor?)

    If hanging indent specifics are not identified in CSL, Z is then doing that in some other subroutine/object... How difficult would it be to implement that like the style and style editor, so a user would be able to tailor what the clipboard contents style looked like for their target? Would it really be just easier to have a separate menu item for google is there was enough demand? I try to push Zotero and Google Docs for high schoolers, though I can't say I have been very successful, lol.
  • Zotero has been very stable with LO since the move to standalone Z and LO getting beyond issues in 5.4.
    I'm just referring to HTML clipboard handling. The word processor plugins use a different mechanism.
    If hanging indent specifics are not identified in CSL, Z is then doing that in some other subroutine/object
    Yes, the inline styles come from Zotero. I don't really see us offering a choice of targets, but we can certainly consider better defaults.
    I try to push Zotero and Google Docs for high schoolers, though I can't say I have been very successful
    We have a number of upcoming developments on that front. Stay tuned.
  • @netbuoy: I found the same problem, and discovered this while trialling: Basically, I've created a style that has all indents removed. When you paste the entry into a google doc, it seems to replicate the indent of the previous paragraph. So as long as your first para is correct, the others will then follow. Hope this helps!

    @dstillman: Do you mean Google Docs integration?
  • Google Docs plugin is now available for testing
Sign In or Register to comment.