Accessing Citations in Applications Other than Word - Mac - Newbie

2»
  • It'd be trivial for BBT to omit those bars or curly braces, but a) whether that would help at all is guesswork until we know what triggers ATOK, and b) it wouldn't actually work with odfscan.
  • But if it helps in debugging, if someone opens an issue on the bbt tracker, I can make custom builds that deliver variations of odfscan format.
  • edited April 13, 2019
    @fbennett
    I put two | (vertical bar) in front of the surname of the author in Bookends citation information itself. Then I used the floating citation window to get the following:

    {||Brewer, 1991}

    I even put two | (vertical bar) in Japanese using ATOK's Input Manager Editor, I got the following using Bookend's floating citation window:

    {||Brewer, 1991}

    In both cases, ATOK again does not seem to be activated.
  • How is this text brought to the editor? Pasted? Drag & drop?
  • @emilianoeheyns
    It would be great to try some debugging of BBT to see if this works. I will have to depend on somebody to open an issue on the BBT tracker as I do not have expertise in this type of thing.
  • No expertise needed beyond being able to open an account on github (the tracker is at https://github.com/retorquere/zotero-better-bibtex/issues). As a matter of rule I only create builds if the person who is experiencing the problem is participating in the issue, preferably opens the issue. If the problem-holder is not on board, the problem tends to bleed to death pretty quickly.
  • @emilianoeheyns
    I am not sure if I understand you mean exactly, but what I did was launch Bookends floating citation window in the note taking application. I then clicked on the "paste" button in this window to have the citation pasted in the text in the note taking application. This same citation appears in the clipboard of MacOS.
  • If Bookends works via the clipboard, can you get a sample of what Bookends vs BBT puts on the clipboard (where the BBT version exhibits the undesired behavior and the Bookends the desired behavior, using clips that are either the same or substantially close) using something like https://langui.net/clipboard-viewer/
  • Wait -- you can type "{ | Brewer, 1991 | | | zu:276004:4EAB2LZW }" without it being messed with, then copy it to the clipboard and paste it back without it being messed with, but if BBT puts it on the clipboard, it gets modified by ATOK?
  • @emilianoeheyns
    I downloaded and used "Clipboard Viewer". I typed in "{ | Brewer, 1991 | | | zu:276004:4EAB2LZW }". Then I copied and again pasted the same into a note taking application. Clipboard Viewer showed the results for all the following file titles:

    com.reinvented.keepit.note.text
    public.rtf
    NeXT Rich Text Format v1.0 pasteboard type
    public.utf8-plain-text
    public.utf16-external-plain-text
    'ut 16' (CorePastboardFlavorType 0x75743136)
    dyn.ah62d4rv4gk81n65yru
    'ustl' (CorePasteboardFlavorType 0x7473746C)
    com.apple.traditional-mac-plain-text
    'TEXT' (CorePasteboardFlavorType 0x54455854)
    dyn.ah62d4rv4gk81g7d3ru
    'styl' (CorePasteboardFlavorType 0x7374796C)

    Which files do you need the information for?
  • For starters whether one could be pasted back correctly, and the other could not.
  • Can you also get us the output of running osascript -e 'the clipboard as record' in the terminal for each case (you put it on the clipboard, BBT puts it on the clipboard), noting which output belongs to what case?
  • @emilianoeheyns
    Would you mind giving me detailed instructions on how to get the information you need? I have only basic computer skills. I look forward to getting the information to you so this issue can be solved. I will work on it tomorrow. (It is almost 1am here in Tokyo). :)
  • edited April 8, 2019

    1. open the terminal application
    2. Type { | Brewer, 1991 | | | zu:276004:4EAB2LZW } into the note app and copy it to the clipboard
    3. In the terminal app, type (do not copy-paste!) osascript -e 'the clipboard as record' > /tmp/clipboard-state-manual.txt
    4. In the terminal app, type (do not copy-paste!) pbpaste > /tmp/clipboard-contents-manual.txt
    5. Paste into the note app and verify you’re getting { | Brewer, 1991 | | | zu:276004:4EAB2LZW } back
    6. Click http://127.0.0.1:23119/better-bibtex/cayw?format=scannable-cite&clipboard=true . The picker will pop up; pick the Brewer reference
    7. Verify your browser now says something like { | Brewer, 1991 | | | zu:276004:4EAB2LZW } (whatever it says, no Japanese)
    8. Paste into your notepad and tell us whether you see something like { | Brewer, 1991 | | | zu:276004:4EAB2LZW } or something (partially) Japanese
    9. In the terminal app, type (do not copy-paste!) osascript -e 'the clipboard as record' > /tmp/clipboard-state-bbt.txt
    10. In the terminal app, type (do not copy-paste!) pbpaste > /tmp/clipboard-contents-bbt.txt
    11. You now have 4 files in /tmp that look like clipboard...txt. Put these somewhere where we can download them. If you open an issue on the github link I posted, you can attach them there.
  • edited April 8, 2019
    If the difference is that Bookends puts rich-text on the clipboard (which BBT currently does not), I will need you to open a github account and then open an issue by clicking here.

    I apologize for the inconvenience, but if I'm going to make changes to BBT to accommodate this, I need a channel where I can talk about the issue (for which this forum would suffice) and get you test builds (for which this forum does not suffice). I have an automated setup around github issues to deliver tested debug-builds that I don't really want to work around (and working around it would be some work at this point, I've made it intentionally hard for me to put out builds that have not passed through this automated testing setup).
  • @emilianoeheyns
    Thanks for following up on this issue. I really appreciate it! :)

    I followed your instructions and believe I have the 4 files in /tmp, but I am at a loss as to where the /tmp folder is on my Mac. If you could provide me with the file path, I will post it all on github.
  • In a terminal window, does "ls /tmp" show anything useful?
  • I don't have a mac at hand -- @fbennet, do you know the path to the desktop? Would that be ~/Desktop?
  • I get the following when I type in the "ls /tmp" command:

    boost_interprocess clipboard-state-manual.txt
    clipboard-contents-bbt.txt com.apple.launchd.KXBN1OTnxe
    clipboard-contents-manual.txt com.apple.launchd.LkIbvRzNn4
    clipboard-state-bbt.txt powerlog
  • I got the above results when I typed in "ls /tmp". Where do I find the /tmp files on my Mac? What is the path to find these files?
  • The path is literally "/tmp". You can browse there using the instructions at https://apple.stackexchange.com/questions/32377/how-do-i-browse-tmp-in-finder
  • @ emilianoeheyns
    Thanks for your instructions. I managed to find the file path and past the issue on GitHub. ( https://github.com/retorquere/zotero-better-bibtex/issues/1154 ) Hopefully some solution can be found. :)
  • The custom build I put there (which I'll merge once we have the whole thing working) will put html and RTF on the clipboard. I've looked on stackoverflow and from what I see there, replacing keystroke theReference with keystroke "v" using command down (and adding &clipboard=true to the url) should work, but I also see warnings that if you hold down a modifier key (such as ctrl) while it's pasting it would be seen as cmd-ctrl-v and it's unpredictable what that would do.

    I've not tested this. I'm not really familiar with Macs. I concentrate on the backend in BBT.
  • We've managed to solve the problem by putting the scannable cite on the clipboard as richtext (https://github.com/retorquere/zotero-better-bibtex/issues/1154).
  • Yay! That's good to know.
  • It does require a change to @davepwsmith's script, as it must use clipboard-paste, not keystroke-type, as keystroke-type is always plaintext.
Sign In or Register to comment.