please add better integration with Scrivener

24
  • I'm pretty sure Scrivener does not support plugins/extensions.
    But you could ask for confirmation here: http://www.literatureandlatte.com/forum/
  • Since this this seems like a lively thread, I just thought I'd share some recent successes I've had with Scrivener and Zotero on Mac. I love Scriv for the writing environment, but I'm also a Multi-Markdown user, so this might not be everyone's cup of tea, but I wanted to expand upon some of marsh's ideas. This workflow requires several steps of conversion at the end for when you need to output something, but I think it makes the writing itself super easy and accessible—since I use plain text files and sync them to dropbox—which is always my goal when writing.

    0A. This workflow is blazing fast if you use TextExpander. I wrote a text expander script that creates MMD-style footnotes using a time-stamp (the only way, in my opinion, when you're working with large documents), automatically creates Zotero shortcut reference indicators, and places the cursor inside them. Here is the code:

    [^%y%1m%e%1H%1M]

    [^%y%1m%e%1H%1M]:{%|}

    0B. I created a MultiMarkdown implementation of Chicago Style for Zotero: https://gist.github.com/1786800

    2. When writing in Scriv, create a Multi-Markdown-style footnote link, either using TextExpander as above, or the old-fashioned way: [^note], then your actual footnote using Zotero shorthand, [^note]:{Smith 2002}, 1-18.

    3. When everything is said and done, use Scrivener to Export as RTF.

    4. Use Zotero RFT scan to link your references. This has been really reliable for me.

    5. Take the output RTF document, save it as plain text, and get back into Scriv.

    6. For LaTeX, you can then convert using Scriv's MMD to LaTex output.

    Would love to hear some feedback. Hopefully some of your find this helpful.
  • edited April 23, 2012
    I actually did something similar to what craigeley did, although mine is a bit simpler IMHO and completely free (TextExpander costs 35 bucks). (The learning curve was still steep enough that it took me over a week to figure this out. But I'm pretty new to Scrivener, MMD, and BibDesk.)

    NOTE: THIS ONLY WORKS ON MACS BECAUSE BibDesk is strictly a (very excellent) program for Mac OS X 10.5+.

    As with craigley's solution, mine also uses MultiMarkdown (MMD). Here're the installation instructions:

    0. I'll assume you have LaTeX installed. Mac users can get the MacTeX distribution here:
    http://www.tug.org/mactex/2011/. Also, you'll need BibDesk. Get it here: http://bibdesk.sourceforge.net/.

    1. Download Fletcher T. Penney's MMD Export templates from here: http://groups.google.com/group/multimarkdown/browse_thread/thread/0c9937c17906a8b1/6f633137107832fa. Look at James Howlson's post dated Oct. 14, 2007 for instructions on how to install them into BibDesk. Follow them.

    2. Fletcher's templates convert BibDesk items into MMD citations. But MMD's citation feature is very limited. I prefer to use BibTeX (or natbib) citations and escape them as raw LaTeX code. To do this, copy one of the templates and rename it. Edit it. Since I'm using the natbib package, I changed my copy into:

    <$publications>
    &lt!--\citep{<$citeKey/>}--&gt&lt/$publications&gt

    I also made one using \citet. Install them into BibDesk too.

    3. Set Zotero to export citations in BibTeX format and BibDesk to export using one of these new templates.

    That's it for installation. Now here's the workflow:

    1. Start BibDesk, Scrivener, and Zotero. (I'm using standalone without trouble.)

    2. Use BibDesk to create a new, empty BibTex bibliography (.bib) file .

    3. When you need a new reference, drag and drop it from Zotero to BibDesk. If you have already used the reference, it's in your .bib file already, so you can skip this step.

    4. Write in Scrivener. To cite an item, just drag and drop it from BibDesk to Scrivener. You may have to do some minor fiddling to add prefixes, etc. Just modify the \cite command.

    5. When you're ready to publish your masterpiece, use Scrivener to compile it as MMD, and then use LaTeX to make the output beautiful. (I used TexShop to open the .tex file. Then, one push of the Typeset button followed by Macros > Applescript > Bibliography does the job.)

    Most of the writing process boils down to Steps 3 and 4. I can live with that (for now)!
  • Just another one who would love better Scrivener integration. I don't see myself buying any other programs or cobbling anything together, as I hardly have any free time and am getting stressed out just thinking of making my life more complicated than Zotero+Word is.
  • Scrivener does not have a programming interface that could be used to create plugins, so it is impossible for Zotero to support it. The users of Scrivener should direct these request to Scrivener, because there is nothing that Zotero can do about this.
  • Ahhhh I see. Okay, can do.
  • see this thread on the Scrivener forum: http://www.literatureandlatte.com/forum/viewtopic.php?f=2&t=13092&p=97089#p97089
    I wouldn't get my hopes up. The way this will work is an improved Zotero RTF scan, which I think is in the cards, just not imminent.
  • I just noticed that Scrivener has a Linux version, so I might be moving to that world. If my current development commitments clear up a bit, maybe we'll see what can be done. But please don't hold your breath at all; I already have lots of Zandy users holding their breath for releases there as well!
  • The key system developed by Andrea Rossato for citeproc-hs and pandoc is very well thought-out. Adopting it in Zotero RTF scan would be a nice design short-cut, and good for portability as well. It will need to be recast in Javascript -- as far as I know, the only implementations currently available are in Haskell (citeproc-hs) and Python (Erik Hetzner's zotero-plain). The tough part, as ever, will be working out a scheme for setting and managing unambiguous mnemonic keys to target specific items in Zotero.
  • I'm strongly with Frank on this. It'd be great to hear from core devs if this is something they will or might tackle for 3.5 or if it would have to come from someone else.
    The keys are really the main obstacle at this point, everything else is probably not terribly hard to do.
  • Just wanted to chip in my 2 cents on this since I also happened to find myself using both Zotero and Scrivener... Whenever I want to make a footnote I go to Zotero, select the entry, rigt-click and select 'Make Bibliography of selected object', then in the pop-up window be sure to select 'Clipboard'. Go back to Scrivener and hit Paste (Ctrl+V on Windows, Cmd+V on Mac). There you have it. The whole RTF Scan thing sounds fascinating from a technical point of view, but for me it would be too tedious. My references are too complicated for that to work well. I find this procedure to work well, also because I can actually see my reference directly in Scrivener. Hope it helps..
  • YepYep: Note that you can also use Quick Copy, configurable in the Export pane of the Zotero preferences, and either drag and drop to Scrivener or use a keyboard shortcut to copy to the clipboard.
  • Dan, that is very useful. Somehow I missed that one, thanks!
  • edited April 16, 2012
    Less elegant workaround if you want to write in Scrivener and have a final document with bibliographical footnotes and with "live links" to your Zotero database:

    1) Create a "Bibliography.doc" in Word/Open-/Libre-Neo-Office
    2) Write in Scrivener with placeholders in footnote {Author, Date}
    3) Go to Zotero, clip respective note with Quick Copy into Bibliography.doc
    4) Add (via Zotero's plug-in in your Office-App) the footnote-reference to your Quick-copied reference in "Bibliography.doc"
    5) Export Scrivener document when finished with your draft (best to rtf) "Finaltext.rtf"
    6) Replace footnotes in "Finaltext" manually with copied footnotes from "Bibliography"
    => Ms written in Scrivener, final document with live links to Zotero.

    Step 3) could be omitted but it helps with recognizing the reference (rather than just looking at a footnote marker when trying to copy into "Finaltext".

    Clumsy procedure, but it works – until a functioning RTF-Scan should make all this unnecessary.
  • Came across a well-explained method/workflow for footnotes (w/ screenshots), much like others described above, at mossiso.com/2012/04/12/scrivener-and-zotero.html (thanks Ammon). Basically, do all your writing in Scrivener (QuickCopying/drag&droping hard-coded Z citations), then copy to Word and replace hard-coded footnotes w/ true Zotero citations.
  • YepYep and kithairon:

    Thanks for the description; I'm returning to Zotero after some agonizing experiences over the (wait for it) last 6 months with Sente trying to get some bibliographic solutions: for a Chicago 15 or even a 16! Some persistent glitch for those guys...but, I digress.

    So, your workflow: I read it and understand you: Thank you. Scrivener is so powerful, and I'd hate to abandon it because I couldn't get my reference software to collaborate.
  • Joining late here. It seems like there is some headway but can someone explain in simple terms the process to make Scrivener and Zotero talk to produce a "Word plugin" effect?

    I'm also wondering why people don't just write in Scrivener and then compile to a word doc and insert Zotero citations at the point, manually replacing the reference (author year page)? I realize this takes a little extra time and is a one-way process but it works.

    Lastly, could markdown be used in some way? (A shot in the dark - I'm not a programmer.)
  • If scrivener provides a programming interface, a plugin for Zotero will eventually be written by someone. If Scrivener does not provide a programming interface, plugin is not possible. So the ball is on the Scrivener end here. (Same can be said about Pages)
  • Other apps of interest are Sente, Bibdesk, Bookends, etc.
  • Hi, I am just about to start a new project and as I have had problems with RTF scan last year. I now work, research in Zotero, transfer research to Scrivener and write up the project, transfer to Word to tidy-up add citations with Zotero through the Word plugin and finish off the document.

    My question is, has RTF Scan been improved in the last year, enough make it worthwhile to add it into the work flow? Or is it still unreliable
  • From the perspective of an end-user--writing a 300 page dissertation--"simply" adding the capability of a unique (even user supplied) identifier would seem to be all that's necessary. Why not modify RTF Scan to recognize the "Extra" field for the time being, and let us put our own identifiers in it? I'm gathering that quite a number of us could really use a "simple" improvement like that. All I really need is disambiguation. And I really do need it. mbruffey
  • @Alec - RTF scan hasn't been improved, no.
    @mbruffey - I doubt that is going to happen by someone from Zotero. Dan & Simon have never looked to kindly to putting hacks (and using the extra field here surely is a hack) into Zotero and while that's at times frustrating for a group of users wanting a particular improvement, it's almost certainly a good idea for the software product at large.

    As I have mentioned repeatedly, the code for RTF scan is a separate .js file and would lend itself well for improvements by a third party - large parts of that, such as better handling of affixes etc., could be submitted as patches back to Zotero and would have a very high chance of getting accepted - the more "hacky" parts - and using the extra field certainly falls under that category - could be patched in by users who want them individually until Zotero comes up with a more generally applicable solution, but I wouldn't bet on that being super soon.
    I realize that's not what you hope to hear, but I'm pretty sure that's a realistic assessment of the status quo.
  • Okay. "We" could use a programmer who is interested in modifying the .js file to pull the record based first on the contents of the "Extra" field, if present. Else function normally. But I haven't the slightest idea how to go about locating (and assessing the skills of) such a person. Clearly, we can't throw this on the Zotero team, for all the good reasons articulated above. Would someone following this thread care to take initiative to locate a js programmer and discover his fee?
  • edited September 25, 2012
    If anyone is interested in doing some work to get RTF Scan going again, I've implemented a feature in MLZ that could be used as a starting point.

    The latest MLZ version has a tick-box in Preferences -> Export named "Include Zotero link wrappers in QuickCopy citations". If this is ticked, the behaviour of both Ctrl-Alt-A and shift-drag change as follows:
    • A citation containing a zotero://select link is generated, with cite text formatted in the current style, and structured for easy parsing (see below);
    • Dragging or copying a child note will include locator and suffix details in the cite, if it can be parsed out of the note.
    The cites look like this (the form chosen depends on whether the cite is pasted into an HTML-aware application):

    Plain Text
    {|Billy Bragg, A13: Trunk Road to the Sea, The Peel Sessions (Strange Fruit, 1991), http://www.youtube.com/watch?v=QO_CT3mcKrM | p. 45 | (A Note for You) | zotero://select/items/0_VER7GZAF}.

    HTML
    <a href="zotero://select/items/0_VER7GZAF">{|Billy Bragg, <i>A13: Trunk Road to the Sea</i>, <i>The Peel Sessions</i> (Strange Fruit, 1991), http://www.youtube.com/watch?v=QO_CT3mcKrM | p. 45 | (A Note for You)}</a>.

    HTML (rendered)
    {|Billy Bragg, A13: Trunk Road to the Sea, The Peel Sessions (Strange Fruit, 1991), http: //www.youtube.com/watch?v=QO_CT3mcKrM | p. 45 | (A Note for You)}.

    In Zotero notes, the syntax for recording pinpoints and suffix comments looks like this:

    Pinpoint
    p. 55-57

    Pinpoint with quote
    p. 63
    = Veni vidi vici.

    Pinpoint with summarising text
    p. 323
    ~ stating that few peccadilloes remain

    Any style can be used for linked citations, since the source is identified unambiguously by the zotero://select URL. With improvements recently made in MLZ, zotero://select links operate smoothly to open the linked item in Zotero, without leaving behind side effects (i.e. empty tabs). In addition to making RTF Scan parsing easier, the new format permits any application (outlining utilities etc.) that can be persuaded to treat the zotero:// link as actionable to be integrated with Zotero.
  • I would SO love it if someone were able to beef up the RTF scan feature. It could be really elegant if it could allow for things like multiple pieces by the same author, easier page numbers in citations, etc.

    Here's to hoping...
  • edited September 27, 2012
    After many hours of reading both the Scrivener and Zotero fora and subsequent experimentation with compiling/exporting, I've come to the conclusion that the RTF scan is the only viable option for now. It seems such a tremendous waste of precious time and energy to have to manually create a footnote and cut and paste every citation--this is my understanding of how the RTF scan workflow would proceed, so please do correct me if I am wrong! My first encounter with Zotero in a word processor was via the Word plugin, and it has spoiled me. The benefits of using Scrivener outweigh the ease of handling live citations in Word, but given the near-miraculous advances in technology, there has got to be a better way to do this. I would gladly pay to have Zotero integrated with Scrivener.
  • no, that's not how RTF scan works:
    http://www.zotero.org/support/rtf_scan
    To use RTF scan you input a short form of a citation in curly brackets in the document that your write in scrivener (Nissus, Mellel, what have you) and the save the text as RTF and use Zotero to convert those short forms into citations - footnotes or otherwise.

    The problem is that this is, at this point, not without its limitations - see some of the discussion in this thread, so there are alternate workflows going around (which are on various blogs and which I believe you're referring to).
  • edited September 26, 2012
    Thanks, adamsmith--I have read the Zotero support page on RTF scans as well as many forum discussions about how to use the scan. I use the curly brackets, but the citation always appears in-line along with text. I'm using Chicago Style, and need the citations in footnotes; is there a way to get them to appear this way in the scanned document? If so, would it disrupt numbering of text footnotes that do not contain citations? Many thanks for your response.
  • As an aside, it would be great if an enterprising young programmer somewhere could take a look at the new-look "scan key" forms I posted above. As the keys are unambiguous, refactoring the RTF Scan feature to use these forms should not be terribly difficult. It should also be possible to inject live Zotero fields derived from the keys into ODF text documents. It would tie Zotero into a number of productive workflows.
  • @lynnhuang
    right - that's not working the way it's supposed to. I'm pretty sure it used to.
Sign In or Register to comment.