Scholarly Markdown Support

I’m pretty sure this is mostly already done, as I know we will be getting Pandoc support, and if Pandoc is like MMD we can customise the compiler and tool used (update to custom MMD command etc).

But this is just to make sure this is on the radar. There is a custom fork of Pandoc (basically pandoc with a new yummy superset flavour and styling added), still a work-in-progress that is designed to focus on scholarly academic writing, Scoldoc:

It is easily installable via homebrew and provides a better pipeline for final styling than generic pandoc.

So my wish is really to remind KD to keep customisation of a custom pandoc commandline executable so we can use scoldoc instead of pandoc. 8)

Microsoft has a collaborative online, versioned academic-focussed markdown editor:

As long as it remains command-line flag compatible with Pandoc, then in theory the best solution would be to symlink a /usr/local/bin/pandoc to it, and now anything that uses Pandoc will in effect end up using Scoldoc for the processing.

As scoldoc is supposed to be a compatible superset one shouldn’t need both installed, but I think the only issue with the magic of symlinks is if one does want both scoldoc and pandoc installed and updated (by e.g. homebrew), this solution is fragile to breaking on every pandoc update…

I’m not sure the two of you fully realize the utter incomprehensibility of this discussion.



That’s what people often tell me when I speak to them!!! :blush: 8) :smiling_imp:

Wow, old thread but thanks for the info! Have been using pandoc and am writing in academia, so I will check out Scholdoc.

However, I think that even though we can use whatever processor for the text output from Scrivener, perhaps being able to customize the transformations of Scrivener footnotes etc to text output would also be needed? Or do you disagree with me on this point?

Citekey lookup would be great too :slight_smile:

Bah, the thread is only a little over a hundred days old, that’s nothing around here. :slight_smile:

What is the footnote format you are looking to achieve? There are some options available depending on what you’re going for. Best I can tell, scholdoc uses Pandoc’s footnote syntax, which is already compatible with MMD footnotes in the manner we produce them, though.

I was thinking of how the different rich annotations are translated into text. Comments or inline annotation e.g. would be nice to translate into \marginnote{comment}.

Also it would be nice to be able to translate Scrivener Links to crossreferences :mrgreen:

Inline annotations are already useful for that. You can see a practical example being used in the Scapple user manual project. Visit the Footnotes & Comments pane, where you will find some LaTeX stuff inserted within HTML comments (this I need for MultiMarkdown, it treats stuff in comments as verbatim output for LaTeX rather than escaping the codes and causing them to print in the output). So if you don’t need the HTML comments part that would look even more basic.

You might be wondering where the rest of the code is, since the annotation markers produce something like \this} in the final output, where “this” is annotated. The rest is done in the preset Replacements tab. I have a number of custom environments defined for the manual, one is \mac{…} and another is \win{…}. To create a paragraph that only prints in the Mac manual, I put it in an inline annotation, prefixed with the text, “MAC:”. You’ll find examples of these littered throughout the text in that project. I think it looks nice, and with project auto-complete lists, these special conventions you type in to trigger replacements can often be keyed in with two or so keystrokes.

So, the inline annotation itself prints \MAC:The text I want to print for Mac users.}, and then the Replacement comes along looking for “MAC:” and turns the above into: \mac{The text I want to print for Mac users.}.

If you poke through the Replacement list you’ll see a I also use a technique of inventing my own syntax. With these settings {{This}} will export as \interface{This}, which is a macro for the blue sans font I use to print button and menu labels.

These are techniques you can use right now—much more will be coming in the long term future. I think you’ll be very happy to see the feature list once that is public. :slight_smile:

Thanks! Looking through your project was a great help! Great inspiration for how to organize stuff in Scrivener, and on Compile settings.

Looking forward to seeing the next version :slight_smile: