I asked one of the Quarto dev’s a couple of years ago and they were very clear that this was by design. They are inspired by virtual environments / project folder type workflows. I understand the logic, you can git
a single folder and have all the required files as a repository in one place, versioned. This is very developer-focussed, coming from data scientists where R and Quarto were born. Pandoc is less opinionated, where there is a Pandoc data folder yet you can reference files there or anywhere else. Symlinks should hopefully paper over the differences but it is a bit of extra setup, and the other problem is Scrivener does not “respect” the project folder without some workarounds and tricks (the -mmd
suffix trick; and I don’t know how this will change in future versions, it could break). My wish for this:
- Overwriting or not the target folder as a compile setting.
- Add “compile” file exports. This would more easily manage accessory files like CSL styles etc. that could be stored in the Binder and exported explicitly at compile time. We can do this manually with a post-processor script but a bit of structuring would be great.
I should have been clearer, ScrivQ is from @bernardo_vasconcelos — my sample project is without any cool name. Have a look at both as they do demonstrate a working Scrivener project design for Quarto…
Right, YAML is a bit fussy in that it uses significant whitespace (as spaces), the keys need to be lowercase, and quotes must be straightened. I turn off a lot of the smart corrections and visualise whitespace:
but you could also just copy-paste to an editor.
That is exactly what my scrivomatic
, quarto-run.rb
and typst-run.rb
scripts do (GitHub - iandol/scrivomatic: A writing workflow using Scrivener's style system + Pandoc for output…), they setup the path and env variables as needed. I use Ruby for this but really any language can do this. The post-processor adds paths and enables other tools as needed.
Well, several of us do start-to-finish without issues, given the caveat that you use a post-processing script. You don’t need to as you said, you can run an automation[1] to do this outside of Scrivener (e.g. a file watcher daemon can check if a file changes then run a workflow involving the final parts.
Here though is my bigger problem, my major issue with using Quarto + Scrivener: cross-reference are often incompatible with Scrivener styles.
So this is one of the main things my quarto-run.rb
script handles, allows me to put cross-ref labels where I want them in the Scrivener editor, then moves them after Scrivener has compiled to MD to where Quarto expects them. I would love if Scrivener 4 gave us a couple more options how to deal with this, this is the biggest pain point IMO…
[1] The reason I love pandocomatic is because it supports pre and post scripts all in the same YAML that specifies the document, a single recipe (the one true ring ) for automatic output that could then SFTP the docs, restructure folders and just about anything else. But there are many ways to skin this automation…