Best way to get basic paragraph separation in Pandoc


I’m using Scrivener to target compilation to Pandoc. For those paragraphs which have an associated style, I can use the compile settings to add a blank line after the paragraph, which in turn tells Pandoc the paragraph divisions. But for default text which has no Scrivener style, I can’t see how to achieve this, and so all my paragraphs are run together. What do others suggest?

Well, other than typing them in properly to begin with, :wink: one nice thing about the Layout system is that you can override how paragraphs are formatted at compile time. This can either be done with simple paragraph formatting, or through the application of styles. The former will be simpler:

  1. Open File ▸ Compile… and double-click on the preview tile in the middle column that is used for text output.
  2. Click the Override text and notes formatting setting at the bottom of the Section Layouts pane, below the editor.
  3. Click into the sample text and use the Format ▸ Paragraph ▸ Line and Paragraph Spacing… menu command. Add 12pts (assuming 12pt font) of spacing after each paragraph.
  4. Repeat for any other Layouts that would need to do this.
  5. Go into the Transformations compile format pane, and enable Convert to plain text: Paragraph spacing.

The preview tiles might look overly spaced, but it’s showing your the “rich text” preview of paragraph spacing added on top of how it previews Markdown-based output with spaces between lines. The result should be only one line of space between paragraphs in the Markdown file (not that it matters if there are one or 50).

Excellent, thank you.

BTW, one important reason for not doing paragraph separation with a blank line is that doing so makes it harder to compile to other formats properly. A big reason why I like writing in Scrivener is that I can set the formatting to look like a book (i.e. no paragraph spacing, first line indent), and I find it’s important to have a text in Scrivener that looks vaguely like the text after typesetting. Otherwise I could just write in a text editor… (There are some other features but I’ve found in practice this makes a difference for me.)

Anyway, thanks for the tip, which seems to work great!

Quite right, it will be useful if you want to just proof with the built-in PDF or whatever. I just mention that since some aren’t aware you can use Scrivener to draft Markdown text directly, kind of ignoring the rich text aspect of it. But you can also completely eschew all syntax as well, or take a middle ground of your choosing. It’s one of the reasons I like this platform!