Scrivener --> MD --> Nisus Writer Pro

This is for anyone who, like me, uses Nisus Writer Pro as well as Scrivener.

My intention behind this effort was to simplify compiling from Scrivener using Markdown to handle heading levels on the basis of binder hierarchy, rather than having to create a whole hierarchy of section types with corresponding section layouts.

Thanks to a lot of help from Martin at Nisus, by concatenating a number of shorter macros, I now have a macro MMD-RTF.nwm, which takes a .MD file opened in NWP and opens an RTF with: normal indented text; no indent following headings and block quotes; and footnotes and endnotes.

I compile to .MD, with it opening automatically in NWP, then run the Macro and switch to Page View to do any further tweaking.

It works well for all basic text including headings and block quotes. and Level 1 lists, and also converts footnotes and endnotes. The “MD-RTF macro readme” included in the attached zipped folder explains what the macro does, what I would do with more complicated lists and how I clean up footnotes and endnotes.

If, with the help of Martin or anyone else I can refine this further, I’ll post any updates.

Let me know if it is of any interest and any questions you have.


Mark (75.8 KB)


That is an interesting approach! I am wondering what sort of benefits it has over compiling straight to ODT, which Nisus does a pretty good job of converting from? Is it a problem of the stylesheet choices in that not being set up in a way that is flexible enough?

I’d never even thought of going through ODT … I only ever use LibreOffice if I have to deal with a DOCX with complex tables — which could be problematic in NWP in the past — which has been once in a blue moon and not for several years. So I’ve never tried importing an ODT file and applying a stylesheet to it. I would still have to have a macro for that.

I would think the advantage of this approach is minimal conversion at the Scrivener end and then the use of NWP’s very powerful native macro language rather than doing another conversion; RTF → MD → RTF, rather than RTF → MD → ODT → RTF.

In terms of stylesheet, this works pretty well and quickly. I need to work on the footnote/endnote display — I have mine using a hanging indent with non-superscript numbers and a stop followed by tab and the text. As I said in the readme, it’s quick to sort out in NWP, but it would be even better if they, and the Note Reference in the text followed my stylesheet.

The starting point for it all was someone posting a question in the Nisus Macro forum about an NWP → MD macro. That made me think that what would interest me more is an MD → NWP macro, and this is the result.



Yeah, while I definitely understand the rationale for not supporting RTF directly, via MMD, it is a bit of a shame that all of the available routes to NWP would have to go through an intermediary format that requires further conversion. It’s probably a fairly unique issue since most word processors do not work in RTF foremost, it is usually the other way around where Pandoc’s DOCX or MMD’s ODT is just what you want.

It’s a very interesting approach though, to essentially put the burden of MD conversion on the word processor loading it, and from that platform, more deeply integrating with that word processor’s style platform and such. With both Pandoc and MMD you have to work around the default assumptions of how these tools generate, so even if there is direct format support, you may still be working around these somewhat procedural decisions—such as whether image captions should use a word processor’s dedicated figure captioning feature, or use styled text on a paragraph below the figure (Pandoc/DOCX by default does the latter; MMD/ODT the former).

Anyway, thanks for posting the workflow!

I finally managed to get Pandoc loaded onto my M1 MBA but haven’t really explored it, as I seemed to be facing a steep learning curve that I haven’t time and energy for at the moment. And, as figures with dedicated captioning are not something that matters to me, that too is not an issue. If I did need that sort of thing, I’d definitely be exploring Pandoc and @nontroppo’s Scrivomatic workflow.

I also tried using Marked 2 to export a document with about 54 separate bullet-point lists to DOCX and opening that in NWP … the result was dreadful as every list was given a completely separate list style! Of course it also had the dozens of totally useless styles that DOCX seems to install automatically on every document.