ipypublish.sphinx.notebook.extension module

ipypublish.sphinx.notebook.extension.add_ipywidgets_js_path(app, env)[source]

Insert the ipywidgets javascript url, to pages created from notebooks containing widgets.

ipypublish.sphinx.notebook.extension.add_require_js_path(app, env)[source]

Insert the require javascript package url, to pages created from notebooks.

ipypublish.sphinx.notebook.extension.associate_extensions(app, config)[source]
ipypublish.sphinx.notebook.extension.associate_single_extension(app, extension, suffix='jupyter_notebook')[source]

Associate a file extension with the NBParser.


Return the contents of javascript resource file.

ipypublish.sphinx.notebook.extension.depart_codearea_html(self, node)[source]

Add empty lines before and after the code.

ipypublish.sphinx.notebook.extension.discard_document_variables(app, env, docname)[source]

Discard any document specific variables.

ipypublish.sphinx.notebook.extension.html_add_css(app, pagename, templatename, context, doctree)[source]

Add CSS string to HTML pages that contain code cells.

ipypublish.sphinx.notebook.extension.html_add_javascript(app, pagename, templatename, context, doctree)[source]

Add JavaScript string to HTML pages that contain code cells.


Return the contents of a CSS file resource.

ipypublish.sphinx.notebook.extension.set_css_prompts(app, config)[source]

Set default value for CSS prompt width (optimized for two-digit numbers).


Initialize Sphinx extension.


TODO better latex output but not really interested in this as it would be duplication of effort, and if much better todo ipynb -> tex, rather than ipynb -> rst -> tex TODO handling of svg in latex ipypublish sets latex to output svg rather than pdf, so we don’t have to split output into ‘.. only html/latex’, which is an issue its something with a label (duplication error), however, this requires sphinx.ext.imgconverter to work

ipypublish.sphinx.notebook.extension.visit_admonition_html(self, node)[source]

add openeing div and set classes