IPython Documentation

Table Of Contents

Previous topic

Module: nbconvert.transformers.convertfigures

Next topic

Module: nbconvert.transformers.extractoutput

This Page

Module: nbconvert.transformers.csshtmlheader

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

1 Class

class IPython.nbconvert.transformers.csshtmlheader.CSSHTMLHeaderTransformer(config=None, **kw)

Bases: IPython.nbconvert.transformers.base.Transformer

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

__init__(config=None, **kw)

Public constructor

Parameters:

config : Config

Configuration file structure

**kw : misc

Additional arguments

call(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 transformers to pass variables into the Jinja engine.