Hello, Martin, Adrian, et .al.
I've been trying out Martin's Macro and it works beautifully. so the workflow is currently:
- Export text to .MD from Scrivener;
- Open .MD file in NWP;
- Run the "MarkDown Preview" macro;
- Run my "Set Styles" macro to import and apply my standard styles;
- Run a simple macro to remove empty lines;
- Run the "Paragraphs, Select Following after Styles" macro and apply my non-indented paragraph style from the palette;
- Run the "Remove Unused Styles" macro;
At some point, I'll explore concatenating all, or most of that, into a single macro. There are only a couple of issues remaining for me to be able to use, with no fussing, a Scrivener --> MD --> NWP workflow:
The first is more important and concerns footnotes/endnotes. Scrivener has "Inspector footnotes" and "Inline Footnotes" resulting in two note-streams in the MD. These are marked [^fn1]: etc. for Inspector Footnotes, and [^cf1]: etc. for Inline Footnotes; both streams are treated as Endnotes by MD. For my usage the Inline footnote should be Endnotes in NWP and the Inspector Footnotes should remain as footnotes. That said, for most of my usage I don't have that many, the most important ones being bibliography references, which would be endnotes. I can sort this out manually without too much trouble, but if anyone would like to automate converting the .MD syntax to Nisus' RTF syntax, other people might find that useful.
The second item, and this is more for info, concerns working with Bookends. Markdown escapes literal { } and # — and maybe @ though I haven't checked — with a backslash. Those characters are used in the Bookends temporary citations so I presume that Bookends would not recognise them with the \s in place, but I'll check. If the escaping is a problem, it is easy enough to remove all \s by find and replace, but I might ask on the Bookends forum.
All that said, if any of you are interested in writing a macro to convert the .MD footnote/endnote syntax into Nisus' RTF syntax, I attach a short "mmd-trial.md" document exported from Scrivener that you can use for testing.
Mark