MyST-NB icon indicating copy to clipboard operation
MyST-NB copied to clipboard

Writing algorithms in myst-nb / defining new directives in myst

Open NelleV opened this issue 4 years ago • 2 comments

I need to write an algorithm in a myst notebook:

algorithm

In Rmd, there are several options which are mostly based on adding a new directive.

Is it possible to add a new directive to myst to support algorthims? (or any other way to support such feature).

Many thanks!

NelleV avatar Jun 23 '21 09:06 NelleV

Hey @NelleV you might want to check out https://sphinx-proof.readthedocs.io/en/latest/syntax.html

myst-parser/myst-nb utilise sphinx as the underlying documentation engine, which allows for extension plugins, of which sphinx-proof is an example

chrisjsewell avatar Jun 23 '21 10:06 chrisjsewell

I guess this would be the starting point, if you wanted to dive more into what an extension is and how to write your own: https://www.sphinx-doc.org/en/master/development/tutorials/helloworld.html

chrisjsewell avatar Jun 23 '21 10:06 chrisjsewell