Writing in Markdown

Posts: 38
Joined: Sat Dec 18, 2010 12:47 pm
Platform: Mac + Windows

Wed Nov 22, 2017 8:28 am Post

I know Scrivener compiles in Markdown but I wonder where it is going with Markdown generally?

For many of us Markdown is a de facto standard. It would be really helpful to be able to write and preview Markdown, and then compile in another format.

Most of my words these days go to the online web rather than the printroom web, and there are writing environments more designed for online content – but I like Scrivener and would like Scrivener to grow in this direction.

Posts: 1381
Joined: Wed Mar 18, 2009 12:22 pm
Platform: Mac

Wed Nov 22, 2017 8:58 am Post

For many features of Markdown, you don't actually have to write in Markdown -- by which I mean that you can use the normal shortcuts for bold / italic, bullet points, links and Scrivener features such as links and so on. After all, in terms of efficiency, cmd-b is actually quicker to type than shift-8 shift-8...

Then, when you want to compile your project, you choose one of the Markdown output formats (of which there are several) and Scrivener does the conversion for you -- so you're producing properly formatted multi-markdown text. I've tested it and as far as I can see, it works well.

The new Version 3 has more features in this regard than V2 -- it will convert tables and lists, for example. Also the new Styles features allows you to do some very clever things (such as adding prefixes/code during compilation. Eg set up a style in the editor without the tags, and on compilation the styled text has the markdown tags inserted.)

I'm not saying for a minute that it's not legitimate to use Markdown in the Editor — or that the conversion will do absolutely everything that anybody could ever need.

But I started off writing in Markdown and in the end came to the conclusion that for me it was an unnecessary complication -- I don't need a syntax highlighter (because RTF in effect does that) and the end compilation result is still markdown for all the benefits of plain text. So for my basic usage at least, I don't see what advantages I was getting.

So really, this is a general (genuine and respectful) question to you: what would you need that isn't provided by this approach?

User avatar
Posts: 752
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Wed Nov 22, 2017 10:49 am Post

Scrivener is fully committed to supporting markdown (they write their own software manuals in it after all). I always compile to markdown from Scrivener, and consider it an excellent editor for all markdown output. Scrivener 3 has comprehensive support for using both Multimarkdown and/or Pandoc flavoured markdown.

I have a full workflow for using Pandoc with Scrivener, with tips for writing in Scrivener, a compile format for pandoc content and more: https://github.com/iandol/scrivomatic

Scrivener is incredibly flexible, and there are several ways to skin this cat. I've chosen to embrace the combined method: I'll use Scrivener styles for all of my structuring (including rebinding ⌘I and ⌘B to use inline styles), then have the compile format perform the conversions to pandoc markup. Scrivener does flexible conversions of footnotes, tables and comments.

User avatar
Site Admin
Posts: 19190
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall

Wed Nov 22, 2017 12:12 pm Post

Indeed, we are committed to supporting Markdown at the export stage for those who wish to write that way. However, we are equally committed to Scrivener being a rich text editor, and all of the editor features are built on this premise. So it is very unlikely that there will ever be a Markdown writing mode with syntax highlighting and so on, because that would require a very different set of editing tools that would be completely incompatible with the majority of buttons and menu items that Scrivener provides for rich text.

All the best,
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

Posts: 38
Joined: Sat Dec 18, 2010 12:47 pm
Platform: Mac + Windows

Wed Nov 22, 2017 6:01 pm Post

Very helpful comments, thank you. I'll try a different (easier?) workflow relying on Scrivener's compile-to-Markdown as suggested.