Pandoc: Does Pandoc plan to support converting to/from Wolfram/Mathematica notebooks?

Created on 28 Jun 2019  路  4Comments  路  Source: jgm/pandoc

The particular use case I have in mind is: org-mode -> mathematica, and (less importantly) mathematica -> org-mode. It doesn't look like this is currently supported (unless I'm mistaken).

reader writer

Most helpful comment

(I work for Wolfram Research)

All notebooks for Wolfram products use the syntax from the Wolfram Language. In the Wolfram Language there is no syntactical difference between code and data formats. Everything follows the same expression format:
https://reference.wolfram.com/language/tutorial/EverythingIsAnExpression.html

There is a good starter tutorial on notebooks is here:
https://reference.wolfram.com/language/tutorial/NotebooksAsWolframLanguageExpressions.html.

Notebook files have the .nb extension and contain one Notebook[...] expression with a list ({...}) of Cell[...] expressions. Each Cell typically has two or three arguments with the first argument representing the cell content, the second argument representing the cell's style, and an optional third argument containing the cell's options.

Here is more documentation on notebooks and cells:

https://reference.wolfram.com/language/ref/Notebook.html
https://reference.wolfram.com/language/ref/Cell.html

Additionally cells can be grouped using CellGroupData. This allows for collapsing a number of cells so they take up less vertical space in the notebook:
https://reference.wolfram.com/language/ref/CellGroupData.html

Contents in cells is represented by a "box language" where each typeset expression can be represented by a number of "box functions":
https://reference.wolfram.com/language/guide/LowLevelNotebookStructure.html

The reference documentation for the language is located here: https://reference.wolfram.com. It is the official documentation for the Wolfram Language and provides the complete set of documented and supported functions for the notebook format in the Wolfram language.

If you need help with specifics, or have questions, please let me know and I will be happy to help with anything. If anyone reading this plans to do serious work on a Wolfram notebook converter for Pandoc, please let me know and I can help you with any necessary licenses to complete this project. Thank you for your interest in this format.

All 4 comments

Can you link to some official documentation of the format?

(I work for Wolfram Research)

All notebooks for Wolfram products use the syntax from the Wolfram Language. In the Wolfram Language there is no syntactical difference between code and data formats. Everything follows the same expression format:
https://reference.wolfram.com/language/tutorial/EverythingIsAnExpression.html

There is a good starter tutorial on notebooks is here:
https://reference.wolfram.com/language/tutorial/NotebooksAsWolframLanguageExpressions.html.

Notebook files have the .nb extension and contain one Notebook[...] expression with a list ({...}) of Cell[...] expressions. Each Cell typically has two or three arguments with the first argument representing the cell content, the second argument representing the cell's style, and an optional third argument containing the cell's options.

Here is more documentation on notebooks and cells:

https://reference.wolfram.com/language/ref/Notebook.html
https://reference.wolfram.com/language/ref/Cell.html

Additionally cells can be grouped using CellGroupData. This allows for collapsing a number of cells so they take up less vertical space in the notebook:
https://reference.wolfram.com/language/ref/CellGroupData.html

Contents in cells is represented by a "box language" where each typeset expression can be represented by a number of "box functions":
https://reference.wolfram.com/language/guide/LowLevelNotebookStructure.html

The reference documentation for the language is located here: https://reference.wolfram.com. It is the official documentation for the Wolfram Language and provides the complete set of documented and supported functions for the notebook format in the Wolfram language.

If you need help with specifics, or have questions, please let me know and I will be happy to help with anything. If anyone reading this plans to do serious work on a Wolfram notebook converter for Pandoc, please let me know and I can help you with any necessary licenses to complete this project. Thank you for your interest in this format.

@arnoudbuzing Is there any possibility that Wolfram Research can build this feature directly?

I can help you with any necessary licenses to complete this project

Everything in pandoc needs to be GPL. So if the licensing of the mathematica format prohibits that, this issue can be closed. It would still be possible to create a converter that could interface with pandoc (e.g. via JSON serialization of a pandoc structure).

Was this page helpful?
0 / 5 - 0 ratings