[MLZ] Dragging notes into text-editor doesn't produce link-wrappers?

Hello, and thank you for making MLZ. Unfortunately I have ran into a problem with the tool.

Some background: I just installed MLZ about a week ago, because of the possibility to add translations and transliterations to my Zotero items. (I've been using Zotero Standalone for about 2 years now. For reasons not related to Zotero, I've made the MLZ installation on another computer than the one that I have been using Zotero Standalone on.) The installation, transferring data from my Standalone installation etc. all seemed to ge well, and I even have Zotero for Firefox installed on a separate Firefox profile ”just in case”. (Though maybe because of this ”just in case” -installation I had to Install the LibreOffice plugin again, and I seem to have lost the icons in LibreOffice for the Zotero buttons, and have only the descriptive texts of these buttons in their stead. This actually happened already once with Zotero Stanalone installation on my old computer, but it doesn't actually matter that much).

MLZ seems to be working on the language and abbreviations front well enough, but I would also be interested in another function that the tool has – namely, the ability to drag-and-drop notes into my text document (in LibreOffice) and achieve a link to the Zotero item, but I haven't been able to get this to work.

In Citations, Out of The Box, page 42, it reads that I should be able to (shift-)drag a note into my text-editor, so that the pinpoint (page number) and possibly a quatation or a comment would be included. I tried this with several items, for example with Collingwood, R. G. 2005. An Essay on Philosophical Method. Rev. ed. Oxford: Clarendon Press.

I first included a note like this: p. 102 [first line] = it is history [second line] and tried to shift-drag the note to my text-editor with ”include Zotero link wrappers in QuickCopy citations” checked from the Preferences menu.

The result looks like this: Collingwood 2005. The same happens, when I click the ”use citation form as default” and use plain drag: I get Collingwood 2005. I've tried with other locators, different item types, and with ~ instead of = and also without both.

Did I understand something wrong? I thought that the citation produced with drag-and-drop with ”include Zotero link wrappers in QuickCopy citations” should look more like: { | Collingwood, An Essay on Philosophical Method, 2005 | p. 102 | ”it is history” |zu:1387545:BXHG8M52}. (This citation I was able to produce with having scannable cite as the default form in the preferences and manually entering the pinpoint in the third and the citation in the fourth column.)

What might be the problem here? 1) Have I understood the functioning wrong? 2) Or maybe there is a problem with my computer or set-up of MLZ, Firefox and Windows? 3) Might this be a bug?

1) At least Citations, Out of The Box and forums posts on MLZ seem to suggest that I should actually get something else than mere Collingwood 2005.

2) To make sure the problem isn't with my installation, I reinstalled MLZ, The Abbreaviations for Zotero -plugin (v. 1.0.153), RTF/ODF-Scan for Zotero, the Zotero LibreOffice Integration (3.5.9), checked that Firefox is up to date, tried to work with all the other extensions turned off, restarted Windows 7 (which also should be up to date), even disabled my antivirus / Firewall program (F-Secure). Nothing seems to help. Should I also include debug output log?

In the beginning of this log it says:
[JavaScript Error: "TypeError: this.containerBrowser is undefined" {file: "chrome://zotero/content/tab.js" line: 120}]

and at the end it says:
(3)(+0008483): Translate: WARNING: new Zotero.Translate() is deprecated; please don't use this if you don't have to

Most lines start with [abbreviations-for-Zotero]. I can send the whole debug log, if necessary.

So, what's to be done?
  • Thanks for your very thorough report. It sounds as though a bug may have crept into the draggable notes functionality. I'll do some testing at this end, and get back soon.
  • I can confirm that dragging yields the cite without the wrapper, so this is indeed a bug. Should have a fix in a few hours (dinnertime soon here in Japan Standard Timezone).
  • Hey, ok, thanks! Nice to know that you found the bug. Not in a awful hurry (reading ATM). I'll keep an eye on this space.
  • It should be fixed now. Update the MLZ add-on and see how you fare.
  • I installed and tried the update and now it seems to be working as it's supposed to. Thank you for the quick response and bug-fix!

    Btw, just being curious, but is the locator that I can use controlled by the style? I tried to copy a note from said Collingwood with the headline p. 103 and it worked fine, also with ch. 1 but with note (n.) or opus (op.) I am "only" getting the citation, without the pinpoint or the quotation / comment. I mainly don't need other locators than p. but just thought I asked.
  • might be the style, but might also be something not working right. Which style are you using?
  • Chicago Manual of Style 16th edition (author date). But now that you mentioned it, I tried with Elsevier Harvard (with titles) to the same effect, and American Antropological Association too. So note (n.) at least seems not to be working. (The item in question, Collingwood 2005, has the item type book.)

    Having p. 102 [first line] = it is history [second line] produces this { | Collingwood 2005 | p. 102 | ("it is history") | zotero://select/items/0_BXHG8M52}

    Having n. 1 [first line] = it is history [second line] produces this { | Collingwood 2005 | | | zotero://select/items/0_BXHG8M52}
  • oh I misunderstood where the locator got lost, I thought you did have it in the inserted scannable citation, but I see the problem is getting it from the note to the scannable cite.
    That's something fbennett needs to look at, it has nothing to do with the citation style, that wouldn't come into play until you actually run the document through the scan.
  • Yes, sorry, didn't write (nor think) clearly enough. So the problem is actually as you describe that dragging a note with the locator n. 1 etc. doesn't bring the locator with it to LibreOffice. But using page as the locator as in p. 102 seems to be working just fine.
  • Thanks for reporting this one. It should be fixed in an update within the day.
  • edited May 30, 2014
    Ok, good to hear, thank you.

    There is still one problem with my note dragging. I have selected "copy as HTML" from the preferences in order to produce clickable links.

    I'm looking at your Sep 25th 2012 message here to understand, what the copied links should look like https://forums.zotero.org/discussion/18064/2/please-add-better-integration-with-scrivener/

    If I copy my note into LibreOffice, I'm not getting the HTML code nor the rendered one. The same is true if I copy the note into gmail, google docs. Copying the note here & having "format comments as html", the only code that I see is italics around the title:

    { | Collingwood, An Essay on Philosophical Method | p. 102 | ("it is history") | zotero://select/items/0_BXHG8M52}

    So, maybe this is a bug too; or maybe I should change some settings (in LibreOffice? Windows?) to produce the clickable links I'm after.

    Edit. Cleaning my post for funny formatting.
  • Hey,

    I have downloaded the latest update (4.0.20m455, out 2nd June) but the problems that I've faced are still there: I'm not getting HTML format with drag-and-drop, nor am I getting other locators besides p. 102. Even pp. 102-140 doesn't seem to be working.
  • Sorry, this is covered in 4.0.20m456, just out).

    The problem with non-p. locator labels was an oversight on my part. It should now recognize any locator that the processor can ingest.

    For the HTML wapper around the linked cite, it's a little more complicated. The feature is not (or is no longer) enabled automatically by the "Copy as HTML" tick-box, because the "zotero://select" links may require some local, system-specific adjustments before they become clickable.

    Are the zotero://select links that appear in the dragged cites clickable for you? If not, you'll have to work out how to get LibreOffice to recognize them on your system.

    Once that's working, we can move on to the next step. (There are some possible wrinkles in setting up HTML wrappers, so we'll tackle that separately.)
  • Hi,

    I can confirm that non-p. locators are now working fine. Great!

    As for the "zotero://select" links - no, they are not clickable in the dragged cites.

    I was unable to get zotero://select links set from Win 7 - Control panel - Default programs - Set associations - Associate a file type or protocol with a spesifil program. And I also didn't find such settings from LibreOffice, but maybe I wasn't looking at the right place. So I searched the Zotero Forums.

    Can you maybe say if these forum threads relevant to getting my system to recognize "zotero://select" links:
    https://forums.zotero.org/discussion/6735/protocol-handler-for-zotero/
    and
    https://forums.zotero.org/discussion/20040/

    In that case, I can at least try to follow the instructions.
  • Progress, that's good to hear.

    I don't know Windows well, but if Win 7 still has a registry, it looks like this has worked for people:

    https://forums.zotero.org/discussion/20040#Item_6
  • Oh, wait.

    Correction: The zotero://select URL will probably not be automatically clickable in a LibreOffice document, even when it has been registered as a protocol in the operating system. So we need to do a different test of it. Try this:

    (1) Drag an item into LibreOffice
    (2) Copy its zotero://select link to the clipboard
    (3) Create a desktop shortcut, and paste the zotero://select in as its URL
    (4) Save the shortcut
    (5) See if clicking on it works to open the item in Firefox.
  • edited June 3, 2014
    Assuming that you can get links to work, here's how to enable dragging of "invisible" wrapper cites (for all systems):

    (1) In Firefox, type "about:config" as the address in the URL bar (without the quotes).

    (2) Firefox will prompt with a warning. Click the "I'll be careful, I promise!" button.

    (3) In the "Search:" field, type:

    extensions.zotero.export.quickCopy.linkOptionHTML

    (4) Double-click on the entry to set it to "true".

    I've worked out how to get these links working in LibreOffice under Linux, which I hadn't been able to do previously. Drag-and-drop doesn't work (the HTML comes through as visible markup), but pasting from the clipboard using Ctrl-v does work. It works nicely enough that I think I'll use this for my own writing!

    For Linux, the steps are:

    (1) visit the directory /usr/share/applications

    (2) Add the following line to the file defaults.list:

    x-scheme-handler/zotero=firefox.desktop

    If you're able to get it going in Windows, let me know. We can put a How-To up on the CitationStylist site to help folks who follow.
  • Success :)

    First, a caveat: I tried to follow the instructions on https://forums.zotero.org/discussion/20040#Item_6 and others on the forum, but they proved to be bit too difficult for me. I tried to change the registry key by typing regedit into Windows Search, but apparently I didn't completely understand when I was supposed have a key and under which key was I supposed to put which string. But then I found these instructions http://kb.mozillazine.org/Register_protocol

    So, for you fbennett to use on the CitationStylist web site and for those reading here who are interested to get this to work on Windows, this is what I did on my Windows 7 / Firefox / MLZ combination.

    1. Read the instructions: http://kb.mozillazine.org/Register_protocol
    2. Type notepad into Windows Search - open Notepad
    3. Copy / type the following text into the file

    REGEDIT4

    [HKEY_CLASSES_ROOT\zotero]
    @="URL:zotero"
    "URL Protocol"=""

    [HKEY_CLASSES_ROOT\zotero\shell]

    [HKEY_CLASSES_ROOT\zotero\shell\open]

    [HKEY_CLASSES_ROOT\zotero\shell\open\command]
    @="\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\" \"%1\""

    Here C:\\Program Filex (x86)\\Mozilla Firefox\\firefox.exe\" refers to the destination where you have Firefox installed.

    Just as it's written in the instructions, be sure to have double backslashes there. (This was probably my initial failure, when I tried to alter the registry).

    4. Save the file as a REG FILE with the filetype .reg, for example zotero.reg on your Desktop (or somewhere you can easily find the file).

    5. Double-click the file. After this I was first prompted to allow for this program to make changes to my computer and after this to make sure that I trust the file zotero.reg. After confirming, I got a succesfully installed (or something like that) window.

    After this I tested for copying a zotero://select links from LibreOffice to my Desktop, and I was able to produce a New Internet Shortcut that takes me back to MLZ and to the correct item.

    6. After this I changed the setting in Firefox about:config for extensions.zotero.export.quickCopy.linkOptionHTML to true, per fbennett's advice above.

    So what I can do now is that I drag an item to LibreOffice and get a cite in the selected form, including the "pipes" and as hyperlink (underlined and blue), or if I drag a note so I get that plus the locator and a citation or a comment, just as described in Citations, Out of The Box. Even the zotero://select link from the last field has been eliminated, but I can still click the link.

    So this all looks very promising to me! Thank a lot for the help.
  • That's great, and many thanks for this clear set of instructions.

    I've tested the wrapped cites with the RTF/ODF Scan plugin, and conversion currently fails (or at least can fail).

    It's a small problem, though, and it should be fixed in a fresh release of the plugin within the next few days.
  • edited June 15, 2014
    A revised version of the Zotero RTF/ODF-Scan for Zotero plugin is now available, which should process the link-wrapped citations correctly.

    @tuomasgreen: Let us know how you fare with the plugin. It should Just Work, but if there are problems we'd like to get them sorted out right away.
  • Hi,

    so it seems to be working for most items but not all. I tested the scan with 5 citations, 1 didn't come out at all. Others seemed to be ok. I didn't see any big differences between the items, the one that wasn't working was a book with the ISBN number 951-9468-41-2. Another book, by the same author - ISBN 951-9468-51-X - went through the scan without problems.

    (Btw, why isn't it possible to abbreviate the names of archives in footnotes with MLZ? That would be very useful in history. But maybe I should open a new topic for this.)
  • Thanks for checking. With a copy of a document containing a failing reference, we should be able to sort it out. I'll send you a private forum message.

    (Good point on archive abbreviations. I'll add it to the "Titles" group in the next release, where we already have genre and medium.)
  • (Actually, the archive field is already covered by the Abbreviation Filter. If a citation renders the "archive" variable with form="short", an entry should appear in the Abbreviation Filter popup, in the "Series Title, Archive" list.)
  • While learning to use this tool, I think I've found out a nice little trick. If you want to add comments for your self in your text, but also want to keep these notes organized, you can do so by creating a ”todo-list” item (e.g. manuscript) in Zotero, and adding comments as notes, with the headings no. 01, no. 02 etc. You can write your todo after ~ so that it will be part of your link.

    Then you can just drag these notes into your text document as a link, which you can follow back into your MLZ account. The hyperlinks inside the text are not missed easily, which I at least think is good, but if you want to show this text to someone else without the links interfering, you can convert the text using the RTF/ODF Scan. I've used my initials for the creator of the item so that the reader will understand that these are notes for myself in the draft. This way you can manage your comments both as a list and see them in the context of your text.

    At the moment, there are two problems with this approach, one a feature and one a bug.

    The feature: the link inside your text document takes you back to the MLZ item, not the exact note. I am not sure if this could be changed, but if it could, I think that for note taking in general, it would be great if clicking on a link inside my text document would take me back to the note. This is of course not a huge issue, because you can probably always find the note quite fast after opening the item.

    The bug: unfortunately, the RTF/ODF Scan seems to have stopped working completely for the document I'm working on, when I'm using this facility. I've sent you the failing document.

    There is also another problem that I've started to see some time last week, I think. The RTF/ODF Scan button goes missing from the gears menu in MLZ without a warning. This problem can be fixed by first disabling and then enabling the addon in the extensions menu in Firefox, so it's not a huge problem, but just wanted to let you now – might be related to the first one?

    (About the archives abbreaviations: you are right, of course, sorry for the mistake. I was accidentaly using the Zotero Chicago Author-date style, not the MLZ style of CMOS full note, because that is closer to what I need to use. Now the abbreaviations for archives are working correctly and I find this very helpful.)
  • (PS. Also, related to using the linkwrappers, but more of a feature request, but one I thought to be related to this post, so didn't start a new thread. If at all possible, it would be nice to have a third option alongside the = (citation) and ~ (comment) markers, one for ”my notes”. ”My notes” would be copied with the drag and drop, but would be placed before the hyperlinked citation and would not be included inside the citation but would stay as part of the text. This would make outlining / prewriting of texts even faster, but I understand that it might not be technically feasible or might take too much work. Just letting you now.)
  • The bug: unfortunately, the RTF/ODF Scan seems to have stopped working completely for the document I'm working on, when I'm using this facility. I've sent you the failing document.
    This should be fixed now.
    The RTF/ODF Scan button goes missing from the gears menu in MLZ without a warning.
    If you see this again after updating, post back again. That certainly shouldn't happen, but there is a (small) possibility that it was related to the parsing failure.
Sign In or Register to comment.