10
$\begingroup$

How to convert a Markdown file (or text) into a Mathematica notebook?

For example, easy conversion of comprehensive MSE posts is desirable.


Possible approaches ordered according to their convenience:

  1. [ ] Extensions of "pandoc" and/or "jupytext".

  2. [ ] Web service that does that.

  3. [ ] A Mathematica package that does the conversion.

  4. [X] A stand-alone implementation (in some programming language.)


This question is an inverse of "How to export a Mathematica notebook into Markdown?".

There is a similar question, "Markdown parser in Mathematica" that asks for something more specific -- the Markdown parser to be written in Mathematica.

$\endgroup$

1 Answer 1

10
$\begingroup$

Here is a stand-alone Command Line Interface (CLI) app implemented in Raku : "Markdown::Grammar".

See the video "Markdown to Mathematica converter (CLI and StackExchange examples)" for a (quick, 7.5 min) demo.

enter image description here


For a detailed description see the corresponding:

Warning: Installation of Raku on macOS (using rakudo.org) might be not that easy. I advice using rakubrew.


Here is another video showing how to convert Jupyter notebooks into Mathematica/WL notebooks:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.