IPython Documentation

Table Of Contents

Previous topic

Module: nbconvert.preprocessors.convertfigures

Next topic

Module: nbconvert.preprocessors.execute

This Page

Note

This documentation is for a development version of IPython. There may be significant differences from the latest stable release.

Module: nbconvert.preprocessors.csshtmlheader

Module that pre-processes the notebook for export to HTML.

1 Class

class IPython.nbconvert.preprocessors.csshtmlheader.CSSHTMLHeaderPreprocessor(*pargs, **kwargs)

Bases: IPython.nbconvert.preprocessors.base.Preprocessor

Preprocessor used to pre-process notebook for HTML output. Adds IPython notebook front-end CSS and Pygments CSS to HTML output.

__init__(*pargs, **kwargs)
preprocess(nb, resources)

Fetch and add CSS to the resource dictionary

Fetch CSS from IPython and Pygments to add at the beginning of the html files. Add this css in resources in the “inlining.css” key

Parameters:

nb : NotebookNode

Notebook being converted

resources : dictionary

Additional resources used in the conversion process. Allows preprocessors to pass variables into the Jinja engine.