I’m setting up a project with a compile to .odt using Zotero scanning cite so that I can produce a cited thesis which ends up in Word with the right paragraph formatting.
My problem is that I can generate the .odt file with styles but I can’t see how to get it inside Word using those styles but the underlying style of a different Word doc.
I’ve also tried using pandoc and mmd to achieve the same results, but no go.
Has anyone got experience of this who can lead me through what I need to do. Basically, I’m prepping to write my thesis and don’t want to write in an app that won’t deliver me what I need. I’ve previously written 14+ novels in scrivener, so I’m comfortable with the app.
Just my personal opinion, but as you’re Mac-based, I’d look at Bookends, instead of Zotero. I don’t use Word (I’m a Nisus Writer Pro guy) but it might integrate better with Word, without having to go through ODT.
Bookends can import your references from Zotero if you’ve already started with that, it is continually being updated, and the developer is well known for his responsiveness to questions.
Thanks for the response, but I’m not sure how it helps me - other than giving me an opportunity to migrate to another reference manager.
Does Scrivener automatically resolve citations entered in it via Bookends to compile to a Word file directly?
No, Bookends inserts a temporary citation, just like Zotero does. The difference, I believe, is that you can do the scanning to expand those citations and build the bibliography with whatever formatting you need, directly in Word. Go to the FAQ page on the site, where there are a number of questions relating to Word.
As I say, I’m a Nisus Writer Pro user, where doing that is very straightforward (possibly slightly more straight forward than in Word). In NWP, from the menu Tools > Bibliography I choose “Activate Bookends” (if it’s not running already), then “Scan Document” from the same sub-menu. Bookends puts up a dialog: select the bibliograhic style you need; what to do with the bibliography (appended or a separate file); and other questions. Then just tap return or click “OK”, and it just works.
I can’t remember exactly what the deal is with Bookends—I’ve had it for 15 years or more—but I think there is a fully-functional trial mode, but which is limited to something like 50 references.
Aah, I see.
Tomorrow I’ll trial Bookends to see if it can reduce the steps by one (avoiding go via .odt files) and I might also have a stab at an umpteenth attempt at getting scrivomatic to work for me as that will be just a compile and done.
I had been wondering whether to point you in the direction of Scrivomatic. On the other hand @bernardo_vasconcelos has just posted an updated version of his ScrivQ template, which might be worth looking into. I don’t know if it’s easier to get into. If I was younger, I’d be playing around with it, but I don’t need it for anything, so haven’t downloaded it.
PS Bookends is the reference manager @nontroppo uses; I think it might well integrate better with Scrivomatic/ScrivQ than Zotero, but again, I don’t know.
I’ve been trialling Bookends this morning and it does create a shorter workflow than Zotero (for me).
The only things left are to figure out how to apply styles from a reference docx file to the scanned Word file and then look to automate as much of the Bookends/Scan/Apply-Styles process as I can. The latter I’m guessing Automator or Keyboard Maestro might do the trick. I have few ideas about applying Word styles.
I’m afraid I can’t help you with that one. The last time I used Word, a few years ago, was when I was asked to edit a paper in Seismology by Chinese researchers, which was sent as a DOCX in two-column, journal format, complete with equations, graphs, footnotes, references, etc. I couldn’t do it in Scrivener without losing all the extras, but Word was installed on my then 5K iMac so I did it in that. I hated it and had to turn off “Track changes” as that made it crash every few minutes!
Prior to that the last time I used word was 2001. I loved Word 5.1a, which was brilliant, but Word 6 was appalling, so I moved on.
I’ve been using NW(P) since it’s inception, a year or so after MacOS X was launched. One of its advantages as far as I can see is that you can apply a Style Collection to an existing document, rather than, as I understand it, import the document into a Word template.
Yes and that’s what I need to do in Scrivener. I just wasn’t thinking clearly earlier on.
Thanks again again.
I write in Scrivener, use Zotero for citations, and compile to Word using Pandoc. All desired formatting in the Word file is done with a reference doc that you tell Pandoc to use as a guide. This takes a little setup, but it works well for me. I previous used Bookends but got tired of paying for periodic updates and so decided to make Zotero work for me, which it does.
I’ll be happy to help where I can, if you want to go this route.
@jpkell: Thanks for the kind offer.
Assuming I have a Zotero Bibtex library being auto-updated, what pandoc settings do I need to apply a csl file and reference.docx. And if relevant, where should I store the files? Right now they are in Users/XXX/.local/store/pandoc.
I use the Better BibTeX plugin in Zotero to output a Better CSL JSON file to a place on my harddrive. Then I drag that file into the terminal to get its terminal-friendly path. You can get your reference docx file’s path the same way. Then you can use this string in Scrivener’s “Post-process on command line” option. (To find the latter, double click on your Project Format in the compile pane, and then choose Processing in the list on the left. Set your post-processor’s path there to
<$inputfile> --citeproc --bibliography=PATH_TO_MyLibrary.json --csl=PATH_TO_YOUR_csl_FILE --reference-doc=PATH_TO_REFDOCX -o <$inputfile>.docx
Remember that any desired styling in your word file must come from the styles that are set in the reference docx. Change those using Format > Style in Word. You can make custom styles in your reference word doc, and then have Scrivener apply div class spans upon compile that tell pandoc to apply that custom style to the part of the document that has that divclass span.
Here’s a minimal working example. You’ll have to add the paths in the manner I describe in the first paragraph above:
HelloWorld.zip (110.6 KB)
Thank you. I am now generating a Word file based on styles from ref.docx and using a csl I provide.
The ‘trick’ I was missing in the Compile prompts was to deselect the ‘If no extension’ and the other checkboxes. Also I stopped giving the filename at the top of that dialogue any kind of file/dot extension.
One thing that still doesn’t quite work right is that my csl should generate something like:
(Foucault 1977, p. 123)
But it actually generates:
Foucault (1977), p. 123
Now the former occurs if I am in Word and use the Add Citation in the Zotero tab and I exported the csl I used in the app so everything would be the same.
Do you have any idea how this disparity might occur??
Hmm, not sure. If you are compiling with Pandoc, then I’d say it seems like your citation keys are probably written like this “@foucault1960 [p. 123]” instead of “[@foucault1960, p. 123]”. Pandoc allows for each, but your desired output requires the latter. That said, if you are using the latter citation form in your source document, I’d say the issue is with your csl file.
There were no square brackets around the citations. When I entered them, it all came good. Even used a ‘-’ prefix to omit the author name and it came good.
I’m using zotpick pandoc for scrivener for creating the citations from https://github.com/davepwsmith/zotpick-applescript/blob/master/README.md.
Thanks again for your help.
Now I have 2 very different ways to create my thesis with citations and a bibliography.