Skip to content

Latest commit

 

History

History
65 lines (40 loc) · 5.79 KB

Scrivener+Quarto.md

File metadata and controls

65 lines (40 loc) · 5.79 KB
layout title permalink
page
Scrivener + Quarto Template
/scrivener-quarto/

Scrivener + Quarto Template

See the Scrivener forum post for the latest details…

Scrivener (macOS / Windows) is a program for all types of writers, handling the structural organisation and constructive process of writing like nothing else. You write and manage text, ideas, figures and reference materials all in one place without having to worry about the final "look". The final "look" is handled by a process called compiling, where you choose the output format and select the contents with great flexibility. Though Scrivener uses rich text internally, it has excellent integration with plain text markdown, including Pandoc. Scrivener uses block and inline styles that can map to markdown; you write with editor styles but compile to markdown.

Quarto (cross-platform) is a scientific and technical writing system built on top of Pandoc. It enables one to use live code blocks, diagrams and very flexible layout to multiple output formats. It includes many useful extensions, and growing number of templates for academic journal submissions.


DOWNLOADS:

Scrivener + Quarto Project Template: save this file removing any .txt suffix if added by your browser; import the Scrivener + Quarto.scrivtemplate file using File → New Project… dialog, and then select the Non-Fiction → Scrivener + Quarto template to create your new project!

Alternative: project as a regular ZIP file.

Example PDF compiled directly from the above Scrivener project.

The bundled post-processing script can be checked here.

Quarto supports many journal templates and extensions which can be downloaded and installed. See this awesome list for a curated list.


Most Quarto features can be used via three routes, and the Scrivener + Quarto template demonstrates all three:

  1. Using Scrivener Styles — examples: Callouts, Live Code. The main caveat with Styles is Scrivener doesn't allow paragraph [block] styles to be nested.
  2. Using Scrivener Section Layouts — example: multi-item images / tables using cross-referencing attributes. This method allows nested blocks. Scrivener document templates are provided.
  3. You can always write plain markdown in the editor if you prefer…

Quarto's documentation is excellent. Some of the cool features that Quarto includes and work well with Scrivener:

  1. Panels with sub-figures and sub-tables.
  2. Based on Tufte, you can use margins for notes, figures, equations etc. Layout can be modified to span the page in many ways. You can rewrite layouts using Pandoc's templating language.
  3. Comprehensive cross-referencing, using Pandoc's @citation markup (based on pandoc-crossref). For sub-figures / tables, you can add labels, like Figure 3(c) and these can be customised.
  4. Academic author + affiliation metadata «similar to scrivomatic and pandoc scholar».
  5. Run Python, R, Julia code "live" to plot figures on each compile.
  6. Use graphing engines like Mermaid and Graphviz.
  7. HTML output has lots of cool tweaks, see https://quarto-dev.github.io/quarto-gallery/page-layout/tufte.html for example.
  8. Quarto allows installable extensions, so you can plug in new layout templates and code to extend its powers!
  9. As it is Pandoc-based, there are many formats supported and Pandoc's custom filters customise many aspects of the final document.

Quarto installs [almost] everything required (you can use it to manage Pandoc, LaTeX, Graphviz, Mermaid and other tools all-in-one). For LaTeX it can install and update TinyTeX, which enables a small install footprint and automated addition of packages from CTAN as required (no fussing with tlmgr)…


Requirements

  1. Install Quarto (quarto bundles pandoc for you). Both brew «macOS/Linux» and scoop «Windows» can install quarto for you.
  2. You can then use Quarto to install LaTeX: quarto tools install tinytex — TinyTeX is small yet can auto-install required packages if they are missing as needed; OR you can use an existing TeX Live installation (I use BasicTeX on macOS).
  3. For Mermaid & Graphviz, Quarto can install a Chromium runtime if you don't have Chrome installed: quarto tools install chromium.
  4. The script requires Ruby, which is already installed on macOS. You can use brew or scoop to install/update it otherwise.

Tips

Quarto allows you to preview your compiled document. So after the first compilation from Scrivener you can point quarto to that .qmd file and it will continually render it in a browser for you each time you recompile: quarto preview MyFile.qmd --to html