ScrivQ | A template to control Quarto, export multiple files, manage bibliography and easily create cross-references

One thing I really like about my personal Scrivener+Pandoc setup is that I can choose which output I want–pdf, tex, docx–and it will output a file that respects my preferences concerning whether a line after an equation or blockquote should be indented or not. With pdf/tex you can use the \noindent command, but for docx that doesn’t work. So I created a new document type called noindent which I assign as desired. Then I have Scrivener set up to apply \noindent when the output is pdf or tex, or else, if the output is docx, it applies a fenced div that tells pandoc to designate the desired unindented text a specific style in a docx reference doc.

Anyway, this setup works great and I’m happy with it. But in using Quarto via rStudio lately—which I really love—I was trying to figure out how to achieve the same flexibility so I could go back and forth between pdf and docx output. Well, if it helps anyone, I found the answer. It’s the complex-paragraphs lua filter here. It works great straight from rStudio, or you can just run it with Pandoc. It is much easier to get up and running with than establishing a setup like the one of my own that I described above.

Just thought I’d mention it, because handling non-indented text after an equation or blockquote was a big issue for me when I wanted the flexibility of outputting to pdf/tex and docx from the same master markdown text.

4 Likes