-
Notifications
You must be signed in to change notification settings - Fork 138
Description
I would like to embed tables and plots generated on the fly in markdown cells based on some (hidden) initialization cells.
This is possible in the jupyter notebook thanks to this extension python-markdown.
According to the extension documentation it is possible to have the same behavior exporting via nbconvert using a pre-processor (here the preprocessor source code) :
Exporting
In order to have nbconvert show the computed Python output when exporting to another format, use the pre_pymarkdown.py preprocessor. If you used the python setup.py install command to install the IPython-contrib extension package, this will already be installed.
For manual setup, you need to copy this file to a location within the Python path (or extend PYTHONPATH). Additionally, you need to add these two lines to your jupyter_nbconvert_config.py configuration file:
c = get_config()
c.Exporter.preprocessors = ['pre_pymarkdown.PyMarkdownPreprocessor']
This works when I manually convert a notebook to html using nbconvert, but not when I try to build the doc with sphinx.
Any suggestion? Is this the best approach? (related in end to issue #15)
Thanks ;-)