Pasted lines writing over one another from Zotero

Do
DonnaCoxBaker
Posts: 5
Joined: Sat May 19, 2012 10:34 pm
Platform: Windows

Fri Jun 22, 2012 2:08 am Post

temp.JPG
temp.JPG (15.17 KiB) Viewed 726 times
With the new release, my attempts to paste bibliographic references (CMOS full note style) from Zotero to Scrivener are creating lines that write on top of one another (in Document Notes field or main text field). Three lines become one scribbled mess. If I paste the same data into Word, it's fine. And if I then copy it from Word and paste it into Scrivener, it's fine.

I've got Windows 7, Scrivener 1.2.1.0, and Zotero 3.0.7.

Online
User avatar
AmberV
Posts: 24808
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Fri Jun 22, 2012 4:10 am Post

Looks like the line-spacing got severely messed up the first time you pasted. Try selecting the scrambled up text with Ctrl-A, and then use the Format Bar to set the line spacing to "1.0". If that fixes it, then you can avoid this problem happening for now by using `Edit/Paste and Match Style` to paste from Zotero.

Whether the above works or not, to help us figure out what is going on, there is a utility in the Scrivener program folder called "clipboard.exe". Run that, and then paste the Zotero text into the top half of the window. You'll see a bunch of technical data appear in the lower half of the window. Simpy copy and paste that into a code block in the forum here, or if it contains data you'd rather not have in public, send us a support ticket with this data. If you do the latter, be sure to reference the URL of this forum thread as I might not be the one who first sees your request. Thanks!
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Ay
Aycae
Posts: 50
Joined: Sat Nov 05, 2011 10:19 pm
Platform: Windows

Fri Jun 22, 2012 6:01 am Post

I can confirm this, and add that the clipboard contents at the lower pane of the clipboard.exe tool displays non-english characters in a weird fashion, if it makes any difference.
Copied from Zotero:

Code: Select all

Wein, Michela. 2011. ‘Michaelawein.net | Contrast & Compare, Pt.1’. Michaelawein.net. http://www.michaelawein.net/blog/literaturverwaltung1/.

Displayed in clipboard.exe lower pane:

Code: Select all

Formats: text/html,text/plain
   text/html: <!--StartFragment--><div class="csl-bib-body" style="line-height: 1.35; padding-left: 2em; text-indent:-2em;">
  <div class="csl-entry">Wein, Michela. 2011. ‘Michaelawein.net | Contrast &amp; Compare, Pt.1’. <i>Michaelawein.net</i>. http://www.michaelawein.net/blog/literaturverwaltung1/.</div>
</div><!--EndFragment-->
   text/plain: Wein, Michela. 2011. ‘Michaelawein.net | Contrast & Compare, Pt.1’. Michaelawein.net. http://www.michaelawein.net/blog/literaturverwaltung1/.

I have attached a screenshot, note that ‘Michaelawein.net is displayed as ‘Michaelawein.net.
Cheers,
Ayca
Attachments
Zotero_Capture.PNG
Zotero_Capture.PNG (48.15 KiB) Viewed 717 times
Windows 7 x64 (main) -- Ubuntu 10.10 on VirtualBox + Mac OSX Leopard

Online
User avatar
AmberV
Posts: 24808
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Fri Jun 22, 2012 8:41 am Post

Thanks for the help. It looks like the clipboard tool has an encoding issue, but that's okay, the important stuff is around the weird characters. If I had to guess I'd say it is because Zotero isn't specifying a unit for the line-height code. You can see how the text indent and padding values have an "em" after the number, that is a unit for specifying lengths based on the current font size. In HTML, numbers without a unit specification are handled as pixels, so Scrivener is setting the line-height to 1.35 pixels, which is extremely tiny. That's why both lines are overlapping each other.

So it looks like Zotero needs to be made aware of this. I suppose we could break convention and assume a bare number is "em"---that might be what Word is doing---but they'll probably want to fix that on their end. I'll make sure Lee sees this thread so he can make a decision on how to handle it.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Do
DonnaCoxBaker
Posts: 5
Joined: Sat May 19, 2012 10:34 pm
Platform: Windows

Sat Jul 21, 2012 10:24 pm Post

Sorry it has taken me so long to get back to this issue. I posted a notice with Zotero about the issue with line height. They responded that Scrivener has it wrong. Here's the text I posted at Zotero and the response:

-----------------------------

Several of us have posted on the Scrivener site that we are having problems pasting bibliographic references into the Scrivener note fields from Zotero. The lines write over each other, making several lines look like one line of scribbles. I can paste into Word, then copy and paste from there--clearly not ideal.

Scrivener has identified it as a problem with Zotero that Word has apparently worked around. Here's the Scrivener support response:

It looks like the clipboard tool has an encoding issue, but that's okay, the important stuff is around the weird characters. If I had to guess I'd say it is because Zotero isn't specifying a unit for the line-height code. You can see how the text indent and padding values have an "em" after the number, that is a unit for specifying lengths based on the current font size. In HTML, numbers without a unit specification are handled as pixels, so Scrivener is setting the line-height to 1.35 pixels, which is extremely tiny. That's why both lines are overlapping each other.

So it looks like Zotero needs to be made aware of this. I suppose we could break convention and assume a bare number is "em"---that might be what Word is doing---but they'll probably want to fix that on their end. I'll make sure Lee sees this thread so he can make a decision on how to handle it.


===from Zotero===

Simon
12 minutes ago edited


Scrivener support is wrong. You can point them here [http://www.w3.org/wiki/CSS/Properties/line-height]:


<number>
The used value of the property is this number multiplied by the element's font size.

Online
User avatar
AmberV
Posts: 24808
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Sat Jul 21, 2012 11:05 pm Post

Thanks, looks like that might be the case for this type of formatting. Typically non-specified numbers are pixels, but this one has a secondary usage which uses no length specifier rendering that fall-back unusable.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles