



nbconvert 7.9.2 documentation

[Skip to main content](#main-content)

 Back to top

 

`Ctrl`+`K`

[None](#)

 Site Navigation

 

* [Installation](#)

* [Using as a command line tool](#)

* [Using nbconvert as a library](#)

* [Dejavu](#)

* [LaTeX citations](#)

* More

 

	+ [Removing cells, inputs, or outputs](#)

	+ [Executing notebooks](#)

	+ [Configuration options](#)

	+ [Creating Custom Templates for nbconvert](#)

	+ [Customizing exporters](#)

	+ [Customizing Syntax Highlighting](#)

	+ [Architecture of nbconvert](#)

	+ [Python API for working with nbconvert](#)

	+ [Making an nbconvert release](#)

	+ [Changes in nbconvert](#)

	+ [Need help?](#)

 Site Navigation

 

* [Installation](#)

* [Using as a command line tool](#)

* [Using nbconvert as a library](#)

* [Dejavu](#)

* [LaTeX citations](#)

* More

 

	+ [Removing cells, inputs, or outputs](#)

	+ [Executing notebooks](#)

	+ [Configuration options](#)

	+ [Creating Custom Templates for nbconvert](#)

	+ [Customizing exporters](#)

	+ [Customizing Syntax Highlighting](#)

	+ [Architecture of nbconvert](#)

	+ [Python API for working with nbconvert](#)

	+ [Making an nbconvert release](#)

	+ [Changes in nbconvert](#)

	+ [Need help?](#)

nbconvert: Convert Notebooks to other formats[#](#nbconvert-convert-notebooks-to-other-formats "Permalink to this heading")

===========================================================================================================================

Using `nbconvert` enables:

> 

> * **presentation** of information in familiar formats, such as PDF.

> * **publishing** of research using LaTeX and opens the door for embedding

> notebooks in papers.

> * **collaboration** with others who may not use the notebook in their

> work.

> * **sharing** contents with many people via the web using HTML.

> 

> 

> 

Overall, notebook conversion and the `nbconvert` tool give scientists and

researchers the flexibility to deliver information in a timely way across

different formats.

Primarily, the `nbconvert` tool allows you to convert a Jupyter `.ipynb`

notebook document file into another static format including HTML, LaTeX, PDF,

Markdown, reStructuredText, and more. `nbconvert` can also add productivity

to your workflow when used to execute notebooks programmatically.

If used as a Python library (`import nbconvert`), `nbconvert` adds

notebook conversion within a project. For example, `nbconvert` is used to

implement the “Download as” feature within the Jupyter Notebook web

application. When used as a command line tool (invoked as

`jupyter nbconvert ...`), users can conveniently convert just one or a

batch of notebook files to another format.

**Contents:**

Installation[#](#installation "Permalink to this heading")

----------------------------------------------------------

See also

[Installing Jupyter](https://jupyter.readthedocs.io/en/latest/install.html)Nbconvert is part of the Jupyter ecosystem.

### Supported Python versions[#](#supported-python-versions "Permalink to this heading")

Currently Python 3.7-3.9 is supported and tested by nbconvert.

### Installing nbconvert[#](#installing-nbconvert "Permalink to this heading")

Nbconvert is packaged for both pip and conda, so you can install it with:

```

pip install nbconvert

# OR

conda install nbconvert

```

The [Miniconda](https://docs.conda.io/en/latest/miniconda.html) and [Miniforge](https://github.com/conda-forge/miniforge/) distributions both provide a minimal conda installation.

Important

To unlock its full capabilities, nbconvert requires Pandoc, TeX

(specifically, XeLaTeX) and playwright. These must be installed separately.

### Installing Pandoc[#](#installing-pandoc "Permalink to this heading")

For converting markdown to formats other than HTML, nbconvert uses

[Pandoc](https://pandoc.org) (1.12.1 or later).

To install pandoc on Linux, you can generally use your package manager:

```

sudo apt-get install pandoc

```

On other platforms, you can get pandoc from

[their website](https://pandoc.org/installing.html).

### Installing TeX[#](#installing-tex "Permalink to this heading")

For converting notebooks to PDF (with `--to pdf`), nbconvert makes use of LaTeX

and the XeTeX as the rendering engine.

New in version 5.0: We use XeTeX as the rendering engine rather than pdfTeX (as

in earlier versions). XeTeX can access fonts through native

operating system libraries, it has better support for OpenType

formatted fonts and Unicode characters.

To install a complete TeX environment (including XeLaTeX and

the necessary supporting packages) by hand can be tricky.

Fortunately, there are packages that make this much easier. These

packages are specific to different operating systems:

* Linux: [TeX Live](http://tug.org/texlive/)

	+ E.g. on Debian or Ubuntu:

	

	

	

	```

	sudo apt-get install texlive-xetex texlive-fonts-recommended texlive-plain-generic

	

	```

* macOS (OS X): [MacTeX](http://tug.org/mactex/).

* Windows: [Latex Project](https://www.latex-project.org/get/).

Because nbconvert depends on packages and fonts included in standard

TeX distributions, if you do not have a complete installation, you

may not be able to use nbconvert’s standard tooling to convert

notebooks to PDF.

### Installing Chromium[#](#installing-chromium "Permalink to this heading")

For converting notebooks to PDF with `--to webpdf`, nbconvert requires the

[playwright](https://github.com/microsoft/playwright-python) Chromium automation library.

Playwright makes use of a specific version of Chromium. If it does not find a suitable

installation of the web browser, it can automatically download it if the `--allow-chromium-download`

flag is passed to the command line.

To install a suitable version of playwright, you can pip install `nbconvert[webpdf]`.

#### PDF conversion on a limited TeX environment[#](#pdf-conversion-on-a-limited-tex-environment "Permalink to this heading")

If you are only able to install a limited TeX environment, there are two main routes you could take to convert to PDF:

1. Using TeX by hand

	1. You could convert to `.tex` directly; this requires Pandoc.

	2. edit the file to accord with your local environment

	3. run `xelatex` directly.

2. Custom exporter

	1. You could write a [custom exporter](index.html#external-exporters)

	that takes your system’s limitations into account.

Using as a command line tool[#](#using-as-a-command-line-tool "Permalink to this heading")

------------------------------------------------------------------------------------------

The command-line syntax to run the `nbconvert` script is:

```

$ jupyter nbconvert --to FORMAT notebook.ipynb

```

This will convert the Jupyter notebook file `notebook.ipynb` into the output

format given by the `FORMAT` string.

### Default output format[#](#default-output-format "Permalink to this heading")

In 5.x versions of nbconvert the default output format was html. In 6.0 the default was removed,

requiring CLI calls to explicitly set a `--to` argument in order to execute. To mimic original

5.x behavior one should add `--to=html` to the `jupyter nbconvert` command.

### Supported output formats[#](#supported-output-formats "Permalink to this heading")

The currently supported output formats are:

> 

> * [HTML](#convert-html),

> * [LaTeX](#convert-latex),

> * [PDF](#convert-pdf),

> * [WebPDF](#convert-webpdf),

> * [Reveal.js HTML slideshow](#convert-revealjs),

> * [Markdown](#convert-markdown),

> * [Ascii](#convert-ascii),

> * [reStructuredText](#convert-rst),

> * [executable script](#convert-script),

> * [notebook](#convert-notebook).

> 

> 

> 

Jupyter also provides a few templates for output formats. These can be

specified via an additional `--template` argument and are listed in the

sections below.

#### HTML[#](#html "Permalink to this heading")

* `--to html`

HTML Export. Note on backward compatibility: Be aware that if you were using custom copies of the old 5.x

template files (i.e. `--template`), you will now need to use `--template-file path/to/old/file.tpl`

in order to use that file in compatibility mode as opposed to other options.

	+ `--template lab` (default)

	

	

	A full static HTML render of the notebook.

	This looks very similar to the JupyterLab interactive view.

	

	

	The lab template supports the extra `--theme` option, which defaults to `light`.

	This extra option not only allows you to use the default `light` or `dark` themes provided by JupyterLab,

	but it allows you to use custom themes. For example:

	

	

	`pip install jupyterlab-miami-nights` then `--theme jupyterlab\_miami\_nights`.

	+ `--template classic`

	

	

	Simplified HTML, using the classic jupyter look and feel.

	+ `--template basic`

	

	

	Base HTML, rendering with minimal structure and styles.

	+ `--embed-images`

	

	

	If this option is provided, embed images as base64 urls in the resulting HTML file.

#### LaTeX[#](#latex "Permalink to this heading")

* `--to latex`

Latex export. This generates `NOTEBOOK\_NAME.tex` file,

ready for export.

Images are output as .png files in a folder.

	+ `--template article` (default)

	

	

	Latex article, derived from Sphinx’s howto template.

	+ `--template report`

	

	

	Latex report, providing a table of contents and chapters.Optionally you can specify `authors`, `title` and `date` in the notebook’s

metadata. These will be used to render the header of the LaTeX document.

```

{

 "authors": [

 {

 "name": "Jane Doe"

 },

 {

 "name": "John Doe"

 }

 ],

 "date": "January 2023",

 "title": "Annual Data Report 2022",

 "kernelspec": { },

 "language\_info": { }

}

```

If no date is specified, today’s date will be used (i.e. the date when the

document is re/compiled). Use an empty string to suppress the date.

The values in the notebook can be overridden by the command line arguments

`--LatexPreprocessor.title`, `--LatexPreprocessor.date` and

`--LatexPreprocessor.author\_names` (specify this argument multiple times

for each individual author name).

Note

nbconvert uses [pandoc](https://pandoc.org/) to convert between various markup languages,

so pandoc is a dependency when converting to latex or reStructuredText.

#### PDF[#](#pdf "Permalink to this heading")

* `--to pdf`

Generates a PDF via latex. Supports the same templates as `--to latex`.

#### WebPDF[#](#webpdf "Permalink to this heading")

* `--to webpdf`

Generates a PDF by first rendering to HTML, rendering the HTML Chromium headless, and

exporting to PDF. This exporter supports the same templates as `--to html`.

The webpdf exporter requires the `playwright` Chromium automation library, which

can be installed via `nbconvert[webpdf]`.

#### Reveal.js HTML slideshow[#](#reveal-js-html-slideshow "Permalink to this heading")

Note

In order to designate a mapping from notebook cells to Reveal.js slides,

from within the Jupyter notebook, select menu item

View –> Cell Toolbar –> Slideshow. That will reveal a drop-down menu

on the upper-right of each cell. From it, one may choose from

“Slide,” “Sub-Slide”, “Fragment”, “Skip”, and “Notes.” On conversion,

cells designated as “skip” will not be included, “notes” will be included

only in presenter notes, etc.

* `--to slides`

This generates a Reveal.js HTML slideshow.

Running this slideshow requires a copy of reveal.js (version 4.x).

By default, this will include a script tag in the html that will directly load

reveal.js from a public CDN.

This means that if you include your slides on a webpage, they should work as

expected. However, some features (specifically, speaker notes & timers) will not

work on website because they require access to a local copy of reveal.js.

Speaker notes require a local copy of reveal.js. Then, you need to tell

`nbconvert` how to find that local copy.

Timers only work if you already have speaker notes, but also require a local

https server. You can read more about this in [ServePostProcessorExample](#servepostprocessorexample).

To make this clearer, let’s look at an example of how to get speaker notes

working with a local copy of reveal.js: [SlidesWithNotesExample](#slideswithnotesexample).

##### Example: creating slides w/ speaker notes[#](#example-creating-slides-w-speaker-notes "Permalink to this heading")

Let’s suppose you have a notebook `your\_talk.ipynb` that you want to convert

to slides. For this example, we’ll assume that you are working in the same

directory as the notebook you want to convert (i.e., when you run `ls .`,

`your\_talk.ipynb` shows up amongst the list of files).

First, we need a copy of reveal.js in the same directory as your slides. One

way to do this is to use the following commands in your terminal:

```

git clone https://github.com/hakimel/reveal.js.git

cd reveal.js

git checkout 3.5.0

cd ..

```

Then we need to tell nbconvert to point to this local copy. To do that we use

the `--reveal-prefix` command line flag to point to the local copy.

```

jupyter nbconvert your_talk.ipynb --to slides --reveal-prefix reveal.js

```

This will create file `your\_talk.slides.html`, which you should be able to

access with `open your\_talk.slides.html`. To access the speaker notes, press

`s` after the slides load and they should open in a new window.

Note: This does not enable slides that run completely offline. While you have a

local copy of reveal.js, by default, the slides need to access mathjax, require,

and jquery via a public CDN. Addressing this use case is an open issue and [PRs](https://github.com/jupyter/nbconvert/pulls) are always encouraged.

##### Serving slides with an https server: `--post serve`[#](#serving-slides-with-an-https-server-post-serve "Permalink to this heading")

Once you have speaker notes working you may notice that your timers don’t work.

Timers require a bit more infrastructure; you need to serve your local copy of

reveal.js from a local https server.

Fortunately, `nbconvert` makes this fairly straightforward through the use of

the `ServePostProcessor`. To activate this server, we append the command line

flag `--post serve` to our call to nbconvert.

```

jupyter nbconvert your_talk.ipynb --to slides --reveal-prefix reveal.js --post serve

```

This will run the server, which will occupy the terminal that you ran the

command in until you stop it. You can stop the server by pressing `ctrl C`

twice.

#### Markdown[#](#markdown "Permalink to this heading")

* `--to markdown`

Simple markdown output. Markdown cells are unaffected,

and code cells indented 4 spaces.

Images are output as .png files in a folder.

#### Ascii[#](#ascii "Permalink to this heading")

* `--to asciidoc`

Ascii output.

Images are output as .png files in a folder.

#### reStructuredText[#](#restructuredtext "Permalink to this heading")

* `--to rst`

Basic reStructuredText output. Useful as a starting point for embedding

notebooks in Sphinx docs.

Images are output as .png files in a folder.

Note

nbconvert uses [pandoc](https://pandoc.org/) to convert between various markup languages,

so pandoc is a dependency when converting to LaTeX or reStructuredText.

#### Executable script[#](#executable-script "Permalink to this heading")

* `--to script`

Convert a notebook to an executable script.

This is the simplest way to get a Python (or other language, depending on

the kernel) script out of a notebook. If there were any magics in an

Jupyter notebook, this may only be executable from a Jupyter session.

For example, to convert a Julia notebook to a Julia executable script:

```

jupyter nbconvert --to script my_julia_notebook.ipynb

```

#### Notebook and preprocessors[#](#notebook-and-preprocessors "Permalink to this heading")

* `--to notebook`

New in version 3.0.

This doesn’t convert a notebook to a different format *per se*,

instead it allows the running of nbconvert preprocessors on a notebook,

and/or conversion to other notebook formats. For example:

```

jupyter nbconvert --to notebook --execute mynotebook.ipynb

```

This will open the notebook, execute it, capture new output, and save the

result in `mynotebook.nbconvert.ipynb`. Specifying `--inplace` will

overwrite the input file instead of writing a new file. By default,

`nbconvert` will abort conversion if any exceptions occur during

execution of a cell. If you specify `--allow-errors` (in addition to the

`--execute` flag) then conversion will continue and the output from any

exception will be included in the cell output.

The following command:

```

jupyter nbconvert --to notebook --nbformat 3 mynotebook

```

will create a copy of `mynotebook.ipynb` in `mynotebook.v3.ipynb`

in version 3 of the notebook format.

If you want to convert a notebook in-place, you can specify the output file

to be the same as the input file:

```

jupyter nbconvert --to notebook mynb --output mynb

```

Be careful with that, since it will replace the input file.

Note

nbconvert uses [pandoc](https://pandoc.org/) to convert between various markup languages,

so pandoc is a dependency when converting to latex or reStructuredText.

The output file created by `nbconvert` will have the same base name as

the notebook and will be placed in the current working directory. Any

supporting files (graphics, etc) will be placed in a new directory with the

same base name as the notebook, suffixed with `\_files`:

```

$ jupyter nbconvert notebook.ipynb

$ ls

notebook.ipynb   notebook.html    notebook_files/

```

For simple single-file output, such as html, markdown, etc.,

the output may be sent to standard output with:

```

$ jupyter nbconvert --to markdown notebook.ipynb --stdout

```

### Converting multiple notebooks[#](#converting-multiple-notebooks "Permalink to this heading")

Multiple notebooks can be specified from the command line:

```

$ jupyter nbconvert notebook*.ipynb

$ jupyter nbconvert notebook1.ipynb notebook2.ipynb

```

or via a list in a configuration file, say `mycfg.py`, containing the text:

```

c = get\_config()

c.NbConvertApp.notebooks = ["notebook1.ipynb", "notebook2.ipynb"]

```

and using the command:

```

$ jupyter nbconvert --config mycfg.py

```

Using nbconvert as a library[#](#Using-nbconvert-as-a-library "Permalink to this heading")

------------------------------------------------------------------------------------------

In this notebook, you will be introduced to the programmatic API of nbconvert and how it can be used in various contexts.

A great [blog post](http://jakevdp.github.io/blog/2013/04/15/code-golf-in-python-sudoku/) by [@jakevdp](https://github.com/jakevdp) will be used to demonstrate. This notebook will not focus on using the command line tool. The attentive reader will point-out that no data is read from or written to disk during the conversion process. This is because nbconvert has been designed to work in memory so that it works well in a database or web-based environment too.

### Quick overview[#](#Quick-overview "Permalink to this heading")

Credit: Jonathan Frederic (@jdfreder on github)

The main principle of nbconvert is to instantiate an `Exporter` that controls the pipeline through which notebooks are converted.

First, download @jakevdp’s notebook (if you do not have `requests`, install it by running `pip install requests`, or if you don’t have pip installed, you can find it on PYPI):

```

[1]:

```

```

from urllib.request import urlopen

url = 'https://jakevdp.github.io/downloads/notebooks/XKCD\_plots.ipynb'

response = urlopen(url).read().decode()

response[0:60] + ' ...'

```

```

[1]:

```

```

'{\n "cells": [\n  {\n   "cell_type": "markdown",\n   "metadata": ...'

```

The response is a JSON string which represents a Jupyter notebook.

Next, we will read the response using nbformat. Doing this will guarantee that the notebook structure is valid. Note that the in-memory format and on disk format are slightly different. In particular, on disk, multiline strings might be split into a list of strings.

```

[2]:

```

```

import nbformat

jake\_notebook = nbformat.reads(response, as\_version=4)

jake\_notebook.cells[0]

```

```

[2]:

```

```

{'cell_type': 'markdown',

 'metadata': {},

 'source': '# XKCD plots in Matplotlib'}

```

The nbformat API returns a special type of dictionary. For this example, you don’t need to worry about the details of the structure (if you are interested, please see the [nbformat documentation](https://nbformat.readthedocs.io/en/latest/)).

The nbconvert API exposes some basic exporters for common formats and defaults. You will start by using one of them. First, you will import one of these exporters (specifically, the HTML exporter), then instantiate it using most of the defaults, and then you will use it to process the notebook we downloaded earlier.

```

[3]:

```

```

from traitlets.config import Config

# 1. Import the exporter

from nbconvert import HTMLExporter

# 2. Instantiate the exporter. We use the `classic` template for now; we'll get into more details

# later about how to customize the exporter further.

html\_exporter = HTMLExporter(template\_name='classic')

# 3. Process the notebook we loaded earlier

(body, resources) = html\_exporter.from\_notebook\_node(jake\_notebook)

```

The exporter returns a tuple containing the source of the converted notebook, as well as a resources dict. In this case, the source is just raw HTML:

```

[4]:

```

```

print(body[:400] + '...')

```

```

<!DOCTYPE html>

<html lang="en">

<head><meta charset="utf-8"/>

<meta content="width=device-width, initial-scale=1.0" name="viewport"/>

<title>Notebook</title><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script><script type="module">

  import mermaid from 'https://cdn...

```

If you understand HTML, you’ll notice that some common tags are omitted, like the `body` tag. Those tags are included in the default `HtmlExporter`, which is what would have been constructed if we had not modified the `template\_file`.

The resource dict contains (among many things) the extracted `.png`, `.jpg`, etc. from the notebook when applicable. The basic HTML exporter leaves the figures as embedded base64, but you can configure it to extract the figures. So for now, the resource dict should be mostly empty, except for a key containing CSS and a few others whose content will be obvious:

```

[5]:

```

```

print("Resources:", resources.keys())

print("Metadata:", resources['metadata'].keys())

print("Inlining:", resources['inlining'].keys())

print("Extension:", resources['output\_extension'])

```

```

Resources: dict_keys(['metadata', 'output_extension', 'deprecated', 'theme', 'include_css', 'include_lab_theme', 'include_js', 'include_url', 'require_js_url', 'mathjax_url', 'mermaid_js_url', 'jquery_url', 'jupyter_widgets_base_url', 'widget_renderer_url', 'html_manager_semver_range', 'should_sanitize_html', 'language_code', 'inlining', 'raw_mimetypes', 'global_content_filter'])

Metadata: dict_keys(['name'])

Inlining: dict_keys(['css'])

Extension: .html

```

`Exporter`s are stateless, so you won’t be able to extract any useful information beyond their configuration. You can re-use an exporter instance to convert another notebook. In addition to the `from\_notebook\_node` used above, each exporter exposes `from\_file` and `from\_filename` methods.

### Extracting Figures using the RST Exporter[#](#Extracting-Figures-using-the-RST-Exporter "Permalink to this heading")

When exporting, you may want to extract the base64 encoded figures as files. While the HTML exporter does not do this by default, the `RstExporter` does:

```

[6]:

```

```

# Import the RST exproter

from nbconvert import RSTExporter

# Instantiate it

rst\_exporter = RSTExporter()

# Convert the notebook to RST format

(body, resources) = rst\_exporter.from\_notebook\_node(jake\_notebook)

print(body[:970] + '...')

print('[.....]')

print(body[800:1200] + '...')

```

```

/home/docs/checkouts/readthedocs.org/user_builds/nbconvert/envs/stable/lib/python3.11/site-packages/nbconvert/utils/pandoc.py:51: RuntimeWarning: You are using an unsupported version of pandoc (2.9.2.1).

Your version must be at least (2.14.2) but less than (4.0.0).

Refer to https://pandoc.org/installing.html.

Continuing with doubts...

  check_pandoc_version()

```

```

XKCD plots in Matplotlib

========================

This notebook originally appeared as a blog post at `Pythonic

Perambulations <http://jakevdp.github.com/blog/2012/10/07/xkcd-style-plots-in-matplotlib/>`__

by Jake Vanderplas.

.. raw:: html

   <!-- PELICAN_BEGIN_SUMMARY -->

*Update: the matplotlib pull request has been merged! See* `This

post <http://jakevdp.github.io/blog/2013/07/10/XKCD-plots-in-matplotlib/>`__

*for a description of the XKCD functionality now built-in to

matplotlib!*

One of the problems I’ve had with typical matplotlib figures is that

everything in them is so precise, so perfect. For an example of what I

mean, take a look at this figure:

.. code:: ipython3

    from IPython.display import Image

    Image('http://jakevdp.github.com/figures/xkcd_version.png')

.. image:: output_3_0.png

Sometimes when showing schematic plots, this is the type of figure I

want to display. But drawing it by hand is a pain: I’d rather just use

matpl...

[.....]

mage:: output_3_0.png

Sometimes when showing schematic plots, this is the type of figure I

want to display. But drawing it by hand is a pain: I’d rather just use

matplotlib. The problem is, matplotlib is a bit too precise. Attempting

to duplicate this figure in matplotlib leads to something like this:

.. code:: ipython3

    Image('http://jakevdp.github.com/figures/mpl_version.png')

.. ima...

```

Notice that base64 images are not embedded, but instead there are filename-like strings, such as `output\_3\_0.png`. The strings actually are (configurable) keys that map to the binary data in the resources dict.

Note, if you write an RST Plugin, you are responsible for writing all the files to the disk (or uploading, etc…) in the right location. Of course, the naming scheme is configurable.

As an exercise, this notebook will show you how to get one of those images. First, take a look at the `'outputs'` of the returned resources dictionary. This is a dictionary that contains a key for each extracted resource, with values corresponding to the actual base64 encoding:

```

[7]:

```

```

sorted(resources['outputs'].keys())

```

```

[7]:

```

```

['output_13_1.png',

 'output_16_0.png',

 'output_18_1.png',

 'output_3_0.png',

 'output_5_0.png']

```

In this case, there are 5 extracted binary figures, all `png`s. We can use the Image display object to actually display one of the images:

```

[8]:

```

```

from IPython.display import Image

Image(data=resources['outputs']['output\_3\_0.png'], format='png')

```

```

[8]:

```

![_images/nbconvert_library_20_0.png](_images/nbconvert_library_20_0.png)

Note that this image is being rendered without ever reading or writing to the disk.

### Extracting Figures using the HTML Exporter[#](#Extracting-Figures-using-the-HTML-Exporter "Permalink to this heading")

As mentioned above, by default, the HTML exporter does not extract images – it just leaves them as inline base64 encodings. However, this is not always what you might want. For example, here is a use case from @jakevdp:

> 

> I write an [awesome blog](http://jakevdp.github.io/) using Jupyter notebooks converted to HTML, and I want the images to be cached. Having one html file with all of the images base64 encoded inside it is nice when sharing with a coworker, but for a website, not so much. I need an HTML exporter, and I want it to extract the figures!

> 

> 

> 

#### Some theory[#](#Some-theory "Permalink to this heading")

Before we get into actually extracting the figures, it will be helpful to give a high-level overview of the process of converting a notebook to a another format:

1. Retrieve the notebook and it’s accompanying resources (you are responsible for this).

2. Feed the notebook into the `Exporter`, which:

	1. Sequentially feeds the notebook into an array of `Preprocessor`s. Preprocessors only act on the **structure** of the notebook, and have unrestricted access to it.

	2. Feeds the notebook into the Jinja templating engine, which converts it to a particular format depending on which template is selected.

3. The exporter returns the converted notebook and other relevant resources as a tuple.

4. You write the data to the disk using the built-in `FilesWriter` (which writes the notebook and any extracted files to disk), or elsewhere using a custom `Writer`.

#### Using different preprocessors[#](#Using-different-preprocessors "Permalink to this heading")

To extract the figures when using the HTML exporter, we will want to change which `Preprocessor`s we are using. There are several preprocessors that come with nbconvert, including one called the `ExtractOutputPreprocessor`.

The `ExtractOutputPreprocessor` is responsible for crawling the notebook, finding all of the figures, and putting them into the resources directory, as well as choosing the key (i.e. `filename\_xx\_y.extension`) that can replace the figure inside the template. To enable the `ExtractOutputPreprocessor`, we must add it to the exporter’s list of preprocessors:

```

[9]:

```

```

# create a configuration object that changes the preprocessors

from traitlets.config import Config

c = Config()

c.HTMLExporter.preprocessors = ['nbconvert.preprocessors.ExtractOutputPreprocessor']

# create the new exporter using the custom config

html\_exporter\_with\_figs = HTMLExporter(config=c)

html\_exporter\_with\_figs.preprocessors

```

```

[9]:

```

```

['nbconvert.preprocessors.ExtractOutputPreprocessor']

```

We can compare the result of converting the notebook using the original HTML exporter and our new customized one:

```

[10]:

```

```

(\_, resources) = html\_exporter.from\_notebook\_node(jake\_notebook)

(\_, resources\_with\_fig) = html\_exporter\_with\_figs.from\_notebook\_node(jake\_notebook)

print("resources without figures:")

print(sorted(resources.keys()))

print("\nresources with extracted figures (notice that there's one more field called 'outputs'):")

print(sorted(resources\_with\_fig.keys()))

print("\nthe actual figures are:")

print(sorted(resources\_with\_fig['outputs'].keys()))

```

```

resources without figures:

['deprecated', 'global_content_filter', 'html_manager_semver_range', 'include_css', 'include_js', 'include_lab_theme', 'include_url', 'inlining', 'jquery_url', 'jupyter_widgets_base_url', 'language_code', 'mathjax_url', 'mermaid_js_url', 'metadata', 'output_extension', 'raw_mimetypes', 'require_js_url', 'should_sanitize_html', 'theme', 'widget_renderer_url']

resources with extracted figures (notice that there's one more field called 'outputs'):

['deprecated', 'global_content_filter', 'html_manager_semver_range', 'include_css', 'include_js', 'include_lab_theme', 'include_url', 'inlining', 'jquery_url', 'jupyter_widgets_base_url', 'language_code', 'mathjax_url', 'mermaid_js_url', 'metadata', 'output_extension', 'outputs', 'raw_mimetypes', 'require_js_url', 'should_sanitize_html', 'theme', 'widget_renderer_url']

the actual figures are:

['output_13_1.png', 'output_16_0.png', 'output_18_1.png', 'output_3_0.png', 'output_5_0.png']

```

### Custom Preprocessors[#](#Custom-Preprocessors "Permalink to this heading")

There are an endless number of transformations that you may want to apply to a notebook. In particularly complicated cases, you may want to actually create your own `Preprocessor`. Above, when we customized the list of preprocessors accepted by the `HTMLExporter`, we passed in a string – this can be any valid module name. So, if you create your own preprocessor, you can include it in that same list and it will be used by the exporter.

To create your own preprocessor, you will need to subclass from `nbconvert.preprocessors.Preprocessor` and overwrite either the `preprocess` and/or `preprocess\_cell` methods.

### Example[#](#Example "Permalink to this heading")

The following demonstration adds the ability to exclude a cell by index.

Note: injecting cells is similar, and won’t be covered here. If you want to inject static content at the beginning/end of a notebook, use a custom template.

```

[11]:

```

```

from traitlets import Integer

from nbconvert.preprocessors import Preprocessor

class PelicanSubCell(Preprocessor):

 """A Pelican specific preprocessor to remove some of the cells of a notebook"""

    # I could also read the cells from nb.metadata.pelican if someone wrote a JS extension,

    # but for now I'll stay with configurable value.

    start = Integer(0, help="first cell of notebook to be converted").tag(config=True)

    end = Integer(-1, help="last cell of notebook to be converted").tag(config=True)

    def preprocess(self, nb, resources):

        self.log.info("I'll keep only cells from %d to %d", self.start, self.end)

        nb.cells = nb.cells[self.start : self.end]

        return nb, resources

```

Here a Pelican exporter is created that takes `PelicanSubCell` preprocessors and a `config` object as parameters. This may seem redundant, but with the configuration system you can register an inactive preprocessor on all of the exporters and activate it from config files or the command line.

```

[12]:

```

```

# Create a new config object that configures both the new preprocessor, as well as the exporter

c = Config()

c.PelicanSubCell.start = 4

c.PelicanSubCell.end = 6

c.RSTExporter.preprocessors = [PelicanSubCell]

# Create our new, customized exporter that uses our custom preprocessor

pelican = RSTExporter(config=c)

# Process the notebook

print(pelican.from\_notebook\_node(jake\_notebook)[0])

```

```

Sometimes when showing schematic plots, this is the type of figure I

want to display. But drawing it by hand is a pain: I’d rather just use

matplotlib. The problem is, matplotlib is a bit too precise. Attempting

to duplicate this figure in matplotlib leads to something like this:

.. code:: ipython3

    Image('http://jakevdp.github.com/figures/mpl_version.png')

.. image:: output_5_0.png

```

### Programmatically creating templates[#](#Programmatically-creating-templates "Permalink to this heading")

```

[13]:

```

```

from jinja2 import DictLoader

dl = DictLoader(

    {

        'footer': """

{%- extends 'lab/index.html.j2' -%}

{% block footer %}

FOOOOOOOOTEEEEER

{% endblock footer %}

"""

    }

)

exportHTML = HTMLExporter(extra\_loaders=[dl], template\_file='footer')

(body, resources) = exportHTML.from\_notebook\_node(jake\_notebook)

for l in body.split('\n')[-4:]:

    print(l)

```

```

</body>

FOOOOOOOOTEEEEER

</html>

```

### Real World Uses[#](#Real-World-Uses "Permalink to this heading")

@jakevdp uses Pelican and Jupyter Notebook to blog. Pelican [will use](https://github.com/getpelican/pelican-plugins/pull/21) nbconvert programmatically to generate blog post. Have a look a [Pythonic Preambulations](http://jakevdp.github.io/) for Jake’s blog post.

@damianavila wrote the Nikola Plugin to [write blog post as Notebooks](http://damianavila.github.io/blog/posts/one-line-deployment-of-your-site-to-gh-pages.html) and is developing a js-extension to publish notebooks via one click from the web app.

> As @Mbussonn requested… easieeeeer! Deploy your Nikola site with just a click in the IPython notebook! <http://t.co/860sJunZvj> cc @ralsina

> 

> 

> 

> 

> — Damián Avila (@damian\_avila) August 21, 2013

> 

> 

> 

Dejavu[#](#dejavu "Permalink to this heading")

----------------------------------------------

Dejavu intends to be a tool to facilitate for Jupyter users to generate static outputs from their notebooks, mimicking the behavior of [voilà](https://github.com/voila-dashboards/voila).

### Running dejavu[#](#running-dejavu "Permalink to this heading")

Dejavu works exactly the same as nbconvert and you can use all command line options that you would with nbconvert. To run a default instance:

```

jupyter dejavu notebook.ipynb

```

In case you want to show code in addition to its output use the flag `--show-input`.

### Configuring the Notebook for slides presentations[#](#configuring-the-notebook-for-slides-presentations "Permalink to this heading")

In case the user intends to do a slide presentation out of their Jupyter

notebook it’s recommended to use the `reveal` template. In orders to obtain a

better result from it’s advised to use the slides metadatas available in the

cells:

* In the notebook, select a cell and click on the “Property Inspector menu”

Tip

The “Property Inspector menu” can be located in the right side bar, its symbol contains two gears.

* Select a cell in the notebook

* In the Property Inspector menu select the cell’s slide type:

> 

> 

> 	+ Slide

> 	+ Sub-Slide

> 	+ Fragment

> 	+ Skip

> 	+ Notes

>

* Repeat the process for all cells

LaTeX citations[#](#latex-citations "Permalink to this heading")

----------------------------------------------------------------

`nbconvert` now has support for LaTeX citations. With this capability you

can:

* Manage citations using BibTeX.

* Cite those citations in Markdown cells using HTML data attributes.

* Have `nbconvert` generate proper LaTeX citations and run BibTeX.

For an example of how this works, please see the [citations example](https://nbviewer.jupyter.org/github/jupyter/nbconvert-examples/blob/master/citations/Tutorial.ipynb) in

the [nbconvert-examples](https://github.com/jupyter/nbconvert-examples) repository.

Removing cells, inputs, or outputs[#](#removing-cells-inputs-or-outputs "Permalink to this heading")

----------------------------------------------------------------------------------------------------

When converting Notebooks into other formats, it is possible to

remove parts of a cell, or entire cells, using preprocessors.

The notebook will remain unchanged, but the outputs will have

certain pieces removed. Here are two primary ways to accomplish

this.

### Removing pieces of cells using cell tags[#](#removing-pieces-of-cells-using-cell-tags "Permalink to this heading")

The most straightforward way to control which pieces of cells are

removed is to use **cell tags**. These are single-string snippets of

metadata that are stored in each cells “tag” field. The

`TagRemovePreprocessor` can be used

to remove inputs, outputs, or entire cells.

For example, here is a configuration that uses a different tag for

removing each part of a cell with the HTMLExporter. In this case,

we demonstrate using the nbconvert Python API.

```

from traitlets.config import Config

import nbformat as nbf

from nbconvert.exporters import HTMLExporter

from nbconvert.preprocessors import TagRemovePreprocessor

# Setup config

c = Config()

# Configure tag removal - be sure to tag your cells to remove using the

# words remove\_cell to remove cells. You can also modify the code to use

# a different tag word

c.TagRemovePreprocessor.remove\_cell\_tags = ("remove\_cell",)

c.TagRemovePreprocessor.remove\_all\_outputs\_tags = ("remove\_output",)

c.TagRemovePreprocessor.remove\_input\_tags = ("remove\_input",)

c.TagRemovePreprocessor.enabled = True

# Configure and run out exporter

c.HTMLExporter.preprocessors = ["nbconvert.preprocessors.TagRemovePreprocessor"]

exporter = HTMLExporter(config=c)

exporter.register\_preprocessor(TagRemovePreprocessor(config=c), True)

# Configure and run our exporter - returns a tuple - first element with html,

# second with notebook metadata

output = HTMLExporter(config=c).from\_filename("your-notebook-file-path.ipynb")

# Write to output html file

with open("your-output-file-name.html", "w") as f:

    f.write(output[0])

```

This additional example demonstrates using the CLI to remove cells with a certain cell tag

```

jupyter nbconvert mynotebook.ipynb --TagRemovePreprocessor.enabled=True --TagRemovePreprocessor.remove_cell_tags remove_cell

```

### Removing cells using Regular Expressions on cell content[#](#removing-cells-using-regular-expressions-on-cell-content "Permalink to this heading")

Sometimes you’d rather remove cells based on their \_content\_ rather

than their tags. In this case, you can use the `RegexRemovePreprocessor`.

You initialize this preprocessor with a single `patterns` configuration, which

is a list of strings. For each cell, this preprocessor checks whether

the cell contents match any of the strings provided in `patterns`.

If the contents match any of the patterns, the cell is removed from the notebook.

For example, execute the following command to convert a notebook to html

and remove cells containing only whitespace:

```

jupyter nbconvert --RegexRemovePreprocessor.patterns="['\s\*\Z']" mynotebook.ipynb

```

The command line argument sets the list of patterns to `'\s\*\Z'` which matches

an arbitrary number of whitespace characters followed by the end of the string.

See <https://regex101.com/> for an interactive guide to regular expressions

(make sure to select the python flavor). See <https://docs.python.org/library/re.html>

for the official regular expression documentation in python.

Executing notebooks[#](#executing-notebooks "Permalink to this heading")

------------------------------------------------------------------------

Jupyter notebooks are often saved with output cells that have been cleared.

nbconvert provides a convenient way to execute the input cells of an

.ipynb notebook file and save the results, both input and output cells,

as a .ipynb file.

In this section we show how to execute a `.ipynb` notebook

document saving the result in notebook format. If you need to export

notebooks to other formats, such as reStructured Text or Markdown (optionally

executing them) see section [Using nbconvert as a library](index.html#document-nbconvert_library).

Executing notebooks can be very helpful, for example, to run all notebooks

in Python library in one step, or as a way to automate the data analysis in

projects involving more than one notebook.

### Executing notebooks from the command line[#](#executing-notebooks-from-the-command-line "Permalink to this heading")

The same functionality of executing notebooks is exposed through a

[command line interface](index.html#document-usage) or a Python API interface.

As an example, a notebook can be executed from the command line with:

```

jupyter nbconvert --to notebook --execute mynotebook.ipynb

```

### Executing notebooks using the Python API interface[#](#executing-notebooks-using-the-python-api-interface "Permalink to this heading")

This section will illustrate the Python API interface.

#### Example[#](#example "Permalink to this heading")

Let’s start with a complete quick example, leaving detailed explanations

to the following sections.

**Import**: First we import nbconvert and the `ExecutePreprocessor`

class:

```

import nbformat

from nbconvert.preprocessors import ExecutePreprocessor

```

**Load**: Assuming that `notebook\_filename` contains the path of a notebook,

we can load it with:

```

with open(notebook\_filename) as f:

    nb = nbformat.read(f, as\_version=4)

```

**Configure**: Next, we configure the notebook execution mode:

```

ep = ExecutePreprocessor(timeout=600, kernel\_name='python3')

```

We specified two (optional) arguments `timeout` and `kernel\_name`, which

define respectively the cell execution timeout and the execution kernel.

> 

> The option to specify **kernel\_name** is new in nbconvert 4.2.

> When not specified or when using nbconvert <4.2,

> the default Python kernel is chosen.

> 

> 

> 

**Execute/Run (preprocess)**: To actually run the notebook we call the method

[`preprocess()`](index.html#nbconvert.preprocessors.ExecutePreprocessor.preprocess "nbconvert.preprocessors.ExecutePreprocessor.preprocess"):

```

ep.preprocess(nb, {'metadata': {'path': 'notebooks/'}})

```

Hopefully, we will not get any errors during the notebook execution

(see the last section for error handling). Note that `path` specifies

in which folder to execute the notebook.

**Save**: Finally, save the resulting notebook with:

```

with open('executed\_notebook.ipynb', 'w', encoding='utf-8') as f:

    nbformat.write(nb, f)

```

That’s all. Your executed notebook will be saved in the current folder

in the file `executed\_notebook.ipynb`.

### Execution arguments (traitlets)[#](#execution-arguments-traitlets "Permalink to this heading")

The arguments passed to `ExecutePreprocessor` are configuration options

called [traitlets](https://traitlets.readthedocs.io/en/stable).

There are many cool things about traitlets. For example,

they enforce the input type, and they can be accessed/modified as

class attributes. Moreover, each traitlet is automatically exposed

as command-line options. For example, we can pass the timeout from the

command-line like this:

```

jupyter nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute mynotebook.ipynb

```

Let’s now discuss in more detail the two traitlets we used.

The `timeout` traitlet defines the maximum time (in seconds) each notebook

cell is allowed to run, if the execution takes longer an exception will be

raised. The default is 30 s, so in cases of long-running cells you may want to

specify an higher value. The `timeout` option can also be set to `None`

or `-1` to remove any restriction on execution time.

The second traitlet, `kernel\_name`, allows specifying the name of the kernel

to be used for the execution. By default, the kernel name is obtained from the

notebook metadata. The traitlet `kernel\_name` allows specifying a

user-defined kernel, overriding the value in the notebook metadata. A common

use case is that of a Python 2/3 library which includes documentation/testing

notebooks. These notebooks will specify either a python2 or python3 kernel in

their metadata (depending on the kernel used the last time the notebook was

saved). In reality, these notebooks will work on both Python 2 and Python 3,

and, for testing, it is important to be able to execute them programmatically

on both versions. Here the traitlet `kernel\_name` helps simplify and

maintain consistency: we can just run a notebook twice, specifying first

“python2” and then “python3” as the kernel name.

### Handling errors and exceptions[#](#handling-errors-and-exceptions "Permalink to this heading")

In the previous sections we saw how to save an executed notebook, assuming

there are no execution errors. But, what if there are errors?

#### Execution until first error[#](#execution-until-first-error "Permalink to this heading")

An error during the notebook execution, by default, will stop the execution

and raise a `CellExecutionError`. Conveniently, the source cell causing

the error and the original error name and message are also printed.

After an error, we can still save the notebook as before:

```

with open('executed\_notebook.ipynb', mode='w', encoding='utf-8') as f:

    nbformat.write(nb, f)

```

The saved notebook contains the output up until the failing cell,

and includes a full stack-trace and error (which can help debugging).

#### Handling errors[#](#handling-errors "Permalink to this heading")

A useful pattern to execute notebooks while handling errors is the following:

```

from nbconvert.preprocessors import CellExecutionError

try:

    out = ep.preprocess(nb, {'metadata': {'path': run\_path}})

except CellExecutionError:

    out = None

    msg = 'Error executing the notebook "%s".\n\n' % notebook\_filename

    msg += 'See notebook "%s" for the traceback.' % notebook\_filename\_out

    print(msg)

    raise

finally:

    with open(notebook\_filename\_out, mode='w', encoding='utf-8') as f:

        nbformat.write(nb, f)

```

This will save the executed notebook regardless of execution errors.

In case of errors, however, an additional message is printed and the

`CellExecutionError` is raised. The message directs the user to

the saved notebook for further inspection.

#### Execute and save all errors[#](#execute-and-save-all-errors "Permalink to this heading")

As a last scenario, it is sometimes useful to execute notebooks which raise

exceptions, for example to show an error condition. In this case, instead of

stopping the execution on the first error, we can keep executing the notebook

using the traitlet `allow\_errors` (default is False). With

`allow\_errors=True`, the notebook is executed until the end, regardless of

any error encountered during the execution. The output notebook, will contain

the stack-traces and error messages for **all** the cells raising exceptions.

### Widget state[#](#widget-state "Permalink to this heading")

If your notebook contains any

[Jupyter Widgets](https://github.com/jupyter-widgets/ipywidgets/),

the state of all the widgets can be stored in the notebook’s metadata.

This allows rendering of the live widgets on for instance nbviewer, or when

converting to html.

We can tell nbconvert to not store the state using the `store\_widget\_state`

argument:

```

jupyter nbconvert --ExecutePreprocessor.store\_widget\_state=False --to notebook --execute mynotebook.ipynb

```

This widget rendering is not performed against a browser during execution, so

only widget default states or states manipulated via user code will be

calculated during execution. `%%javascript` cells will execute upon notebook

rendering, enabling complex interactions to function as expected when viewed by

a UI.

If you can’t view widget results after execution, you may need to select

File ‣ Trust Notebook in the menu.

Configuration options[#](#configuration-options "Permalink to this heading")

----------------------------------------------------------------------------

Configuration options may be set in a file, `~/.jupyter/jupyter\_nbconvert\_config.py`,

or at the command line when starting nbconvert, i.e. `jupyter nbconvert --Application.log\_level=10`.

The most specific setting will always be used. For example, the LatexExporter

and the HTMLExporter both inherit from TemplateExporter. With the following config

```

c.TemplateExporter.exclude\_input\_prompt = False  # The default

c.PDFExporter.exclude\_input\_prompt = True

```

input prompts will not appear when converting to PDF, but they will appear when

exporting to HTML.

### CLI Flags and Aliases[#](#cli-flags-and-aliases "Permalink to this heading")

The dynamic loading of exporters can be disabled by setting the environment

variable `NBCONVERT\_DISABLE\_CONFIG\_EXPORTERS`. This causes all exporters

to be loaded regardless of the value of their `enabled` attribute.

When using Nbconvert from the command line, a number of aliases and flags are

defined as shortcuts to configuration options for convenience.

The following flags are defined:

debugset log level to logging.DEBUG (maximize logging output)

Long Form: {‘Application’: {‘log\_level’: 10}}

show-configShow the application’s configuration (human-readable format)

Long Form: {‘Application’: {‘show\_config’: True}}

show-config-jsonShow the application’s configuration (json format)

Long Form: {‘Application’: {‘show\_config\_json’: True}}

generate-configgenerate default config file

Long Form: {‘JupyterApp’: {‘generate\_config’: True}}

yAnswer yes to any questions instead of prompting.

Long Form: {‘JupyterApp’: {‘answer\_yes’: True}}

executeExecute the notebook prior to export.

Long Form: {‘ExecutePreprocessor’: {‘enabled’: True}}

allow-errorsContinue notebook execution even if one of the cells throws an error and include

the error message in the cell output (the default behaviour is to abort

conversion). This flag is only relevant if ‘–execute’ was specified, too.

Long Form: {‘ExecutePreprocessor’: {‘allow\_errors’: True}}

stdinread a single notebook file from stdin. Write the resulting notebook with

default basename ‘notebook.\*’

Long Form: {‘NbConvertApp’: {‘from\_stdin’: True}}

stdoutWrite notebook output to stdout instead of files.

Long Form: {‘NbConvertApp’: {‘writer\_class’: ‘StdoutWriter’}}

inplaceRun nbconvert in place, overwriting the existing notebook (only relevant

when converting to notebook format)

Long Form: {‘NbConvertApp’: {‘use\_output\_suffix’: False, ‘export\_format’:

‘notebook’}, ‘FilesWriter’: {‘build\_directory’: ‘’}}

clear-outputClear output of current file and save in place, overwriting the existing

notebook.

Long Form: {‘NbConvertApp’: {‘use\_output\_suffix’: False, ‘export\_format’:

‘notebook’}, ‘FilesWriter’: {‘build\_directory’: ‘’}, ‘ClearOutputPreprocessor’:

{‘enabled’: True}}

no-promptExclude input and output prompts from converted document.

Long Form: {‘TemplateExporter’: {‘exclude\_input\_prompt’: True,

‘exclude\_output\_prompt’: True}}

no-inputExclude input cells and output prompts from converted document. This

mode is ideal for generating code-free reports.

Long Form: {‘TemplateExporter’: {‘exclude\_output\_prompt’: True, ‘exclude\_input’:

True, ‘exclude\_input\_prompt’: True}}

allow-chromium-downloadWhether to allow downloading chromium if no suitable version is found on the

system.

Long Form: {‘WebPDFExporter’: {‘allow\_chromium\_download’: True}}

disable-chromium-sandboxDisable chromium security sandbox when converting to PDF..

Long Form: {‘WebPDFExporter’: {‘disable\_sandbox’: True}}

show-inputShows code input. This flag is only useful for dejavu users.

Long Form: {‘TemplateExporter’: {‘exclude\_input’: False}}

embed-imagesEmbed the images as base64 dataurls in the output. This flag is only useful for

the HTML/WebPDF/Slides exports.

Long Form: {‘HTMLExporter’: {‘embed\_images’: True}}

sanitize-htmlWhether the HTML in Markdown cells and cell outputs should be sanitized..

Long Form: {‘HTMLExporter’: {‘sanitize\_html’: True}}

The following aliases are defined:

> 

> **log-level** (Application.log\_level)

> 

> 

> **config** (JupyterApp.config\_file)

> 

> 

> **to** (NbConvertApp.export\_format)

> 

> 

> **template** (TemplateExporter.template\_name)

> 

> 

> **template-file** (TemplateExporter.template\_file)

> 

> 

> **theme** (HTMLExporter.theme)

> 

> 

> **sanitize\_html** (HTMLExporter.sanitize\_html)

> 

> 

> **writer** (NbConvertApp.writer\_class)

> 

> 

> **post** (NbConvertApp.postprocessor\_class)

> 

> 

> **output** (NbConvertApp.output\_base)

> 

> 

> **output-dir** (FilesWriter.build\_directory)

> 

> 

> **reveal-prefix** (SlidesExporter.reveal\_url\_prefix)

> 

> 

> **nbformat** (NotebookExporter.nbformat\_version)

> 

> 

> 

### App Options[#](#app-options "Permalink to this heading")

Application.log\_datefmt : UnicodeDefault: `'%Y-%m-%d %H:%M:%S'`

The date format used by logging formatters for %(asctime)s

Application.log\_format : UnicodeDefault: `'[%(name)s]%(highlevel)s %(message)s'`

The Logging format template

Application.log\_level : any of `0``|``10``|``20``|``30``|``40``|``50``|`’DEBUG’`|`’INFO’`|`’WARN’`|`’ERROR’`|`’CRITICAL’``Default: `30`

Set the log level by value or name.

Application.logging\_config : DictDefault: `{}`

Configure additional log handlers.

The default stderr logs handler is configured by the

log\_level, log\_datefmt and log\_format settings.

This configuration can be used to configure additional handlers

(e.g. to output the log to a file) or for finer control over the

default handlers.

If provided this should be a logging configuration dictionary, for

more information see:

<https://docs.python.org/3/library/logging.config.html#logging-config-dictschema>

This dictionary is merged with the base logging configuration which

defines the following:

* A logging formatter intended for interactive use called

`console`.

* A logging handler that writes to stderr called

`console` which uses the formatter `console`.

* A logger with the name of this application set to `DEBUG`

level.

This example adds a new handler that writes to a file:

```

c.Application.logging\_config = {

    'handlers': {

        'file': {

            'class': 'logging.FileHandler',

            'level': 'DEBUG',

            'filename': '<path/to/file>',

        }

    },

    'loggers': {

        '<application-name>': {

            'level': 'DEBUG',

            # NOTE: if you don't list the default "console"

            # handler here then it will be disabled

            'handlers': ['console', 'file'],

        },

    }

}

```

Application.show\_config : BoolDefault: `False`

Instead of starting the Application, dump configuration to stdout

Application.show\_config\_json : BoolDefault: `False`

Instead of starting the Application, dump configuration to stdout (as JSON)

JupyterApp.answer\_yes : BoolDefault: `False`

Answer yes to any prompts.

JupyterApp.config\_file : UnicodeDefault: `''`

Full path of a config file.

JupyterApp.config\_file\_name : UnicodeDefault: `''`

Specify a config file to load.

JupyterApp.generate\_config : BoolDefault: `False`

Generate default config file.

JupyterApp.log\_datefmt : UnicodeDefault: `'%Y-%m-%d %H:%M:%S'`

The date format used by logging formatters for %(asctime)s

JupyterApp.log\_format : UnicodeDefault: `'[%(name)s]%(highlevel)s %(message)s'`

The Logging format template

JupyterApp.log\_level : any of `0``|``10``|``20``|``30``|``40``|``50``|`’DEBUG’`|`’INFO’`|`’WARN’`|`’ERROR’`|`’CRITICAL’``Default: `30`

Set the log level by value or name.

JupyterApp.logging\_config : DictDefault: `{}`

Configure additional log handlers.

The default stderr logs handler is configured by the

log\_level, log\_datefmt and log\_format settings.

This configuration can be used to configure additional handlers

(e.g. to output the log to a file) or for finer control over the

default handlers.

If provided this should be a logging configuration dictionary, for

more information see:

<https://docs.python.org/3/library/logging.config.html#logging-config-dictschema>

This dictionary is merged with the base logging configuration which

defines the following:

* A logging formatter intended for interactive use called

`console`.

* A logging handler that writes to stderr called

`console` which uses the formatter `console`.

* A logger with the name of this application set to `DEBUG`

level.

This example adds a new handler that writes to a file:

```

c.Application.logging\_config = {

    'handlers': {

        'file': {

            'class': 'logging.FileHandler',

            'level': 'DEBUG',

            'filename': '<path/to/file>',

        }

    },

    'loggers': {

        '<application-name>': {

            'level': 'DEBUG',

            # NOTE: if you don't list the default "console"

            # handler here then it will be disabled

            'handlers': ['console', 'file'],

        },

    }

}

```

JupyterApp.show\_config : BoolDefault: `False`

Instead of starting the Application, dump configuration to stdout

JupyterApp.show\_config\_json : BoolDefault: `False`

Instead of starting the Application, dump configuration to stdout (as JSON)

NbConvertApp.answer\_yes : BoolDefault: `False`

Answer yes to any prompts.

NbConvertApp.config\_file : UnicodeDefault: `''`

Full path of a config file.

NbConvertApp.config\_file\_name : UnicodeDefault: `''`

Specify a config file to load.

NbConvertApp.export\_format : UnicodeDefault: `''`

The export format to be used, either one of the built-in formats[‘asciidoc’, ‘custom’, ‘html’, ‘latex’, ‘markdown’, ‘notebook’, ‘pdf’, ‘python’, ‘qtpdf’, ‘qtpng’, ‘rst’, ‘script’, ‘slides’, ‘webpdf’]

or a dotted object name that represents the import path for an

`Exporter` class

NbConvertApp.from\_stdin : BoolDefault: `False`

read a single notebook from stdin.

NbConvertApp.generate\_config : BoolDefault: `False`

Generate default config file.

NbConvertApp.log\_datefmt : UnicodeDefault: `'%Y-%m-%d %H:%M:%S'`

The date format used by logging formatters for %(asctime)s

NbConvertApp.log\_format : UnicodeDefault: `'[%(name)s]%(highlevel)s %(message)s'`

The Logging format template

NbConvertApp.log\_level : any of `0``|``10``|``20``|``30``|``40``|``50``|`’DEBUG’`|`’INFO’`|`’WARN’`|`’ERROR’`|`’CRITICAL’``Default: `30`

Set the log level by value or name.

NbConvertApp.logging\_config : DictDefault: `{}`

Configure additional log handlers.

The default stderr logs handler is configured by the

log\_level, log\_datefmt and log\_format settings.

This configuration can be used to configure additional handlers

(e.g. to output the log to a file) or for finer control over the

default handlers.

If provided this should be a logging configuration dictionary, for

more information see:

<https://docs.python.org/3/library/logging.config.html#logging-config-dictschema>

This dictionary is merged with the base logging configuration which

defines the following:

* A logging formatter intended for interactive use called

`console`.

* A logging handler that writes to stderr called

`console` which uses the formatter `console`.

* A logger with the name of this application set to `DEBUG`

level.

This example adds a new handler that writes to a file:

```

c.Application.logging\_config = {

    'handlers': {

        'file': {

            'class': 'logging.FileHandler',

            'level': 'DEBUG',

            'filename': '<path/to/file>',

        }

    },

    'loggers': {

        '<application-name>': {

            'level': 'DEBUG',

            # NOTE: if you don't list the default "console"

            # handler here then it will be disabled

            'handlers': ['console', 'file'],

        },

    }

}

```

NbConvertApp.notebooks : ListDefault: `[]`

List of notebooks to convert.Wildcards are supported.

Filenames passed positionally will be added to the list.

NbConvertApp.output\_base : UnicodeDefault: `'{notebook\_name}'`

Overwrite base name use for output files.Supports pattern replacements ‘{notebook\_name}’.

NbConvertApp.output\_files\_dir : UnicodeDefault: `'{notebook\_name}\_files'`

Directory to copy extra files (figures) to.‘{notebook\_name}’ in the string will be converted to notebook

basename.

NbConvertApp.postprocessor\_class : DottedOrNoneDefault: `''`

PostProcessor class used to write theresults of the conversion

NbConvertApp.recursive\_glob : BoolDefault: `False`

set the ‘recursive’ option for glob for searching wildcards.

NbConvertApp.show\_config : BoolDefault: `False`

Instead of starting the Application, dump configuration to stdout

NbConvertApp.show\_config\_json : BoolDefault: `False`

Instead of starting the Application, dump configuration to stdout (as JSON)

NbConvertApp.use\_output\_suffix : BoolDefault: `True`

Whether to apply a suffix prior to the extension (only relevantwhen converting to notebook format). The suffix is determined by

the exporter, and is usually ‘.nbconvert’.

NbConvertApp.writer\_class : DottedObjectNameDefault: `'FilesWriter'`

Writer class used to write theresults of the conversion

### Exporter Options[#](#exporter-options "Permalink to this heading")

![_images/exporter_inheritance.png](_images/exporter_inheritance.png)

Exporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

Exporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

Exporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

Exporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

Exporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

TemplateExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

TemplateExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

TemplateExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

TemplateExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

TemplateExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

TemplateExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

TemplateExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

TemplateExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

TemplateExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

TemplateExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

TemplateExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

TemplateExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

TemplateExporter.extra\_template\_paths : ListDefault: `[]`

No description

TemplateExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

TemplateExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

TemplateExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

TemplateExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

TemplateExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

TemplateExporter.template\_extension : UnicodeDefault: `''`

No description

TemplateExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

TemplateExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

TemplateExporter.template\_paths : ListDefault: `['.']`

No description

ASCIIDocExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

ASCIIDocExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

ASCIIDocExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

ASCIIDocExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

ASCIIDocExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

ASCIIDocExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

ASCIIDocExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

ASCIIDocExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

ASCIIDocExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

ASCIIDocExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

ASCIIDocExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

ASCIIDocExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

ASCIIDocExporter.extra\_template\_paths : ListDefault: `[]`

No description

ASCIIDocExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

ASCIIDocExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

ASCIIDocExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

ASCIIDocExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

ASCIIDocExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

ASCIIDocExporter.template\_extension : UnicodeDefault: `''`

No description

ASCIIDocExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

ASCIIDocExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

ASCIIDocExporter.template\_paths : ListDefault: `['.']`

No description

HTMLExporter.anchor\_link\_text : UnicodeDefault: `'¶'`

The text used as the text for anchor links.

HTMLExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

HTMLExporter.embed\_images : BoolDefault: `False`

Whether or not to embed images as base64 in markdown cells.

HTMLExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

HTMLExporter.exclude\_anchor\_links : BoolDefault: `False`

If anchor links should be included or not.

HTMLExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

HTMLExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

HTMLExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

HTMLExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

HTMLExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

HTMLExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

HTMLExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

HTMLExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

HTMLExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

HTMLExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

HTMLExporter.extra\_template\_paths : ListDefault: `[]`

No description

HTMLExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

HTMLExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

HTMLExporter.html\_manager\_semver\_range : UnicodeDefault: `'\*'`

Semver range for Jupyter widgets HTML manager

HTMLExporter.jquery\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.m...`

URL to load jQuery from.

Defaults to loading from cdnjs.

HTMLExporter.jupyter\_widgets\_base\_url : UnicodeDefault: `'https://unpkg.com/'`

URL base for Jupyter widgets

HTMLExporter.language\_code : UnicodeDefault: `'en'`

Language code of the content, should be one of the ISO639-1

HTMLExporter.mathjax\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest....`

URL to load Mathjax from.

Defaults to loading from cdnjs.

HTMLExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

HTMLExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

HTMLExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

HTMLExporter.require\_js\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/req...`

URL to load require.js from.

Defaults to loading from cdnjs.

HTMLExporter.sanitize\_html : BoolDefault: `False`

Whether the HTML in Markdown cells and cell outputs should be sanitized.This should be set to True by nbviewer or similar tools.

HTMLExporter.template\_extension : UnicodeDefault: `''`

No description

HTMLExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

HTMLExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

HTMLExporter.template\_paths : ListDefault: `['.']`

No description

HTMLExporter.theme : UnicodeDefault: `'light'`

Template specific theme(e.g. the name of a JupyterLab CSS theme distributed as prebuilt extension for the lab template)

HTMLExporter.widget\_renderer\_url : UnicodeDefault: `''`

Full URL for Jupyter widgets

LatexExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

LatexExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

LatexExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

LatexExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

LatexExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

LatexExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

LatexExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

LatexExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

LatexExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

LatexExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

LatexExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

LatexExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

LatexExporter.extra\_template\_paths : ListDefault: `[]`

No description

LatexExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

LatexExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

LatexExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

LatexExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

LatexExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

LatexExporter.template\_extension : UnicodeDefault: `''`

No description

LatexExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

LatexExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

LatexExporter.template\_paths : ListDefault: `['.']`

No description

MarkdownExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

MarkdownExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

MarkdownExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

MarkdownExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

MarkdownExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

MarkdownExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

MarkdownExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

MarkdownExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

MarkdownExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

MarkdownExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

MarkdownExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

MarkdownExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

MarkdownExporter.extra\_template\_paths : ListDefault: `[]`

No description

MarkdownExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

MarkdownExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

MarkdownExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

MarkdownExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

MarkdownExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

MarkdownExporter.template\_extension : UnicodeDefault: `''`

No description

MarkdownExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

MarkdownExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

MarkdownExporter.template\_paths : ListDefault: `['.']`

No description

NotebookExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

NotebookExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

NotebookExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

NotebookExporter.nbformat\_version : any of `1``|``2``|``3``|``4`Default: `4`

The nbformat version to write.Use this to downgrade notebooks.

NotebookExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

NotebookExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

PDFExporter.bib\_command : ListDefault: `['bibtex', '{filename}']`

Shell command used to run bibtex.

PDFExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

PDFExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

PDFExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

PDFExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

PDFExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

PDFExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

PDFExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

PDFExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

PDFExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

PDFExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

PDFExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

PDFExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

PDFExporter.extra\_template\_paths : ListDefault: `[]`

No description

PDFExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

PDFExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

PDFExporter.latex\_command : ListDefault: `['xelatex', '{filename}', '-quiet']`

Shell command used to compile latex.

PDFExporter.latex\_count : IntDefault: `3`

How many times latex will be called.

PDFExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

PDFExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

PDFExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

PDFExporter.template\_extension : UnicodeDefault: `''`

No description

PDFExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

PDFExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

PDFExporter.template\_paths : ListDefault: `['.']`

No description

PDFExporter.verbose : BoolDefault: `False`

Whether to display the output of latex commands.

PythonExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

PythonExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

PythonExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

PythonExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

PythonExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

PythonExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

PythonExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

PythonExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

PythonExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

PythonExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

PythonExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

PythonExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

PythonExporter.extra\_template\_paths : ListDefault: `[]`

No description

PythonExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

PythonExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

PythonExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

PythonExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

PythonExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

PythonExporter.template\_extension : UnicodeDefault: `''`

No description

PythonExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

PythonExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

PythonExporter.template\_paths : ListDefault: `['.']`

No description

QtExporter.anchor\_link\_text : UnicodeDefault: `'¶'`

The text used as the text for anchor links.

QtExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

QtExporter.embed\_images : BoolDefault: `False`

Whether or not to embed images as base64 in markdown cells.

QtExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

QtExporter.exclude\_anchor\_links : BoolDefault: `False`

If anchor links should be included or not.

QtExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

QtExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

QtExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

QtExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

QtExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

QtExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

QtExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

QtExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

QtExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

QtExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

QtExporter.extra\_template\_paths : ListDefault: `[]`

No description

QtExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

QtExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

QtExporter.html\_manager\_semver\_range : UnicodeDefault: `'\*'`

Semver range for Jupyter widgets HTML manager

QtExporter.jquery\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.m...`

URL to load jQuery from.

Defaults to loading from cdnjs.

QtExporter.jupyter\_widgets\_base\_url : UnicodeDefault: `'https://unpkg.com/'`

URL base for Jupyter widgets

QtExporter.language\_code : UnicodeDefault: `'en'`

Language code of the content, should be one of the ISO639-1

QtExporter.mathjax\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest....`

URL to load Mathjax from.

Defaults to loading from cdnjs.

QtExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

QtExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

QtExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

QtExporter.require\_js\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/req...`

URL to load require.js from.

Defaults to loading from cdnjs.

QtExporter.sanitize\_html : BoolDefault: `False`

Whether the HTML in Markdown cells and cell outputs should be sanitized.This should be set to True by nbviewer or similar tools.

QtExporter.template\_extension : UnicodeDefault: `''`

No description

QtExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

QtExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

QtExporter.template\_paths : ListDefault: `['.']`

No description

QtExporter.theme : UnicodeDefault: `'light'`

Template specific theme(e.g. the name of a JupyterLab CSS theme distributed as prebuilt extension for the lab template)

QtExporter.widget\_renderer\_url : UnicodeDefault: `''`

Full URL for Jupyter widgets

QtPDFExporter.anchor\_link\_text : UnicodeDefault: `'¶'`

The text used as the text for anchor links.

QtPDFExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

QtPDFExporter.embed\_images : BoolDefault: `False`

Whether or not to embed images as base64 in markdown cells.

QtPDFExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

QtPDFExporter.exclude\_anchor\_links : BoolDefault: `False`

If anchor links should be included or not.

QtPDFExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

QtPDFExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

QtPDFExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

QtPDFExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

QtPDFExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

QtPDFExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

QtPDFExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

QtPDFExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

QtPDFExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

QtPDFExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

QtPDFExporter.extra\_template\_paths : ListDefault: `[]`

No description

QtPDFExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

QtPDFExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

QtPDFExporter.html\_manager\_semver\_range : UnicodeDefault: `'\*'`

Semver range for Jupyter widgets HTML manager

QtPDFExporter.jquery\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.m...`

URL to load jQuery from.

Defaults to loading from cdnjs.

QtPDFExporter.jupyter\_widgets\_base\_url : UnicodeDefault: `'https://unpkg.com/'`

URL base for Jupyter widgets

QtPDFExporter.language\_code : UnicodeDefault: `'en'`

Language code of the content, should be one of the ISO639-1

QtPDFExporter.mathjax\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest....`

URL to load Mathjax from.

Defaults to loading from cdnjs.

QtPDFExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

QtPDFExporter.paginate : BoolDefault: `True`

Split generated notebook into multiple pages.

If False, a PDF with one long page will be generated.

Set to True to match behavior of LaTeX based PDF generator

QtPDFExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

QtPDFExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

QtPDFExporter.require\_js\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/req...`

URL to load require.js from.

Defaults to loading from cdnjs.

QtPDFExporter.sanitize\_html : BoolDefault: `False`

Whether the HTML in Markdown cells and cell outputs should be sanitized.This should be set to True by nbviewer or similar tools.

QtPDFExporter.template\_extension : UnicodeDefault: `''`

No description

QtPDFExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

QtPDFExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

QtPDFExporter.template\_paths : ListDefault: `['.']`

No description

QtPDFExporter.theme : UnicodeDefault: `'light'`

Template specific theme(e.g. the name of a JupyterLab CSS theme distributed as prebuilt extension for the lab template)

QtPDFExporter.widget\_renderer\_url : UnicodeDefault: `''`

Full URL for Jupyter widgets

QtPNGExporter.anchor\_link\_text : UnicodeDefault: `'¶'`

The text used as the text for anchor links.

QtPNGExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

QtPNGExporter.embed\_images : BoolDefault: `False`

Whether or not to embed images as base64 in markdown cells.

QtPNGExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

QtPNGExporter.exclude\_anchor\_links : BoolDefault: `False`

If anchor links should be included or not.

QtPNGExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

QtPNGExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

QtPNGExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

QtPNGExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

QtPNGExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

QtPNGExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

QtPNGExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

QtPNGExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

QtPNGExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

QtPNGExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

QtPNGExporter.extra\_template\_paths : ListDefault: `[]`

No description

QtPNGExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

QtPNGExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

QtPNGExporter.html\_manager\_semver\_range : UnicodeDefault: `'\*'`

Semver range for Jupyter widgets HTML manager

QtPNGExporter.jquery\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.m...`

URL to load jQuery from.

Defaults to loading from cdnjs.

QtPNGExporter.jupyter\_widgets\_base\_url : UnicodeDefault: `'https://unpkg.com/'`

URL base for Jupyter widgets

QtPNGExporter.language\_code : UnicodeDefault: `'en'`

Language code of the content, should be one of the ISO639-1

QtPNGExporter.mathjax\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest....`

URL to load Mathjax from.

Defaults to loading from cdnjs.

QtPNGExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

QtPNGExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

QtPNGExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

QtPNGExporter.require\_js\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/req...`

URL to load require.js from.

Defaults to loading from cdnjs.

QtPNGExporter.sanitize\_html : BoolDefault: `False`

Whether the HTML in Markdown cells and cell outputs should be sanitized.This should be set to True by nbviewer or similar tools.

QtPNGExporter.template\_extension : UnicodeDefault: `''`

No description

QtPNGExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

QtPNGExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

QtPNGExporter.template\_paths : ListDefault: `['.']`

No description

QtPNGExporter.theme : UnicodeDefault: `'light'`

Template specific theme(e.g. the name of a JupyterLab CSS theme distributed as prebuilt extension for the lab template)

QtPNGExporter.widget\_renderer\_url : UnicodeDefault: `''`

Full URL for Jupyter widgets

RSTExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

RSTExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

RSTExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

RSTExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

RSTExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

RSTExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

RSTExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

RSTExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

RSTExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

RSTExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

RSTExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

RSTExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

RSTExporter.extra\_template\_paths : ListDefault: `[]`

No description

RSTExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

RSTExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

RSTExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

RSTExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

RSTExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

RSTExporter.template\_extension : UnicodeDefault: `''`

No description

RSTExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

RSTExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

RSTExporter.template\_paths : ListDefault: `['.']`

No description

ScriptExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

ScriptExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

ScriptExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

ScriptExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

ScriptExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

ScriptExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

ScriptExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

ScriptExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

ScriptExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

ScriptExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

ScriptExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

ScriptExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

ScriptExporter.extra\_template\_paths : ListDefault: `[]`

No description

ScriptExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

ScriptExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

ScriptExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

ScriptExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

ScriptExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

ScriptExporter.template\_extension : UnicodeDefault: `''`

No description

ScriptExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

ScriptExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

ScriptExporter.template\_paths : ListDefault: `['.']`

No description

SlidesExporter.anchor\_link\_text : UnicodeDefault: `'¶'`

The text used as the text for anchor links.

SlidesExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

SlidesExporter.embed\_images : BoolDefault: `False`

Whether or not to embed images as base64 in markdown cells.

SlidesExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

SlidesExporter.exclude\_anchor\_links : BoolDefault: `False`

If anchor links should be included or not.

SlidesExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

SlidesExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

SlidesExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

SlidesExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

SlidesExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

SlidesExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

SlidesExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

SlidesExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

SlidesExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

SlidesExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

SlidesExporter.extra\_template\_paths : ListDefault: `[]`

No description

SlidesExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

SlidesExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

SlidesExporter.font\_awesome\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/cs...`

URL to load font awesome from.

Defaults to loading from cdnjs.

SlidesExporter.html\_manager\_semver\_range : UnicodeDefault: `'\*'`

Semver range for Jupyter widgets HTML manager

SlidesExporter.jquery\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.m...`

URL to load jQuery from.

Defaults to loading from cdnjs.

SlidesExporter.jupyter\_widgets\_base\_url : UnicodeDefault: `'https://unpkg.com/'`

URL base for Jupyter widgets

SlidesExporter.language\_code : UnicodeDefault: `'en'`

Language code of the content, should be one of the ISO639-1

SlidesExporter.mathjax\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest....`

URL to load Mathjax from.

Defaults to loading from cdnjs.

SlidesExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

SlidesExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

SlidesExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

SlidesExporter.require\_js\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/req...`

URL to load require.js from.

Defaults to loading from cdnjs.

SlidesExporter.reveal\_number : UnicodeDefault: `''`

slide number format (e.g. ‘c/t’). Choose from:

‘c’: current, ‘t’: total, ‘h’: horizontal, ‘v’: vertical

SlidesExporter.reveal\_scroll : BoolDefault: `False`

If True, enable scrolling within each slide

SlidesExporter.reveal\_theme : UnicodeDefault: `'simple'`

Name of the reveal.js theme to use.

We look for a file with this name under

`reveal\_url\_prefix`/css/theme/`reveal\_theme`.css.

[hakimel/reveal.js](https://github.com/hakimel/reveal.js/tree/master/css/theme) has

list of themes that ship by default with reveal.js.

SlidesExporter.reveal\_transition : UnicodeDefault: `'slide'`

Name of the reveal.js transition to use.

The list of transitions that ships by default with reveal.js are:

none, fade, slide, convex, concave and zoom.

SlidesExporter.reveal\_url\_prefix : UnicodeDefault: `''`

The URL prefix for reveal.js (version 3.x).This defaults to the reveal CDN, but can be any url pointing to a copy

of reveal.js.

For speaker notes to work, this must be a relative path to a local

copy of reveal.js: e.g., “reveal.js”.

If a relative path is given, it must be a subdirectory of the

current directory (from which the server is run).

See the usage documentation

(<https://nbconvert.readthedocs.io/en/latest/usage.html#reveal-js-html-slideshow>)

for more details.

SlidesExporter.sanitize\_html : BoolDefault: `False`

Whether the HTML in Markdown cells and cell outputs should be sanitized.This should be set to True by nbviewer or similar tools.

SlidesExporter.template\_extension : UnicodeDefault: `''`

No description

SlidesExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

SlidesExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

SlidesExporter.template\_paths : ListDefault: `['.']`

No description

SlidesExporter.theme : UnicodeDefault: `'light'`

Template specific theme(e.g. the name of a JupyterLab CSS theme distributed as prebuilt extension for the lab template)

SlidesExporter.widget\_renderer\_url : UnicodeDefault: `''`

Full URL for Jupyter widgets

WebPDFExporter.allow\_chromium\_download : BoolDefault: `False`

Whether to allow downloading Chromium if no suitable version is found on the system.

WebPDFExporter.anchor\_link\_text : UnicodeDefault: `'¶'`

The text used as the text for anchor links.

WebPDFExporter.default\_preprocessors : ListDefault: `['nbconvert.preprocessors.TagRemovePreprocessor', 'nbconvert....`

List of preprocessors available by default, by name, namespace,instance, or type.

WebPDFExporter.disable\_sandbox : BoolDefault: `False`

Disable chromium security sandbox when converting to PDF.

WARNING: This could cause arbitrary code execution in specific circumstances,

where JS in your notebook can execute serverside code! Please use with

caution.

`https://github.com/puppeteer/puppeteer/blob/main@%7B2020-12-14T17:22:24Z%7D/docs/troubleshooting.md#setting-up-chrome-linux-sandbox`

has more information.

This is required for webpdf to work inside most container environments.

WebPDFExporter.embed\_images : BoolDefault: `False`

Whether or not to embed images as base64 in markdown cells.

WebPDFExporter.enabled : BoolDefault: `True`

Disable this exporter (and any exporters inherited from it).

WebPDFExporter.exclude\_anchor\_links : BoolDefault: `False`

If anchor links should be included or not.

WebPDFExporter.exclude\_code\_cell : BoolDefault: `False`

This allows you to exclude code cells from all templates if set to True.

WebPDFExporter.exclude\_input : BoolDefault: `False`

This allows you to exclude code cell inputs from all templates if set to True.

WebPDFExporter.exclude\_input\_prompt : BoolDefault: `False`

This allows you to exclude input prompts from all templates if set to True.

WebPDFExporter.exclude\_markdown : BoolDefault: `False`

This allows you to exclude markdown cells from all templates if set to True.

WebPDFExporter.exclude\_output : BoolDefault: `False`

This allows you to exclude code cell outputs from all templates if set to True.

WebPDFExporter.exclude\_output\_prompt : BoolDefault: `False`

This allows you to exclude output prompts from all templates if set to True.

WebPDFExporter.exclude\_output\_stdin : BoolDefault: `True`

This allows you to exclude output of stdin stream from lab template if set to True.

WebPDFExporter.exclude\_raw : BoolDefault: `False`

This allows you to exclude raw cells from all templates if set to True.

WebPDFExporter.exclude\_unknown : BoolDefault: `False`

This allows you to exclude unknown cells from all templates if set to True.

WebPDFExporter.extra\_template\_basedirs : ListDefault: `[]`

No description

WebPDFExporter.extra\_template\_paths : ListDefault: `[]`

No description

WebPDFExporter.file\_extension : FilenameExtensionDefault: `''`

Extension of the file that should be written to disk

WebPDFExporter.filters : DictDefault: `{}`

Dictionary of filters, by name and namespace, to add to the Jinjaenvironment.

WebPDFExporter.html\_manager\_semver\_range : UnicodeDefault: `'\*'`

Semver range for Jupyter widgets HTML manager

WebPDFExporter.jquery\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.m...`

URL to load jQuery from.

Defaults to loading from cdnjs.

WebPDFExporter.jupyter\_widgets\_base\_url : UnicodeDefault: `'https://unpkg.com/'`

URL base for Jupyter widgets

WebPDFExporter.language\_code : UnicodeDefault: `'en'`

Language code of the content, should be one of the ISO639-1

WebPDFExporter.mathjax\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest....`

URL to load Mathjax from.

Defaults to loading from cdnjs.

WebPDFExporter.optimistic\_validation : BoolDefault: `False`

Reduces the number of validation steps so that it only occurs after all preprocesors have run.

WebPDFExporter.paginate : BoolDefault: `True`

Split generated notebook into multiple pages.

If False, a PDF with one long page will be generated.

Set to True to match behavior of LaTeX based PDF generator

WebPDFExporter.preprocessors : ListDefault: `[]`

List of preprocessors, by name or namespace, to enable.

WebPDFExporter.raw\_mimetypes : ListDefault: `[]`

formats of raw cells to be included in this Exporter’s output.

WebPDFExporter.require\_js\_url : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/req...`

URL to load require.js from.

Defaults to loading from cdnjs.

WebPDFExporter.sanitize\_html : BoolDefault: `False`

Whether the HTML in Markdown cells and cell outputs should be sanitized.This should be set to True by nbviewer or similar tools.

WebPDFExporter.template\_extension : UnicodeDefault: `''`

No description

WebPDFExporter.template\_file : UnicodeDefault: `None`

Name of the template file to use

WebPDFExporter.template\_name : UnicodeDefault: `''`

Name of the template to use

WebPDFExporter.template\_paths : ListDefault: `['.']`

No description

WebPDFExporter.theme : UnicodeDefault: `'light'`

Template specific theme(e.g. the name of a JupyterLab CSS theme distributed as prebuilt extension for the lab template)

WebPDFExporter.widget\_renderer\_url : UnicodeDefault: `''`

Full URL for Jupyter widgets

### Writer Options[#](#writer-options "Permalink to this heading")

![_images/writer_inheritance.png](_images/writer_inheritance.png)

WriterBase.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

WriterBase.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

WriterBase.files : ListDefault: `[]`

List of the files that the notebook references. Files will be

included with written output.

DebugWriter.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

DebugWriter.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

DebugWriter.files : ListDefault: `[]`

List of the files that the notebook references. Files will be

included with written output.

FilesWriter.build\_directory : UnicodeDefault: `''`

Directory to write output(s) to. Defaultsto output to the directory of each notebook. To recover

previous default behaviour (outputting to the current

working directory) use . as the flag value.

FilesWriter.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

FilesWriter.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

FilesWriter.files : ListDefault: `[]`

List of the files that the notebook references. Files will be

included with written output.

FilesWriter.relpath : UnicodeDefault: `''`

When copying files that the notebook depends on, copy them inrelation to this path, such that the destination filename will be

os.path.relpath(filename, relpath). If FilesWriter is operating on a

notebook that already exists elsewhere on disk, then the default will be

the directory containing that notebook.

StdoutWriter.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

StdoutWriter.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

StdoutWriter.files : ListDefault: `[]`

List of the files that the notebook references. Files will be

included with written output.

### Preprocessor Options[#](#preprocessor-options "Permalink to this heading")

![_images/preprocessor_inheritance.png](_images/preprocessor_inheritance.png)

Preprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

Preprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

Preprocessor.enabled : BoolDefault: `False`

No description

CSSHTMLHeaderPreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

CSSHTMLHeaderPreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

CSSHTMLHeaderPreprocessor.enabled : BoolDefault: `False`

No description

CSSHTMLHeaderPreprocessor.highlight\_class : UnicodeDefault: `'.highlight'`

CSS highlight class identifier

CSSHTMLHeaderPreprocessor.style : UnionDefault: `<class 'jupyterlab\_pygments.style.JupyterStyle'>`

Name of the pygments style to use

ClearMetadataPreprocessor.clear\_cell\_metadata : BoolDefault: `True`

Flag to choose if cell metadata is to be cleared in addition to notebook metadata.

ClearMetadataPreprocessor.clear\_notebook\_metadata : BoolDefault: `True`

Flag to choose if notebook metadata is to be cleared in addition to cell metadata.

ClearMetadataPreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

ClearMetadataPreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

ClearMetadataPreprocessor.enabled : BoolDefault: `False`

No description

ClearMetadataPreprocessor.preserve\_cell\_metadata\_mask : SetDefault: `set()`

Indicates the key paths to preserve when deleting metadata across both cells and notebook metadata fields. Tuples of keys can be passed to preserved specific nested values

ClearMetadataPreprocessor.preserve\_nb\_metadata\_mask : SetDefault: `{('language\_info', 'name')}`

Indicates the key paths to preserve when deleting metadata across both cells and notebook metadata fields. Tuples of keys can be passed to preserved specific nested values

ClearOutputPreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

ClearOutputPreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

ClearOutputPreprocessor.enabled : BoolDefault: `False`

No description

ClearOutputPreprocessor.remove\_metadata\_fields : SetDefault: `{'collapsed', 'scrolled'}`

No description

ConvertFiguresPreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

ConvertFiguresPreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

ConvertFiguresPreprocessor.enabled : BoolDefault: `False`

No description

ConvertFiguresPreprocessor.from\_format : UnicodeDefault: `''`

Format the converter accepts

ConvertFiguresPreprocessor.to\_format : UnicodeDefault: `''`

Format the converter writes

ExecutePreprocessor.allow\_error\_names : ListDefault: `[]`

List of error names which won’t stop the execution. Use this if the

`allow\_errors` option it too general and you want to allow only

specific kinds of errors.

ExecutePreprocessor.allow\_errors : BoolDefault: `False`

If `False` (default), when a cell raises an error the

execution is stopped and a ``CellExecutionError``

is raised, except if the error name is in

`allow\_error\_names`.

If `True`, execution errors are ignored and the execution

is continued until the end of the notebook. Output from

exceptions is included in the cell output in both cases.

ExecutePreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

ExecutePreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

ExecutePreprocessor.enabled : BoolDefault: `False`

No description

ExecutePreprocessor.error\_on\_timeout : DictDefault: `None`

If a cell execution was interrupted after a timeout, don’t wait for

the execute\_reply from the kernel (e.g. KeyboardInterrupt error).

Instead, return an execute\_reply with the given error, which should

be of the following form:

```

{

    'ename': str,  # Exception name, as a string

    'evalue': str,  # Exception value, as a string

    'traceback': list(str),  # traceback frames, as strings

}

```

ExecutePreprocessor.extra\_arguments : ListDefault: `[]`

No description

ExecutePreprocessor.force\_raise\_errors : BoolDefault: `False`

If False (default), errors from executing the notebook can be

allowed with a `raises-exception` tag on a single cell, or the

`allow\_errors` or `allow\_error\_names` configurable options for

all cells. An allowed error will be recorded in notebook output, and

execution will continue. If an error occurs when it is not

explicitly allowed, a ``CellExecutionError`` will be raised.

If True, ``CellExecutionError`` will be raised for any error that occurs

while executing the notebook. This overrides the `allow\_errors`

and `allow\_error\_names` options and the `raises-exception` cell

tag.

ExecutePreprocessor.interrupt\_on\_timeout : BoolDefault: `False`

If execution of a cell times out, interrupt the kernel and

continue executing other cells rather than throwing an error and

stopping.

ExecutePreprocessor.iopub\_timeout : IntDefault: `4`

The time to wait (in seconds) for IOPub output. This generally

doesn’t need to be set, but on some slow networks (such as CI

systems) the default timeout might not be long enough to get all

messages.

ExecutePreprocessor.ipython\_hist\_file : UnicodeDefault: `':memory:'`

Path to file to use for SQLite history database for an IPython kernel.

> 

> The specific value `:memory:` (including the colon

> at both end but not the back ticks), avoids creating a history file. Otherwise, IPython

> will create a history file for each kernel.

> 

> 

> When running kernels simultaneously (e.g. via multiprocessing) saving history a single

> SQLite file can result in database errors, so using `:memory:` is recommended in

> non-interactive contexts.

> 

> 

> 

ExecutePreprocessor.kernel\_manager\_class : TypeDefault: `'jupyter\_client.manager.KernelManager'`

The kernel manager class to use.

ExecutePreprocessor.kernel\_name : UnicodeDefault: `''`

Name of kernel to use to execute the cells.

If not set, use the kernel\_spec embedded in the notebook.

ExecutePreprocessor.on\_cell\_complete : CallableDefault: `None`

A callable which executes after a cell execution is complete. It is

called even when a cell results in a failure.

Called with kwargs ``cell`` and ``cell\_index``.

ExecutePreprocessor.on\_cell\_error : CallableDefault: `None`

A callable which executes when a cell execution results in an error.

This is executed even if errors are suppressed with ``cell\_allows\_errors``.

Called with kwargs ``cell`, ``cell\_index`` and `execute\_reply`.

ExecutePreprocessor.on\_cell\_execute : CallableDefault: `None`

A callable which executes just before a code cell is executed.

Called with kwargs ``cell`` and ``cell\_index``.

ExecutePreprocessor.on\_cell\_executed : CallableDefault: `None`

A callable which executes just after a code cell is executed, whether

or not it results in an error.

Called with kwargs ``cell``, ``cell\_index`` and `execute\_reply`.

ExecutePreprocessor.on\_cell\_start : CallableDefault: `None`

A callable which executes before a cell is executed and before non-executing cells

are skipped.

Called with kwargs ``cell`` and ``cell\_index``.

ExecutePreprocessor.on\_notebook\_complete : CallableDefault: `None`

A callable which executes after the kernel is cleaned up.

Called with kwargs ``notebook``.

ExecutePreprocessor.on\_notebook\_error : CallableDefault: `None`

A callable which executes when the notebook encounters an error.

Called with kwargs ``notebook``.

ExecutePreprocessor.on\_notebook\_start : CallableDefault: `None`

A callable which executes after the kernel manager and kernel client are setup, and

cells are about to execute.

Called with kwargs ``notebook``.

ExecutePreprocessor.raise\_on\_iopub\_timeout : BoolDefault: `False`

If `False` (default), then the kernel will continue waiting for

iopub messages until it receives a kernel idle message, or until a

timeout occurs, at which point the currently executing cell will be

skipped. If `True`, then an error will be raised after the first

timeout. This option generally does not need to be used, but may be

useful in contexts where there is the possibility of executing

notebooks with memory-consuming infinite loops.

ExecutePreprocessor.record\_timing : BoolDefault: `True`

If `True` (default), then the execution timings of each cell will

be stored in the metadata of the notebook.

ExecutePreprocessor.shell\_timeout\_interval : IntDefault: `5`

The time to wait (in seconds) for Shell output before retrying.

This generally doesn’t need to be set, but if one needs to check

for dead kernels at a faster rate this can help.

ExecutePreprocessor.shutdown\_kernel : any of `'graceful'``|`’immediate’``Default: `'graceful'`

If `graceful` (default), then the kernel is given time to clean

up after executing all cells, e.g., to execute its `atexit` hooks.

If `immediate`, then the kernel is signaled to immediately

terminate.

ExecutePreprocessor.skip\_cells\_with\_tag : UnicodeDefault: `'skip-execution'`

Name of the cell tag to use to denote a cell that should be skipped.

ExecutePreprocessor.startup\_timeout : IntDefault: `60`

The time to wait (in seconds) for the kernel to start.

If kernel startup takes longer, a RuntimeError is

raised.

ExecutePreprocessor.store\_widget\_state : BoolDefault: `True`

If `True` (default), then the state of the Jupyter widgets created

at the kernel will be stored in the metadata of the notebook.

ExecutePreprocessor.timeout : IntDefault: `None`

The time to wait (in seconds) for output from executions.

If a cell execution takes longer, a TimeoutError is raised.

`None` or `-1` will disable the timeout. If `timeout\_func` is set,

it overrides `timeout`.

ExecutePreprocessor.timeout\_func : AnyDefault: `None`

A callable which, when given the cell source as input,

returns the time to wait (in seconds) for output from cell

executions. If a cell execution takes longer, a TimeoutError

is raised.

Returning `None` or `-1` will disable the timeout for the cell.

Not setting `timeout\_func` will cause the client to

default to using the `timeout` trait for all cells. The

`timeout\_func` trait overrides `timeout` if it is not `None`.

ExtractAttachmentsPreprocessor.attachments\_directory\_template : UnicodeDefault: `'{notebook\_name}\_attachments'`

Directory to place attachments if use\_separate\_dir is True

ExtractAttachmentsPreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

ExtractAttachmentsPreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

ExtractAttachmentsPreprocessor.enabled : BoolDefault: `False`

No description

ExtractAttachmentsPreprocessor.use\_separate\_dir : BoolDefault: `False`

Whether to use output\_files\_dir (which ExtractOutput also uses) or create a separate directory for attachments

ExtractOutputPreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

ExtractOutputPreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

ExtractOutputPreprocessor.enabled : BoolDefault: `False`

No description

ExtractOutputPreprocessor.extract\_output\_types : SetDefault: `{'application/pdf', 'image/jpeg', 'image/png', 'image/svg+xml'}`

No description

ExtractOutputPreprocessor.output\_filename\_template : UnicodeDefault: `'{unique\_key}\_{cell\_index}\_{index}{extension}'`

No description

HighlightMagicsPreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

HighlightMagicsPreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

HighlightMagicsPreprocessor.enabled : BoolDefault: `False`

No description

HighlightMagicsPreprocessor.languages : DictDefault: `{}`

Syntax highlighting for magic’s extension languages. Each item associates a language magic extension such as %%R, with a pygments lexer such as r.

LatexPreprocessor.author\_names : ListDefault: `[]`

Author names to list in the LaTeX document

LatexPreprocessor.date : UnicodeDefault: `None`

Date of the LaTeX document

LatexPreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

LatexPreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

LatexPreprocessor.enabled : BoolDefault: `False`

No description

LatexPreprocessor.style : UnicodeDefault: `'default'`

Name of the pygments style to use

LatexPreprocessor.title : UnicodeDefault: `None`

Title of the LaTeX document

RegexRemovePreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

RegexRemovePreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

RegexRemovePreprocessor.enabled : BoolDefault: `False`

No description

RegexRemovePreprocessor.patterns : ListDefault: `[]`

No description

SVG2PDFPreprocessor.command : UnionDefault: `traitlets.Undefined`

The command to use for converting SVG to PDF

This traitlet is a template, which will be formatted with the keys

to\_filename and from\_filename.

The conversion call must read the SVG from {from\_filename},

and write a PDF to {to\_filename}.

It could be a List (recommended) or a String. If string, it will

be passed to a shell for execution.

SVG2PDFPreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

SVG2PDFPreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

SVG2PDFPreprocessor.enabled : BoolDefault: `False`

No description

SVG2PDFPreprocessor.from\_format : UnicodeDefault: `''`

Format the converter accepts

SVG2PDFPreprocessor.inkscape : UnicodeDefault: `''`

The path to Inkscape, if necessary

SVG2PDFPreprocessor.inkscape\_version : UnicodeDefault: `''`

The version of inkscape being used.

> 

> This affects how the conversion command is run.

> 

> 

> 

SVG2PDFPreprocessor.to\_format : UnicodeDefault: `''`

Format the converter writes

TagRemovePreprocessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

TagRemovePreprocessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

TagRemovePreprocessor.enabled : BoolDefault: `False`

No description

TagRemovePreprocessor.remove\_all\_outputs\_tags : SetDefault: `set()`

Tags indicating cells for which the outputs are to be removed,matches tags in `cell.metadata.tags`.

TagRemovePreprocessor.remove\_cell\_tags : SetDefault: `set()`

Tags indicating which cells are to be removed,matches tags in `cell.metadata.tags`.

TagRemovePreprocessor.remove\_input\_tags : SetDefault: `set()`

Tags indicating cells for which input is to be removed,matches tags in `cell.metadata.tags`.

TagRemovePreprocessor.remove\_metadata\_fields : SetDefault: `{'collapsed', 'scrolled'}`

No description

TagRemovePreprocessor.remove\_single\_output\_tags : SetDefault: `set()`

Tags indicating which individual outputs are to be removed,matches output *i* tags in `cell.outputs[i].metadata.tags`.

### Postprocessor Options[#](#postprocessor-options "Permalink to this heading")

PostProcessorBase.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

PostProcessorBase.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

ServePostProcessor.browser : UnicodeDefault: `''`

Specify what browser should be used to open slides. See<https://docs.python.org/3/library/webbrowser.html#webbrowser.register>

to see how keys are mapped to browser executables. If

not specified, the default browser will be determined

by the [`webbrowser`](https://docs.python.org/3.6/library/webbrowser.html#module-webbrowser "(in Python v3.6)")

standard library module, which allows setting of the BROWSER

environment variable to override it.

ServePostProcessor.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

ServePostProcessor.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

ServePostProcessor.ip : UnicodeDefault: `'127.0.0.1'`

The IP address to listen on.

ServePostProcessor.open\_in\_browser : BoolDefault: `True`

Should the browser be opened automatically?

ServePostProcessor.port : IntDefault: `8000`

port for the server to listen on.

ServePostProcessor.reveal\_cdn : UnicodeDefault: `'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.5.0'`

URL for reveal.js CDN.

ServePostProcessor.reveal\_prefix : UnicodeDefault: `'reveal.js'`

URL prefix for reveal.js

### Other Options[#](#other-options "Permalink to this heading")

NbConvertBase.default\_language : UnicodeDefault: `'ipython'`

Deprecated default highlight language as of 5.0, please use language\_info metadata instead

NbConvertBase.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

NotebookClient.allow\_error\_names : ListDefault: `[]`

List of error names which won’t stop the execution. Use this if the

`allow\_errors` option it too general and you want to allow only

specific kinds of errors.

NotebookClient.allow\_errors : BoolDefault: `False`

If `False` (default), when a cell raises an error the

execution is stopped and a ``CellExecutionError``

is raised, except if the error name is in

`allow\_error\_names`.

If `True`, execution errors are ignored and the execution

is continued until the end of the notebook. Output from

exceptions is included in the cell output in both cases.

NotebookClient.display\_data\_priority : ListDefault: `['text/html', 'application/pdf', 'text/latex', 'image/svg+xml...`

An ordered list of preferred output type, the first

encountered will usually be used when converting discarding

the others.

NotebookClient.error\_on\_timeout : DictDefault: `None`

If a cell execution was interrupted after a timeout, don’t wait for

the execute\_reply from the kernel (e.g. KeyboardInterrupt error).

Instead, return an execute\_reply with the given error, which should

be of the following form:

```

{

    'ename': str,  # Exception name, as a string

    'evalue': str,  # Exception value, as a string

    'traceback': list(str),  # traceback frames, as strings

}

```

NotebookClient.extra\_arguments : ListDefault: `[]`

No description

NotebookClient.force\_raise\_errors : BoolDefault: `False`

If False (default), errors from executing the notebook can be

allowed with a `raises-exception` tag on a single cell, or the

`allow\_errors` or `allow\_error\_names` configurable options for

all cells. An allowed error will be recorded in notebook output, and

execution will continue. If an error occurs when it is not

explicitly allowed, a ``CellExecutionError`` will be raised.

If True, ``CellExecutionError`` will be raised for any error that occurs

while executing the notebook. This overrides the `allow\_errors`

and `allow\_error\_names` options and the `raises-exception` cell

tag.

NotebookClient.interrupt\_on\_timeout : BoolDefault: `False`

If execution of a cell times out, interrupt the kernel and

continue executing other cells rather than throwing an error and

stopping.

NotebookClient.iopub\_timeout : IntDefault: `4`

The time to wait (in seconds) for IOPub output. This generally

doesn’t need to be set, but on some slow networks (such as CI

systems) the default timeout might not be long enough to get all

messages.

NotebookClient.ipython\_hist\_file : UnicodeDefault: `':memory:'`

Path to file to use for SQLite history database for an IPython kernel.

> 

> The specific value `:memory:` (including the colon

> at both end but not the back ticks), avoids creating a history file. Otherwise, IPython

> will create a history file for each kernel.

> 

> 

> When running kernels simultaneously (e.g. via multiprocessing) saving history a single

> SQLite file can result in database errors, so using `:memory:` is recommended in

> non-interactive contexts.

> 

> 

> 

NotebookClient.kernel\_manager\_class : TypeDefault: `'jupyter\_client.manager.KernelManager'`

The kernel manager class to use.

NotebookClient.kernel\_name : UnicodeDefault: `''`

Name of kernel to use to execute the cells.

If not set, use the kernel\_spec embedded in the notebook.

NotebookClient.on\_cell\_complete : CallableDefault: `None`

A callable which executes after a cell execution is complete. It is

called even when a cell results in a failure.

Called with kwargs ``cell`` and ``cell\_index``.

NotebookClient.on\_cell\_error : CallableDefault: `None`

A callable which executes when a cell execution results in an error.

This is executed even if errors are suppressed with ``cell\_allows\_errors``.

Called with kwargs ``cell`, ``cell\_index`` and `execute\_reply`.

NotebookClient.on\_cell\_execute : CallableDefault: `None`

A callable which executes just before a code cell is executed.

Called with kwargs ``cell`` and ``cell\_index``.

NotebookClient.on\_cell\_executed : CallableDefault: `None`

A callable which executes just after a code cell is executed, whether

or not it results in an error.

Called with kwargs ``cell``, ``cell\_index`` and `execute\_reply`.

NotebookClient.on\_cell\_start : CallableDefault: `None`

A callable which executes before a cell is executed and before non-executing cells

are skipped.

Called with kwargs ``cell`` and ``cell\_index``.

NotebookClient.on\_notebook\_complete : CallableDefault: `None`

A callable which executes after the kernel is cleaned up.

Called with kwargs ``notebook``.

NotebookClient.on\_notebook\_error : CallableDefault: `None`

A callable which executes when the notebook encounters an error.

Called with kwargs ``notebook``.

NotebookClient.on\_notebook\_start : CallableDefault: `None`

A callable which executes after the kernel manager and kernel client are setup, and

cells are about to execute.

Called with kwargs ``notebook``.

NotebookClient.raise\_on\_iopub\_timeout : BoolDefault: `False`

If `False` (default), then the kernel will continue waiting for

iopub messages until it receives a kernel idle message, or until a

timeout occurs, at which point the currently executing cell will be

skipped. If `True`, then an error will be raised after the first

timeout. This option generally does not need to be used, but may be

useful in contexts where there is the possibility of executing

notebooks with memory-consuming infinite loops.

NotebookClient.record\_timing : BoolDefault: `True`

If `True` (default), then the execution timings of each cell will

be stored in the metadata of the notebook.

NotebookClient.shell\_timeout\_interval : IntDefault: `5`

The time to wait (in seconds) for Shell output before retrying.

This generally doesn’t need to be set, but if one needs to check

for dead kernels at a faster rate this can help.

NotebookClient.shutdown\_kernel : any of `'graceful'``|`’immediate’``Default: `'graceful'`

If `graceful` (default), then the kernel is given time to clean

up after executing all cells, e.g., to execute its `atexit` hooks.

If `immediate`, then the kernel is signaled to immediately

terminate.

NotebookClient.skip\_cells\_with\_tag : UnicodeDefault: `'skip-execution'`

Name of the cell tag to use to denote a cell that should be skipped.

NotebookClient.startup\_timeout : IntDefault: `60`

The time to wait (in seconds) for the kernel to start.

If kernel startup takes longer, a RuntimeError is

raised.

NotebookClient.store\_widget\_state : BoolDefault: `True`

If `True` (default), then the state of the Jupyter widgets created

at the kernel will be stored in the metadata of the notebook.

NotebookClient.timeout : IntDefault: `None`

The time to wait (in seconds) for output from executions.

If a cell execution takes longer, a TimeoutError is raised.

`None` or `-1` will disable the timeout. If `timeout\_func` is set,

it overrides `timeout`.

NotebookClient.timeout\_func : AnyDefault: `None`

A callable which, when given the cell source as input,

returns the time to wait (in seconds) for output from cell

executions. If a cell execution takes longer, a TimeoutError

is raised.

Returning `None` or `-1` will disable the timeout for the cell.

Not setting `timeout\_func` will cause the client to

default to using the `timeout` trait for all cells. The

`timeout\_func` trait overrides `timeout` if it is not `None`.

Creating Custom Templates for nbconvert[#](#creating-custom-templates-for-nbconvert "Permalink to this heading")

----------------------------------------------------------------------------------------------------------------

### Selecting a template[#](#selecting-a-template "Permalink to this heading")

Most exporters in nbconvert are subclasses of `TemplateExporter`, and make use of

jinja to render notebooks into the destination format.

Alternative nbconvert templates can be selected by name from the command line with the

`--template` option. For example, to use the `reveal` template with the HTML exporter,

one can type.

```

jupyter nbconvert <path-to-notebook> --to html --template reveal

```

### Where are nbconvert templates installed?[#](#where-are-nbconvert-templates-installed "Permalink to this heading")

Nbconvert templates are *directories* containing resources for nbconvert template

exporters such as jinja templates and associated assets. They are installed in the

**data directory** of nbconvert, namely `<installation prefix>/share/jupyter/nbconvert`.

Nbconvert includes several templates already.

For example, three HTML templates are provided in nbconvert core for the HTML exporter:

> 

> * `lab` (The default HTML template, which produces the same DOM structure as JupyterLab)

> * `classic` (The HTML template styled after the classic notebook)

> * `reveal` (For producing slideshows).

> 

> 

> 

Note

Running `jupyter --paths` will show all Jupyter directories and search paths.

For example, on Linux, `jupyter --paths` returns:

```

$ jupyter --paths

config:

    /home/<username>/.jupyter

    /<sys-prefix>/etc/jupyter

    /usr/local/etc/jupyter

    /etc/jupyter

data:

    /home/<username>/.local/share/jupyter

    /<sys-prefix>/share/jupyter

    /usr/local/share/jupyter

    /usr/share/jupyter

runtime:

    /home/<username>/.local/share/jupyter/runtime

```

#### Adding Additional Template Paths[#](#adding-additional-template-paths "Permalink to this heading")

In order to add additional paths to be searched, you need to pass `TemplateExporter.extra\_template\_basedirs`

config options indicating the extra directories to search for templates. Be careful not to override

`TemplateExporter.template\_paths` unless you intend to replace ALL paths and don’t want the default

locations included.

When using the commandline the extra template paths are added by calling

`--TemplateExporter.extra\_template\_basedirs=path/you/want/included`.

### The content of nbconvert templates[#](#the-content-of-nbconvert-templates "Permalink to this heading")

#### conf.json[#](#conf-json "Permalink to this heading")

Nbconvert templates all include a `conf.json` file at the root of the directory,

which is used to indicate

> 

> * the base template that it is inheriting from.

> * the mimetypes of the template.

> * preprocessors classes to register in the exporter when using that template.

> 

> 

> 

Inspecting the configuration of the reveal template we see that it inherits from the lab

template, exports text/html, and enables two preprocessors called “100-pygments” and “500-reveal”.

```

{

  "base\_template": "lab",

  "mimetypes": {

    "text/html": true

  },

  "preprocessors": {

    "100-pygments": {

        "type": "nbconvert.preprocessors.CSSHTMLHeaderPreprocessor",

        "enabled": true

    },

    "500-reveal": {

      "type": "nbconvert.exporters.slides.\_RevealMetadataPreprocessor",

      "enabled": true

    }

  }

}

```

#### Inheritance[#](#inheritance "Permalink to this heading")

Nbconvert walks up the inheritance structure determined by `conf.json` and produces an aggregated

configuration, merging the dictionaries of registered preprocessors.

The lexical ordering of the preprocessors by name determines the order in which they will be run.

Besides the `conf.json` file, nbconvert templates most typically include jinja templates files,

although any other resource from the base template can be overridden in the derived template.

For example, inspecting the content of the `classic` template located in

`share/jupyter/nbconvert/templates/classic`, we find the following content:

```

share/jupyter/nbconvert/templates/classic

├── static

│   └── styles.css

├── conf.json

├── index.html.j2

└── base.html.j2

```

The `classic` template exporter includes a `index.html.j2` jinja template (which is the main entry point

for HTML exporters) as well as CSS and a base template file in `base.html.j2`.

Note

A template inheriting from `classic` would specify `"base\_template": "classic"` and could

override any of these files. For example, one could make a “classiker” template merely providing

an alternative `styles.css` file.

#### Inheritance in Jinja[#](#inheritance-in-jinja "Permalink to this heading")

In nbconvert, jinja templates can inherit from any other jinja template available in its current directory

or base template directory by name. Jinja templates of other directories can be addressed by their relative path

from the Jupyter data directory.

For example, in the reveal template, `index.html.j2` extends `base.html.j2` which is in the same directory, and

`base.html.j2` extends `lab/base.html.j2`. This approach allows using content that is available in other templates

or may be overridden in the current template.

#### A practical example[#](#a-practical-example "Permalink to this heading")

Say you would like to modify the existing Markdown template to wrap each

output statement in a fenced code block:

```

```output

(1, 2, 3)

```

```

Start by creating a new template directory, say `mdoutput`. In it,

you have the following files:

```

conf.json

index.md.j2

```

The configuration file, `conf.json` states that your template

applies to markdown files:

```

{

  "mimetypes": {

    "text/markdown": true

  }

}

```

The `index.md.j2` template entrypoint extends the existing markdown

template, and redefines how output blocks are rendered:

```

{% extends 'markdown/index.md.j2' %}

{%- block traceback_line -%}

```output

{{ line.rstrip() | strip_ansi }}

```

{%- endblock traceback_line -%}

{%- block stream -%}

```output

{{ output.text.rstrip() }}

```

{%- endblock stream -%}

{%- block data_text scoped -%}

```output

{{ output.data['text/plain'].rstrip() }}

```

{%- endblock data_text -%}

```

You can now convert your notebook to markdown using the new template:

```

jupyter nbconvert --execute notebook.ipynb --to markdown --template=mdoutput

```

(If you put your template folder in a different location than your

notebook, remember to add

`--TemplateExporter.extra\_template\_basedirs=path/to/template/parent`.)

To further explore the possibilities of templating, take a look at the

root of all templates: `null.j2`. You can find it in the

`./nbconvert/templates/base` subfolder of one of the data paths given

by `jupyter --paths`.

Customizing exporters[#](#customizing-exporters "Permalink to this heading")

----------------------------------------------------------------------------

New in version 4.2: You can now use the `--to` flag to use custom export formats defined

outside nbconvert.

The command-line syntax to run the `nbconvert` script is:

```

jupyter nbconvert --to FORMAT notebook.ipynb

```

This will convert the Jupyter document file `notebook.ipynb` into the output

format designated by the `FORMAT` string as explained below.

### Extending the built-in format exporters[#](#extending-the-built-in-format-exporters "Permalink to this heading")

A few built-in formats are available by default: `html`, `pdf`, `webpdf`,

`script`, `latex`. Each of these has its own *exporter* with many

configuration options that can be extended. Having the option to point to a

different *exporter* allows authors to create their own fully customized

templates or export formats.

A custom *exporter* must be an importable Python object. We recommend that

these be distributed as Python libraries.

### Registering a custom exporter as an entry point[#](#registering-a-custom-exporter-as-an-entry-point "Permalink to this heading")

Additional exporters may be registered as named [entry\_points](https://packaging.python.org/guides/creating-and-discovering-plugins/#using-package-metadata).

nbconvert uses the `nbconvert.exporters` entry point to find exporters

from any package you may have installed.

If you are writing a Python package that provides custom exporters,

you can register the custom exporters in your package’s `setup.py`. For

example, your package may contain two custom exporters, named “simple” and

“detail”, and can be registered in your package’s `setup.py` as follows:

```

setup(

    # ...

    entry\_points={

        "nbconvert.exporters": [

            "simple = mymodule:SimpleExporter",

            "detail = mymodule:DetailExporter",

        ],

    }

)

```

Now people who have installed your Python package containing the two

custom exporters can call the entry point name:

```

jupyter nbconvert --to detail mynotebook.ipynb

```

instead of having to specify the full import name of the custom exporter.

### Using a custom exporter without entrypoints[#](#using-a-custom-exporter-without-entrypoints "Permalink to this heading")

We encourage registering custom exporters as entry points as described in the

previous section. Registering a custom exporter with an entry point simplifies

using the exporter. If a custom exporter has not been registered with an

entry point, the exporter can still be used by providing the fully qualified

name of this exporter as the argument of the `--to` flag when running from

the command line:

```

$ jupyter nbconvert --to <full.qualified.name of custom exporter> notebook.ipynb

```

For example, assuming a library `tcontrib` has a custom exporter name

`TExporter`, you would convert to this custom format using the following:

```

$ jupyter nbconvert --to tcontrib.TExporter notebook.ipynb

```

A library can contain multiple exporters. Creators of custom exporters should

make sure that all other flags of the command line behave the same for the

custom exporters as for built-in exporters.

Parameters controlled by an external exporter[#](#parameters-controlled-by-an-external-exporter "Permalink to this heading")

----------------------------------------------------------------------------------------------------------------------------

An external exporter can control almost any parameter of the notebook conversion

process, from simple parameters such as the output file extension, to more complex

ones such as the execution of the notebook or a custom rendering template.

All external exporters can expose custom options using the `traitlets`

configurable API. Refer to the library that provides these exporters for

details on how these configuration options works.

You can use the Jupyter configuration files to configure an external exporter. As

for any `nbconvert` exporters you can use either the configuration file syntax of

`c.MyExporter.config\_option=value` or the command line flag form

`--MyExporter.config\_option=value`.

Writing a custom `Exporter`[#](#writing-a-custom-exporter "Permalink to this heading")

--------------------------------------------------------------------------------------

Under the hood exporters are python classes that expose a certain interface.

Any importable classes that expose this interface can be use as an exporter for

nbconvert.

For simplicity we expose basic classes that implement all the relevant methods

that you have to subclass and overwrite just the relevant methods to provide a

custom exporter. Below we show you the step to create a custom exporter that

provides a custom file extension, and a custom template that inserts before and after

each markdown cell.

We will lay out files to be ready for Python packaging and distributing on PyPI,

although the exact art of Python packaging is beyond the scope of this explanation.

We will use the following layout for our package to expose a custom exporter:

```

mypackage

├── LICENSE.md

├── setup.py

└── mypackage

    ├── __init__.py

    └── templates

        └── test_template.tpl

```

If you wished to create this same directory structure you could use the following commands

when you are at the directory under which you wish to build your `mypackage` package:

```

mkdir -p mypackage/mypackage/templates

touch mypackage/LICENSE.md

touch mypackage/setup.py

touch mypackage/mypackage/__init__.py

touch mypackage/mypackage/templates/test_template.tpl

```

Important

You should not publish this package without adding content to your `LICENSE.md` file.

For example, `nbconvert` follows the Jupyter Project convention of using a Modified BSD

License (also known as New or Revised or 3-Clause BSD).

For a guide on picking the right license for your use case,

please see [choose a license](http://choosealicense.com).

If you do not specify the license, your code may be [unusable by many open source projects](http://choosealicense.com/no-license/).

As you can see the layout is relatively simple, in the case where a template is not

needed we would actually have only one file with an Exporter implementation. Of course

you can change the layout of your package to have a more fine-grained structure of the

subpackage. But lets see what a minimum example looks like.

We are going to write an exporter that:

> 

> * exports to html, so we will reuse the built-in html exporter

> * changes the file extension to `.test\_ext`

> 

> 

> 

```

# file \_\_init\_\_.py

import os

import os.path

from traitlets.config import Config

from nbconvert.exporters.html import HTMLExporter

# -----------------------------------------------------------------------------

# Classes

# -----------------------------------------------------------------------------

class MyExporter(HTMLExporter):

 """

 My custom exporter

 """

    # If this custom exporter should add an entry to the

    # "File -> Download as" menu in the notebook, give it a name here in the

    # `export\_from\_notebook` class member

    export\_from\_notebook = "My format"

    def \_file\_extension\_default(self):

 """

 The new file extension is ``.test\_ext``

 """

        return ".test\_ext"

    @property

    def template\_paths(self):

 """

 We want to inherit from HTML template, and have template under

 ``./templates/`` so append it to the search path. (see next section)

 Note: nbconvert 6.0 changed ``template\_path`` to ``template\_paths``

 """

        return super().template\_paths + [

            os.path.join(os.path.dirname(\_\_file\_\_), "templates")

        ]

    def \_template\_file\_default(self):

 """

 We want to use the new template we ship with our library.

 """

        return "test\_template"  # full

```

And the template file, that inherits from the html `full` template and prepend/append text to each markdown cell (see Jinja2 docs for template syntax):

```

{% extends "full.tpl" %}

{% block markdowncell -%}

## this is a markdown cell

{{ super() }}

## THIS IS THE END

{% endblock markdowncell %}

```

Assuming you install this package locally, or from PyPI, you can now use:

```

jupyter nbconvert --to mypackage.MyExporter notebook.ipynb

```

Customizing Syntax Highlighting[#](#customizing-syntax-highlighting "Permalink to this heading")

------------------------------------------------------------------------------------------------

Under the hood, nbconvert uses pygments to highlight code. pdf, webpdf and html exporting support

changing the highlighting style.

### Using Builtin styles[#](#using-builtin-styles "Permalink to this heading")

Pygments has a number of builtin styles available. To use them, we just need to set the style setting

in the relevant preprocessor.

To change html and webpdf highlighting export with:

```

jupyter nbconvert --to html notebook.ipynb --CSSHTMLHeaderPreprocessor.style=<name>

```

To change pdf and latex highlighting export with:

```

jupyter nbconvert --to pdf notebook.ipynb --LatexPreprocessor.style=<name>

```

where `<name>` is the name of the pygments style. Available styles may vary from system to system.

You can find all available styles with:

```

pygmentize -L styles

```

from a terminal or

```

from pygments.styles import get\_all\_styles

print(list(get\_all\_styles()))

```

from python.

You can preview all the styles from an environment that can display html like jupyter notebook with:

```

from pygments.styles import get\_all\_styles

from pygments.formatters import Terminal256Formatter

from pygments.lexers import PythonLexer

from pygments import highlight

code = """

import os

def function(test=1):

 if test in [3,4]:

 print(test)

"""

for style in get\_all\_styles():

    highlighted\_code = highlight(code, PythonLexer(), Terminal256Formatter(style=style))

    print(f"{style}:\n{highlighted\_code}")

```

### Making your own styles[#](#making-your-own-styles "Permalink to this heading")

To make your own style you must subclass `pygments.styles.Style`, and then you must register your new style with Pygments using

their plugin system. This is explained in detail in the [Pygments documentation](http://pygments.org/docs/styles/).

Architecture of nbconvert[#](#architecture-of-nbconvert "Permalink to this heading")

------------------------------------------------------------------------------------

This is a high-level outline of the basic workflow, structures and objects in nbconvert.

Specifically, this exposition has a two-fold goal:

> 

> 1. to alert you to the affordances available for customisation or direct contributions

> 2. to provide a map of where and when different events occur, which should aid in tracking down bugs.

> 

> 

> 

### A detailed pipeline exploration[#](#a-detailed-pipeline-exploration "Permalink to this heading")

Nbconvert takes in a notebook, which is a JSON object, and operates on that object.

This can include operations that take a notebook and return a notebook.

For example, that operation could be to execute the notebook as though it were a continuous script; if it were executed `--in-place` then it would overwrite the current notebook.

Or it could be that we wish to systematically alter the notebook, for example by clearing all output cells.

Format agnostic operations on cell content that do not violate the nbformat

spec can be interpreted as a notebook to notebook conversion step; such

operations can be performed as part of the preprocessing step.

But often we want to have the notebook’s structured content in a different format.

Importantly, in many cases the structure of the notebook should be reflected in the structure of the output, adapted to the output’s format.

For that purpose, the original JSON structure of the document is crucial scaffolding needed to support this kind of structured output.

In order to maintain structure, it can be useful to apply our conversion programmatically on the structure itself.

To do so, when converting to formats other than the notebook, we use the [jinja](https://jinja.palletsprojects.com/en/3.0.x/) templating engine.

The basic unit of structure in a notebook is the cell.

Accordingly, since our templating engine is capable of expressing structure, the basic unit in our templates will often be specified at the cell level.

Each cell has a certain type; the three most important cell types for our purposes are code, markdown, and raw NbConvert.

Code cells can be split further into their input and their output.

Operations can also occur separately on input and output and their respective subcomponents.

Markdown cells and raw NbConvert cells do not have analogous substructure.

The template’s structure then can be seen as a mechanism for selecting content on which to operate.

Because the template operates on individual cells, this has some upsides and drawbacks.

One upside is that this allows the template to have access to the individual cell’s metadata, which enables intelligently transforming the appropriate content.

The transformations occur as a series of replacement rules and filters.

For many purposes these filters take the form of external calls to [pandoc](https://pandoc.org/), which is a utility for converting between many different document formats.

One downside is that this makes operations that require global coördination (e.g., cross referencing across cells) somewhat challenging to implement as filters inside templates.

Note that all that we’ve described is happening in memory.

This is crucial in order to ensure that this functionality is available when writing files is more challenging.

Nonetheless, the reason for using nbconvert almost always involves producing some kind of output file.

We take the in-memory object and write a file appropriate for the output type.

The entirety of heretofore described process can be described as part of an `Exporter`.

`Exporter`s often involves `Preprocessor`s, `filters`, `templates` and `Writer`s.

These classes and functions are described in greater detail below.

Finally, one can apply a `Postprocessor` after the writing has occurred.

For example, it is common when converting to slides to start a webserver and open a browser window with the newly created document (`--to slides --post serve`).

### Classes[#](#classes "Permalink to this heading")

#### Exporters[#](#exporters "Permalink to this heading")

The primary class in nbconvert is the `nbconvert.exporters.exporter.Exporter`.

Exporters encapsulate the operation of turning a notebook into another format.

There is one Exporter for each format supported in nbconvert.

The first thing an Exporter does is load a notebook, usually from a file via [`nbformat`](https://nbformat.readthedocs.io/en/latest/api.html#module-nbformat "(in nbformat v5.9)").

Most of what a typical Exporter does is select and configure preprocessors, filters, and templates.

If you want to convert notebooks to additional formats, a new Exporter is probably what you are looking for.

See also

[Writing a custom Exporter](index.html#external-exporters)

Once the notebook is loaded, it is preprocessed…

#### Preprocessors[#](#preprocessors "Permalink to this heading")

A `nbconvert.preprocessors.Preprocessor` is an object that transforms the content of the notebook to be exported.

The result of a preprocessor being applied to a notebook is always a notebook.

These operations include re-executing the cells, stripping output,

removing bundled outputs to separate files, etc.

If you want to add operations that modify a notebook before exporting,

a preprocessor is the place to start.

See also

[Custom Preprocessors](index.html#Custom-Preprocessors)

Once a notebook is preprocessed, it’s time to convert the notebook into the destination format.

#### Templates[#](#templates "Permalink to this heading")

Most Exporters in nbconvert are a subclass of `nbconvert.exporters.templateexporter.TemplateExporter`, which make use of

[jinja](https://jinja.palletsprojects.com/en/3.0.x/) to render a notebook into the destination format.

Nbconvert templates can be selected from the command line with the `--template`

option. For example, to use the `reveal` template with the HTML exporter

```

jupyter nbconvert <path-to-notebook> --to html --template reveal

```

Note

Since version 6.0, The HTML exporter defaults to the `lab` template which produces

a DOM structure corresponding to the notebook component in JupyterLab.

To produce HTML corresponding to the looks of the classic notebook, one can use the

`classic` template by passing `--template classic` to the command line.

The nbconvert template system has been completely revamped with nbconvert 6.0 to allow

for greater extensibility. Nbconvert templates can now be installed as third-party packages

and are automatically picked up by nbconvert.

For more details about how to create custom templates, check out the [Creating Custom Templates for nbconvert](index.html#document-customizing) section

of the documentation.

#### Filters[#](#filters "Permalink to this heading")

Filters are Python callables which take something (typically text) as an input, and produce a text output.

If you want to perform custom transformations of particular outputs, a filter may be the way to go.

The following code snippet is an excerpt from the main default template of the HTML export. The displayed

block determines how text output on `stdout` is displayed in HTML.

```

{% block stream_stdout -%}

<div class="output\_subarea output\_stream output\_stdout output\_text">

<pre>

{{- output.text | ansi2html -}}

</pre>

</div>

{%- endblock stream_stdout %}

```

In the `{{- output.text | ansi2html -}}` bit, we invoke the `ansi2html` filter to transform the text output.

Typically, filters are pure functions. However, filters that require some configuration, may be implemented as

Configurable classes.

See also

* [Creating Custom Templates for nbconvert](index.html#document-customizing)

* [More on Jinja Filters](https://jinja.palletsprojects.com/en/3.0.x/templates/#filters)

Once it has passed through the template, an Exporter is done with the notebook,

and returns the file data.

At this point, we have the file data as text or bytes and we can decide where it should end up.

When you are using nbconvert as a library, as opposed to the command-line application,

this is typically where you would stop, take your exported data, and go on your way.

#### Writers[#](#writers "Permalink to this heading")

A *Writer* takes care of writing the resulting file(s) where they should end up.

There are two basic Writers in nbconvert:

1. stdout - writes the result to stdout (for pipe-style workflows)

2. Files (default) - writes the result to the filesystem

Once the output is written, nbconvert has done its job.

#### Postprocessors[#](#postprocessors "Permalink to this heading")

A *Postprocessor* is something that runs after everything is exported and written to the filesystem.

The only postprocessor in nbconvert at this point is the `nbconvert.postprocessors.serve.ServePostProcessor`,

which is used for serving [reveal.js](http://lab.hakim.se/reveal-js) HTML slideshows.

Python API for working with nbconvert[#](#module-nbconvert "Permalink to this heading")

---------------------------------------------------------------------------------------

Contents:

### NbConvertApp[#](#module-nbconvert.nbconvertapp "Permalink to this heading")

See also

[Configuration options](index.html#document-config_options)Configurable options for the nbconvert application

*class* nbconvert.nbconvertapp.NbConvertApp(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.nbconvertapp.NbConvertApp "Permalink to this definition")

Application used to convert from notebook file type (`\*.ipynb`)

init\_notebooks()[#](#nbconvert.nbconvertapp.NbConvertApp.init_notebooks "Permalink to this definition")

Construct the list of notebooks.

If notebooks are passed on the command-line,

they override (rather than add) notebooks specified in config files.

Glob each notebook to replace notebook patterns with filenames.

convert\_notebooks()[#](#nbconvert.nbconvertapp.NbConvertApp.convert_notebooks "Permalink to this definition")

Convert the notebooks in the self.notebooks traitlet

convert\_single\_notebook(*notebook\_filename*, *input\_buffer=None*)[#](#nbconvert.nbconvertapp.NbConvertApp.convert_single_notebook "Permalink to this definition")

Convert a single notebook.

Performs the following steps:

> 

> 1. Initialize notebook resources

> 2. Export the notebook to a particular format

> 3. Write the exported notebook to file

> 4. (Maybe) postprocess the written file

> 

> 

> 

Parameters:

* **notebook\_filename** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) –

* **input\_buffer** – If input\_buffer is not None, conversion is done and the buffer is

used as source into a file basenamed by the notebook\_filename

argument.

init\_single\_notebook\_resources(*notebook\_filename*)[#](#nbconvert.nbconvertapp.NbConvertApp.init_single_notebook_resources "Permalink to this definition")

Step 1: Initialize resources

This initializes the resources dictionary for a single notebook.

Returns:

resources dictionary for a single notebook that MUST include the following keys:* config\_dir: the location of the Jupyter config directory

* unique\_key: the notebook name

* output\_files\_dir: a directory where output files (not

including the notebook itself) should be saved

Return type:

[dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")

export\_single\_notebook(*notebook\_filename*, *resources*, *input\_buffer=None*)[#](#nbconvert.nbconvertapp.NbConvertApp.export_single_notebook "Permalink to this definition")

Step 2: Export the notebook

Exports the notebook to a particular format according to the specified

exporter. This function returns the output and (possibly modified)

resources from the exporter.

Parameters:

* **notebook\_filename** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – name of notebook file.

* **resources** ([*dict*](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")) –

* **input\_buffer** – readable file-like object returning unicode.

if not None, notebook\_filename is ignored

Returns:

* *output*

* *dict* – resources (possibly modified)

write\_single\_notebook(*output*, *resources*)[#](#nbconvert.nbconvertapp.NbConvertApp.write_single_notebook "Permalink to this definition")

Step 3: Write the notebook to file

This writes output from the exporter to file using the specified writer.

It returns the results from the writer.

Parameters:

* **output** –

* **resources** ([*dict*](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")) – resources for a single notebook including name, config directory

and directory to save output

Returns:

results from the specified writer output of exporter

Return type:

file

postprocess\_single\_notebook(*write\_results*)[#](#nbconvert.nbconvertapp.NbConvertApp.postprocess_single_notebook "Permalink to this definition")

Step 4: Post-process the written file

Only used if a postprocessor has been specified. After the

converted notebook is written to a file in Step 3, this post-processes

the notebook.

### Exporters[#](#module-nbconvert.exporters "Permalink to this heading")

See also

[Configuration options](index.html#document-config_options)Configurable options for the nbconvert application

nbconvert.exporters.export(*exporter*, *nb*, *\*\*kw*)[#](#nbconvert.exporters.export "Permalink to this definition")

Export a notebook object using specific exporter class.

Parameters:

* **exporter** (`Exporter` class or instance) – Class or instance of the exporter that should be used. If the

method initializes its own instance of the class, it is ASSUMED that

the class type provided exposes a constructor (`\_\_init\_\_`) with the same

signature as the base Exporter class.

* **nb** ([`NotebookNode`](https://nbformat.readthedocs.io/en/latest/api.html#nbformat.NotebookNode "(in nbformat v5.9)")) – The notebook to export.

* **config** (*config* *(**optional**,* *keyword arg**)*) – User configuration instance.

* **resources** ([*dict*](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)") *(**optional**,* *keyword arg**)*) – Resources used in the conversion process.

Returns:

outputstrThe resulting converted notebook.

resourcesdictionaryDictionary of resources used prior to and during the conversion

process.

Return type:

[tuple](https://docs.python.org/3.6/library/stdtypes.html#tuple "(in Python v3.6)")

nbconvert.exporters.get\_exporter(*name*, *config={}*)[#](#nbconvert.exporters.get_exporter "Permalink to this definition")

Given an exporter name or import path, return a class ready to be instantiated

Raises ExporterName if exporter is not found or ExporterDisabledError if not enabled

nbconvert.exporters.get\_export\_names(*config={}*)[#](#nbconvert.exporters.get_export_names "Permalink to this definition")

Return a list of the currently supported export targets

Exporters can be found in external packages by registering

them as an nbconvert.exporter entrypoint.

#### Exporter base classes[#](#exporter-base-classes "Permalink to this heading")

*class* nbconvert.exporters.Exporter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.exporters.Exporter "Permalink to this definition")

Class containing methods that sequentially run a list of preprocessors on a

NotebookNode object and then return the modified NotebookNode object and

accompanying resources dict.

\_\_init\_\_(*config=None*, *\*\*kw*)[#](#nbconvert.exporters.Exporter.__init__ "Permalink to this definition")

Public constructor

Parameters:

* **config** (`traitlets.config.Config`) – User configuration instance.

* **\*\*kw** – Additional keyword arguments passed to parent \_\_init\_\_

from\_notebook\_node(*nb: [NotebookNode](https://nbformat.readthedocs.io/en/latest/api.html#nbformat.NotebookNode "(in nbformat v5.9)")*, *resources: Any | [None](https://docs.python.org/3.6/library/constants.html#None "(in Python v3.6)") = None*, *\*\*kw: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*) → [tuple](https://docs.python.org/3.6/library/stdtypes.html#tuple "(in Python v3.6)")[[nbformat.notebooknode.NotebookNode](https://nbformat.readthedocs.io/en/latest/api.html#nbformat.NotebookNode "(in nbformat v5.9)"), [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")]][#](#nbconvert.exporters.Exporter.from_notebook_node "Permalink to this definition")

Convert a notebook from a notebook node instance.

Parameters:

* **nb** ([`NotebookNode`](https://nbformat.readthedocs.io/en/latest/api.html#nbformat.NotebookNode "(in nbformat v5.9)")) – Notebook node (dict-like with attr-access)

* **resources** ([*dict*](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")) – Additional resources that can be accessed read/write by

preprocessors and filters.

* **\*\*kw** – Ignored

from\_filename(*filename: [str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")*, *resources: [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")] | [None](https://docs.python.org/3.6/library/constants.html#None "(in Python v3.6)") = None*, *\*\*kw: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*) → [tuple](https://docs.python.org/3.6/library/stdtypes.html#tuple "(in Python v3.6)")[[nbformat.notebooknode.NotebookNode](https://nbformat.readthedocs.io/en/latest/api.html#nbformat.NotebookNode "(in nbformat v5.9)"), [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")]][#](#nbconvert.exporters.Exporter.from_filename "Permalink to this definition")

Convert a notebook from a notebook file.

Parameters:

* **filename** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – Full filename of the notebook file to open and convert.

* **resources** ([*dict*](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")) – Additional resources that can be accessed read/write by

preprocessors and filters.

* **\*\*kw** – Ignored

from\_file(*file\_stream: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*, *resources: [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")] | [None](https://docs.python.org/3.6/library/constants.html#None "(in Python v3.6)") = None*, *\*\*kw: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*) → [tuple](https://docs.python.org/3.6/library/stdtypes.html#tuple "(in Python v3.6)")[[nbformat.notebooknode.NotebookNode](https://nbformat.readthedocs.io/en/latest/api.html#nbformat.NotebookNode "(in nbformat v5.9)"), [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")]][#](#nbconvert.exporters.Exporter.from_file "Permalink to this definition")

Convert a notebook from a notebook file.

Parameters:

* **file\_stream** (*file-like object*) – Notebook file-like object to convert.

* **resources** ([*dict*](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")) – Additional resources that can be accessed read/write by

preprocessors and filters.

* **\*\*kw** – Ignored

register\_preprocessor(*preprocessor*, *enabled=False*)[#](#nbconvert.exporters.Exporter.register_preprocessor "Permalink to this definition")

Register a preprocessor.

Preprocessors are classes that act upon the notebook before it is

passed into the Jinja templating engine. Preprocessors are also

capable of passing additional information to the Jinja

templating engine.

Parameters:

* **preprocessor** ([`nbconvert.preprocessors.Preprocessor`](index.html#nbconvert.preprocessors.Preprocessor "nbconvert.preprocessors.Preprocessor")) – A dotted module name, a type, or an instance

* **enabled** ([*bool*](https://docs.python.org/3.6/library/functions.html#bool "(in Python v3.6)")) – Mark the preprocessor as enabled

*class* nbconvert.exporters.TemplateExporter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.exporters.TemplateExporter "Permalink to this definition")

Exports notebooks into other file formats. Uses Jinja 2 templating engine

to output new formats. Inherit from this class if you are creating a new

template type along with new filters/preprocessors. If the filters/

preprocessors provided by default suffice, there is no need to inherit from

this class. Instead, override the template\_file and file\_extension

traits via a config file.

Filters available by default for templates:

* add\_anchor

* add\_prompts

* ansi2html

* ansi2latex

* ascii\_only

* citation2latex

* clean\_html

* comment\_lines

* convert\_pandoc

* escape\_html

* escape\_html\_keep\_quotes

* escape\_html\_script

* escape\_latex

* filter\_data\_type

* get\_lines

* get\_metadata

* highlight2html

* highlight2latex

* html2text

* indent

* ipython2python

* json\_dumps

* markdown2asciidoc

* markdown2html

* markdown2latex

* markdown2rst

* path2url

* posix\_path

* prevent\_list\_blocks

* strip\_ansi

* strip\_dollars

* strip\_files\_prefix

* strip\_trailing\_newline

* text\_base64

* wrap\_text

\_\_init\_\_(*config=None*, *\*\*kw*)[#](#nbconvert.exporters.TemplateExporter.__init__ "Permalink to this definition")

Public constructor

Parameters:

* **config** (*config*) – User configuration instance.

* **extra\_loaders** ([*list*](https://docs.python.org/3.6/library/stdtypes.html#list "(in Python v3.6)")*[**of Jinja Loaders**]*) – ordered list of Jinja loader to find templates. Will be tried in order

before the default FileSystem ones.

* **template\_file** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)") *(**optional**,* *kw arg**)*) – Template to use when exporting.

from\_notebook\_node(*nb: [NotebookNode](https://nbformat.readthedocs.io/en/latest/api.html#nbformat.NotebookNode "(in nbformat v5.9)")*, *resources: [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")] | [None](https://docs.python.org/3.6/library/constants.html#None "(in Python v3.6)") = None*, *\*\*kw: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*) → [tuple](https://docs.python.org/3.6/library/stdtypes.html#tuple "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")]][#](#nbconvert.exporters.TemplateExporter.from_notebook_node "Permalink to this definition")

Convert a notebook from a notebook node instance.

Parameters:

* **nb** ([`NotebookNode`](https://nbformat.readthedocs.io/en/latest/api.html#nbformat.NotebookNode "(in nbformat v5.9)")) – Notebook node

* **resources** ([*dict*](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")) – Additional resources that can be accessed read/write by

preprocessors and filters.

from\_filename(*filename: [str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")*, *resources: [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")] | [None](https://docs.python.org/3.6/library/constants.html#None "(in Python v3.6)") = None*, *\*\*kw: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*) → [tuple](https://docs.python.org/3.6/library/stdtypes.html#tuple "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")]][#](#nbconvert.exporters.TemplateExporter.from_filename "Permalink to this definition")

Convert a notebook from a filename.

from\_file(*file\_stream: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*, *resources: [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")] | [None](https://docs.python.org/3.6/library/constants.html#None "(in Python v3.6)") = None*, *\*\*kw: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*) → [tuple](https://docs.python.org/3.6/library/stdtypes.html#tuple "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")]][#](#nbconvert.exporters.TemplateExporter.from_file "Permalink to this definition")

Convert a notebook from a file.

register\_preprocessor(*preprocessor*, *enabled=False*)[#](#nbconvert.exporters.TemplateExporter.register_preprocessor "Permalink to this definition")

Register a preprocessor.

Preprocessors are classes that act upon the notebook before it is

passed into the Jinja templating engine. Preprocessors are also

capable of passing additional information to the Jinja

templating engine.

Parameters:

* **preprocessor** ([`nbconvert.preprocessors.Preprocessor`](index.html#nbconvert.preprocessors.Preprocessor "nbconvert.preprocessors.Preprocessor")) – A dotted module name, a type, or an instance

* **enabled** ([*bool*](https://docs.python.org/3.6/library/functions.html#bool "(in Python v3.6)")) – Mark the preprocessor as enabled

register\_filter(*name*, *jinja\_filter*)[#](#nbconvert.exporters.TemplateExporter.register_filter "Permalink to this definition")

Register a filter.

A filter is a function that accepts and acts on one string.

The filters are accessible within the Jinja templating engine.

Parameters:

* **name** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – name to give the filter in the Jinja engine

* **filter** (*filter*) –

#### Specialized exporter classes[#](#specialized-exporter-classes "Permalink to this heading")

The `NotebookExporter` inherits directly from

`Exporter`, while the other exporters listed here

inherit either directly or indirectly from

`TemplateExporter`.

*class* nbconvert.exporters.NotebookExporter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.exporters.NotebookExporter "Permalink to this definition")

Exports to an IPython notebook.

This is useful when you want to use nbconvert’s preprocessors to operate on

a notebook (e.g. to execute it) and then write it back to a notebook file.

*class* nbconvert.exporters.HTMLExporter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.exporters.HTMLExporter "Permalink to this definition")

Exports a basic HTML document. This exporter assists with the export of

HTML. Inherit from it if you are writing your own HTML template and need

custom preprocessors/filters. If you don’t need custom preprocessors/

filters, just change the ‘template\_file’ config option.

*class* nbconvert.exporters.SlidesExporter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.exporters.SlidesExporter "Permalink to this definition")

Exports HTML slides with reveal.js

*class* nbconvert.exporters.LatexExporter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.exporters.LatexExporter "Permalink to this definition")

Exports to a Latex template. Inherit from this class if your template is

LaTeX based and you need custom transformers/filters.

If you don’t need custom transformers/filters, just change the

‘template\_file’ config option. Place your template in the special “/latex”

subfolder of the “../templates” folder.

*class* nbconvert.exporters.MarkdownExporter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.exporters.MarkdownExporter "Permalink to this definition")

Exports to a markdown document (.md)

*class* nbconvert.exporters.PDFExporter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.exporters.PDFExporter "Permalink to this definition")

Writer designed to write to PDF files.

This inherits from [`LatexExporter`](#nbconvert.exporters.LatexExporter "nbconvert.exporters.LatexExporter"). It creates a LaTeX file in

a temporary directory using the template machinery, and then runs LaTeX

to create a pdf.

*class* nbconvert.exporters.WebPDFExporter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.exporters.WebPDFExporter "Permalink to this definition")

Writer designed to write to PDF files.

This inherits from [`HTMLExporter`](#nbconvert.exporters.HTMLExporter "nbconvert.exporters.HTMLExporter"). It creates the HTML using the

template machinery, and then run playwright to create a pdf.

*class* nbconvert.exporters.PythonExporter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.exporters.PythonExporter "Permalink to this definition")

Exports a Python code file.

Note that the file produced will have a shebang of ‘#!/usr/bin/env python’

regardless of the actual python version used in the notebook.

*class* nbconvert.exporters.RSTExporter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.exporters.RSTExporter "Permalink to this definition")

Exports reStructuredText documents.

### Preprocessors[#](#preprocessors "Permalink to this heading")

See also

[Configuration options](index.html#document-config_options)Configurable options for the nbconvert application

*class* nbconvert.preprocessors.Preprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.Preprocessor "Permalink to this definition")

A configurable preprocessor

Inherit from this class if you wish to have configurability for your

preprocessor.

Any configurable traitlets this class exposed will be configurable in

profiles using c.SubClassName.attribute = value

You can overwrite [`preprocess\_cell()`](#nbconvert.preprocessors.Preprocessor.preprocess_cell "nbconvert.preprocessors.Preprocessor.preprocess_cell") to apply a transformation

independently on each cell or [`preprocess()`](#nbconvert.preprocessors.Preprocessor.preprocess "nbconvert.preprocessors.Preprocessor.preprocess") if you prefer your own

logic. See corresponding docstring for information.

Disabled by default and can be enabled via the config by‘c.YourPreprocessorName.enabled = True’

\_\_init\_\_(*\*\*kw*)[#](#nbconvert.preprocessors.Preprocessor.__init__ "Permalink to this definition")

Public constructor

Parameters:

* **config** (*Config*) – Configuration file structure

* **\*\*kw** – Additional keyword arguments passed to parent

preprocess(*nb*, *resources*)[#](#nbconvert.preprocessors.Preprocessor.preprocess "Permalink to this definition")

Preprocessing to apply on each notebook.

Must return modified nb, resources.

If you wish to apply your preprocessing to each cell, you might want

to override preprocess\_cell method instead.

Parameters:

* **nb** (*NotebookNode*) – Notebook being converted

* **resources** (*dictionary*) – Additional resources used in the conversion process. Allows

preprocessors to pass variables into the Jinja engine.

preprocess\_cell(*cell*, *resources*, *index*)[#](#nbconvert.preprocessors.Preprocessor.preprocess_cell "Permalink to this definition")

Override if you want to apply some preprocessing to each cell.

Must return modified cell and resource dictionary.

Parameters:

* **cell** (*NotebookNode cell*) – Notebook cell being processed

* **resources** (*dictionary*) – Additional resources used in the conversion process. Allows

preprocessors to pass variables into the Jinja engine.

* **index** ([*int*](https://docs.python.org/3.6/library/functions.html#int "(in Python v3.6)")) – Index of the cell being processed

#### Specialized preprocessors[#](#specialized-preprocessors "Permalink to this heading")

##### Converting and extracting figures[#](#converting-and-extracting-figures "Permalink to this heading")

*class* nbconvert.preprocessors.ConvertFiguresPreprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.ConvertFiguresPreprocessor "Permalink to this definition")

Converts all of the outputs in a notebook from one format to another.

*class* nbconvert.preprocessors.SVG2PDFPreprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.SVG2PDFPreprocessor "Permalink to this definition")

Converts all of the outputs in a notebook from SVG to PDF.

*class* nbconvert.preprocessors.ExtractOutputPreprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.ExtractOutputPreprocessor "Permalink to this definition")

Extracts all of the outputs from the notebook file. The extracted

outputs are returned in the ‘resources’ dictionary.

##### Converting text[#](#converting-text "Permalink to this heading")

*class* nbconvert.preprocessors.LatexPreprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.LatexPreprocessor "Permalink to this definition")

Preprocessor for latex destined documents.

Populates the `latex` key in the resources dict,

adding definitions for pygments highlight styles.

Sets the authors, date and title of the latex document,

overriding the values given in the metadata.

*class* nbconvert.preprocessors.HighlightMagicsPreprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.HighlightMagicsPreprocessor "Permalink to this definition")

Detects and tags code cells that use a different languages than Python.

##### Metadata and header control[#](#metadata-and-header-control "Permalink to this heading")

*class* nbconvert.preprocessors.ClearMetadataPreprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.ClearMetadataPreprocessor "Permalink to this definition")

Removes all the metadata from all code cells in a notebook.

*class* nbconvert.preprocessors.CSSHTMLHeaderPreprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.CSSHTMLHeaderPreprocessor "Permalink to this definition")

Preprocessor used to pre-process notebook for HTML output. Adds IPython notebook

front-end CSS and Pygments CSS to HTML output.

##### Removing cells, inputs, and outputs[#](#removing-cells-inputs-and-outputs "Permalink to this heading")

*class* nbconvert.preprocessors.ClearOutputPreprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.ClearOutputPreprocessor "Permalink to this definition")

Removes the output from all code cells in a notebook.

*class* nbconvert.preprocessors.RegexRemovePreprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.RegexRemovePreprocessor "Permalink to this definition")

Removes cells from a notebook that match one or more regular expression.

For each cell, the preprocessor checks whether its contents match

the regular expressions in the `patterns` traitlet which is a list

of unicode strings. If the contents match any of the patterns, the cell

is removed from the notebook.

To modify the list of matched patterns,

modify the patterns traitlet. For example, execute the following command

to convert a notebook to html and remove cells containing only whitespace:

```

jupyter nbconvert --RegexRemovePreprocessor.patterns="['\s\*\Z']" mynotebook.ipynb

```

The command line argument

sets the list of patterns to `'\s\*\Z'` which matches an arbitrary number

of whitespace characters followed by the end of the string.

See <https://regex101.com/> for an interactive guide to regular expressions

(make sure to select the python flavor). See

<https://docs.python.org/library/re.html> for the official regular expression

documentation in python.

*class* nbconvert.preprocessors.TagRemovePreprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.TagRemovePreprocessor "Permalink to this definition")

Removes inputs, outputs, or cells from a notebook that

have tags that designate they are to be removed prior to exporting

the notebook.

remove\_cell\_tagsremoves cells tagged with these values

remove\_all\_outputs\_tagsremoves entire output areas on cells

tagged with these values

remove\_single\_output\_tagsremoves individual output objects on

outputs tagged with these values

remove\_input\_tagsremoves inputs tagged with these values

##### Executing Notebooks[#](#executing-notebooks "Permalink to this heading")

*class* nbconvert.preprocessors.ExecutePreprocessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.preprocessors.ExecutePreprocessor "Permalink to this definition")

Executes all the cells in a notebook

preprocess(*nb: [NotebookNode](https://nbformat.readthedocs.io/en/latest/api.html#nbformat.NotebookNode "(in nbformat v5.9)")*, *resources: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)") = None*, *km: jupyter\_client.manager.KernelManager | [None](https://docs.python.org/3.6/library/constants.html#None "(in Python v3.6)") = None*) → [tuple](https://docs.python.org/3.6/library/stdtypes.html#tuple "(in Python v3.6)")[[nbformat.notebooknode.NotebookNode](https://nbformat.readthedocs.io/en/latest/api.html#nbformat.NotebookNode "(in nbformat v5.9)"), [dict](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")[[str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)"), [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")]][#](#nbconvert.preprocessors.ExecutePreprocessor.preprocess "Permalink to this definition")

Preprocess notebook executing each code cell.

The input argument *nb* is modified in-place.

Note that this function recalls NotebookClient.\_\_init\_\_, which may look wrong.

However since the preprocess call acts line an init on execution state it’s expected.

Therefore, we need to capture it here again to properly reset because traitlet

assignments are not passed. There is a risk if traitlets apply any side effects for

dual init.

The risk should be manageable, and this approach minimizes side-effects relative

to other alternatives.

One alternative but rejected implementation would be to copy the client’s init internals

which has already gotten out of sync with nbclient 0.5 release before nbconvert 6.0 released.

Parameters:

* **nb** (*NotebookNode*) – Notebook being executed.

* **resources** (*dictionary* *(**optional**)*) – Additional resources used in the conversion process. For example,

passing `{'metadata': {'path': run\_path}}` sets the

execution path to `run\_path`.

* **km** (*KernelManager* *(**optional**)*) – Optional kernel manager. If none is provided, a kernel manager will

be created.

Returns:

* **nb** (*NotebookNode*) – The executed notebook.

* **resources** (*dictionary*) – Additional resources used in the conversion process.

preprocess\_cell(*cell*, *resources*, *index*)[#](#nbconvert.preprocessors.ExecutePreprocessor.preprocess_cell "Permalink to this definition")

Override if you want to apply some preprocessing to each cell.

Must return modified cell and resource dictionary.

Parameters:

* **cell** (*NotebookNode cell*) – Notebook cell being processed

* **resources** (*dictionary*) – Additional resources used in the conversion process. Allows

preprocessors to pass variables into the Jinja engine.

* **index** ([*int*](https://docs.python.org/3.6/library/functions.html#int "(in Python v3.6)")) – Index of the cell being processed

*class* nbconvert.preprocessors.CellExecutionError(*traceback: [str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")*, *ename: [str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")*, *evalue: [str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")*)[#](#nbconvert.preprocessors.CellExecutionError "Permalink to this definition")

Custom exception to propagate exceptions that are raised during

notebook execution to the caller. This is mostly useful when

using nbconvert as a library, since it allows to deal with

failures gracefully.

nbconvert.preprocessors.coalesce\_streams(*cell*, *resources*, *index*)[#](#nbconvert.preprocessors.coalesce_streams "Permalink to this definition")

Merge consecutive sequences of stream output into single stream

to prevent extra newlines inserted at flush calls

Parameters:

* **cell** (*NotebookNode cell*) – Notebook cell being processed

* **resources** (*dictionary*) – Additional resources used in the conversion process. Allows

transformers to pass variables into the Jinja engine.

* **index** ([*int*](https://docs.python.org/3.6/library/functions.html#int "(in Python v3.6)")) – Index of the cell being processed

### Filters[#](#filters "Permalink to this heading")

Filters are for use with the `nbconvert.exporters.templateexporter.TemplateExporter` exporter.

They provide a way for you transform notebook contents to a particular format depending

on the template you are using. For example, when converting to HTML, you would want to

use the `ansi2html()` function to convert ANSI colors (from

e.g. a terminal traceback) to HTML colors.

See also

[Exporters](index.html#document-api/exporters)API documentation for the various exporter classes

nbconvert.filters.add\_anchor(*html*, *anchor\_link\_text='¶'*)[#](#nbconvert.filters.add_anchor "Permalink to this definition")

Add an id and an anchor-link to an html header

For use on markdown headings

nbconvert.filters.add\_prompts(*code*, *first='>>> '*, *cont='... '*)[#](#nbconvert.filters.add_prompts "Permalink to this definition")

Add prompts to code snippets

nbconvert.filters.ansi2html(*text*)[#](#nbconvert.filters.ansi2html "Permalink to this definition")

Convert ANSI colors to HTML colors.

Parameters:

**text** (*unicode*) – Text containing ANSI colors to convert to HTML

nbconvert.filters.ansi2latex(*text*)[#](#nbconvert.filters.ansi2latex "Permalink to this definition")

Convert ANSI colors to LaTeX colors.

Parameters:

**text** (*unicode*) – Text containing ANSI colors to convert to LaTeX

nbconvert.filters.ascii\_only(*s*)[#](#nbconvert.filters.ascii_only "Permalink to this definition")

ensure a string is ascii

nbconvert.filters.citation2latex(*s*)[#](#nbconvert.filters.citation2latex "Permalink to this definition")

Parse citations in Markdown cells.

This looks for HTML tags having a data attribute names `data-cite`

and replaces it by the call to LaTeX cite command. The transformation

looks like this:

```

<cite data-cite="granger">(Granger, 2013)</cite>

```

Becomes

```

\cite{granger}

```

Any HTML tag can be used, which allows the citations to be formatted

in HTML in any manner.

nbconvert.filters.comment\_lines(*text*, *prefix='# '*)[#](#nbconvert.filters.comment_lines "Permalink to this definition")

Build a Python comment line from input text.

Parameters:

* **text** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – Text to comment out.

* **prefix** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – Character to append to the start of each line.

nbconvert.filters.escape\_latex(*text*)[#](#nbconvert.filters.escape_latex "Permalink to this definition")

Escape characters that may conflict with latex.

Parameters:

**text** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – Text containing characters that may conflict with Latex

*class* nbconvert.filters.DataTypeFilter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.filters.DataTypeFilter "Permalink to this definition")

Returns the preferred display format

nbconvert.filters.get\_lines(*text*, *start=None*, *end=None*)[#](#nbconvert.filters.get_lines "Permalink to this definition")

Split the input text into separate lines and then return the

lines that the caller is interested in.

Parameters:

* **text** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – Text to parse lines from.

* **start** ([*int*](https://docs.python.org/3.6/library/functions.html#int "(in Python v3.6)")*,* *optional*) – First line to grab from.

* **end** ([*int*](https://docs.python.org/3.6/library/functions.html#int "(in Python v3.6)")*,* *optional*) – Last line to grab from.

nbconvert.filters.convert\_pandoc(*source*, *from\_format*, *to\_format*, *extra\_args=None*)[#](#nbconvert.filters.convert_pandoc "Permalink to this definition")

Convert between any two formats using pandoc.

This function will raise an error if pandoc is not installed.

Any error messages generated by pandoc are printed to stderr.

Parameters:

* **source** (*string*) – Input string, assumed to be valid in from\_format.

* **from\_format** (*string*) – Pandoc format of source.

* **to\_format** (*string*) – Pandoc format for output.

Returns:

**out** – Output as returned by pandoc.

Return type:

string

*class* nbconvert.filters.Highlight2HTML(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.filters.Highlight2HTML "Permalink to this definition")

Convert highlighted code to html.

*class* nbconvert.filters.Highlight2Latex(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.filters.Highlight2Latex "Permalink to this definition")

Convert highlighted code to latex.

nbconvert.filters.html2text(*element*)[#](#nbconvert.filters.html2text "Permalink to this definition")

extract inner text from html

Analog of jQuery’s $(element).text()

nbconvert.filters.indent(*instr*, *nspaces=4*, *ntabs=0*, *flatten=False*)[#](#nbconvert.filters.indent "Permalink to this definition")

Indent a string a given number of spaces or tabstops.

indent(str,nspaces=4,ntabs=0) -> indent str by ntabs+nspaces.

Parameters:

* **instr** (*basestring*) – The string to be indented.

* **nspaces** ([*int*](https://docs.python.org/3.6/library/functions.html#int "(in Python v3.6)") *(**default: 4**)*) – The number of spaces to be indented.

* **ntabs** ([*int*](https://docs.python.org/3.6/library/functions.html#int "(in Python v3.6)") *(**default: 0**)*) – The number of tabs to be indented.

* **flatten** ([*bool*](https://docs.python.org/3.6/library/functions.html#bool "(in Python v3.6)") *(**default: False**)*) – Whether to scrub existing indentation. If True, all lines will be

aligned to the same indentation. If False, existing indentation will

be strictly increased.

Returns:

**str|unicode**

Return type:

string indented by ntabs and nspaces.

nbconvert.filters.ipython2python(*code*)[#](#nbconvert.filters.ipython2python "Permalink to this definition")

Transform IPython syntax to pure Python syntax

Parameters:

**code** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – IPython code, to be transformed to pure Python

nbconvert.filters.markdown2html(*source: [str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")*) → [str](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")[#](#nbconvert.filters.markdown2html "Permalink to this definition")

Convert a markdown string to HTML using mistune

nbconvert.filters.markdown2latex(*source*, *markup='markdown'*, *extra\_args=None*)[#](#nbconvert.filters.markdown2latex "Permalink to this definition")

Convert a markdown string to LaTeX via pandoc.

This function will raise an error if pandoc is not installed.

Any error messages generated by pandoc are printed to stderr.

Parameters:

* **source** (*string*) – Input string, assumed to be valid markdown.

* **markup** (*string*) – Markup used by pandoc’s reader

default : pandoc extended markdown

(see <https://pandoc.org/README.html#pandocs-markdown>)

Returns:

**out** – Output as returned by pandoc.

Return type:

string

nbconvert.filters.markdown2rst(*source*, *extra\_args=None*)[#](#nbconvert.filters.markdown2rst "Permalink to this definition")

Convert a markdown string to ReST via pandoc.

This function will raise an error if pandoc is not installed.

Any error messages generated by pandoc are printed to stderr.

Parameters:

**source** (*string*) – Input string, assumed to be valid markdown.

Returns:

**out** – Output as returned by pandoc.

Return type:

string

nbconvert.filters.path2url(*path*)[#](#nbconvert.filters.path2url "Permalink to this definition")

Turn a file path into a URL

nbconvert.filters.posix\_path(*path*)[#](#nbconvert.filters.posix_path "Permalink to this definition")

Turn a path into posix-style path/to/etc

Mainly for use in latex on Windows,

where native Windows paths are not allowed.

nbconvert.filters.prevent\_list\_blocks(*s*)[#](#nbconvert.filters.prevent_list_blocks "Permalink to this definition")

Prevent presence of enumerate or itemize blocks in latex headings cells

nbconvert.filters.strip\_ansi(*source*)[#](#nbconvert.filters.strip_ansi "Permalink to this definition")

Remove ANSI escape codes from text.

Parameters:

**source** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – Source to remove the ANSI from

nbconvert.filters.strip\_dollars(*text*)[#](#nbconvert.filters.strip_dollars "Permalink to this definition")

Remove all dollar symbols from text

Parameters:

**text** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – Text to remove dollars from

nbconvert.filters.strip\_files\_prefix(*text*)[#](#nbconvert.filters.strip_files_prefix "Permalink to this definition")

Fix all fake URLs that start with `files/`, stripping out the `files/` prefix.

Applies to both urls (for html) and relative paths (for markdown paths).

Parameters:

**text** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – Text in which to replace ‘src=”files/real…’ with ‘src=”real…’

nbconvert.filters.wrap\_text(*text*, *width=100*)[#](#nbconvert.filters.wrap_text "Permalink to this definition")

Intelligently wrap text.

Wrap text without breaking words if possible.

Parameters:

* **text** ([*str*](https://docs.python.org/3.6/library/stdtypes.html#str "(in Python v3.6)")) – Text to wrap.

* **width** ([*int*](https://docs.python.org/3.6/library/functions.html#int "(in Python v3.6)")*,* *optional*) – Number of characters to wrap to, default 100.

### Writers[#](#module-nbconvert.writers "Permalink to this heading")

See also

[Configuration options](index.html#document-config_options)Configurable options for the nbconvert application

*class* nbconvert.writers.WriterBase(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.writers.WriterBase "Permalink to this definition")

Consumes output from nbconvert export…() methods and writes to a

useful location.

\_\_init\_\_(*config=None*, *\*\*kw*)[#](#nbconvert.writers.WriterBase.__init__ "Permalink to this definition")

Constructor

write(*output*, *resources*, *\*\*kw*)[#](#nbconvert.writers.WriterBase.write "Permalink to this definition")

Consume and write Jinja output.

Parameters:

* **output** (*string*) – Conversion results. This string contains the file contents of the

converted file.

* **resources** ([*dict*](https://docs.python.org/3.6/library/stdtypes.html#dict "(in Python v3.6)")) – Resources created and filled by the nbconvert conversion process.

Includes output from preprocessors, such as the extract figure

preprocessor.

#### Specialized writers[#](#specialized-writers "Permalink to this heading")

*class* nbconvert.writers.DebugWriter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.writers.DebugWriter "Permalink to this definition")

Consumes output from nbconvert export…() methods and writes useful

debugging information to the stdout. The information includes a list of

resources that were extracted from the notebook(s) during export.

*class* nbconvert.writers.FilesWriter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.writers.FilesWriter "Permalink to this definition")

Consumes nbconvert output and produces files.

*class* nbconvert.writers.StdoutWriter(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.writers.StdoutWriter "Permalink to this definition")

Consumes output from nbconvert export…() methods and writes to the

stdout stream.

### Postprocessors[#](#module-nbconvert.postprocessors "Permalink to this heading")

See also

[Configuration options](index.html#document-config_options)Configurable options for the nbconvert application

*class* nbconvert.postprocessors.PostProcessorBase(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.postprocessors.PostProcessorBase "Permalink to this definition")

The base class for post processors.

postprocess(*input\_*)[#](#nbconvert.postprocessors.PostProcessorBase.postprocess "Permalink to this definition")

Post-process output from a writer.

#### Specialized postprocessors[#](#specialized-postprocessors "Permalink to this heading")

*class* nbconvert.postprocessors.ServePostProcessor(*\*\*kwargs: [Any](https://docs.python.org/3.6/library/typing.html#typing.Any "(in Python v3.6)")*)[#](#nbconvert.postprocessors.ServePostProcessor "Permalink to this definition")

Post processor designed to serve files

Proxies reveal.js requests to a CDN if no local reveal.js is present

postprocess(*input*)[#](#nbconvert.postprocessors.ServePostProcessor.postprocess "Permalink to this definition")

Serve the build directory with a webserver.

Making an `nbconvert` release[#](#making-an-nbconvert-release "Permalink to this heading")

------------------------------------------------------------------------------------------

This document guides a contributor through creating a release of `nbconvert`.

### Assign all merged PRs to milestones[#](#assign-all-merged-prs-to-milestones "Permalink to this heading")

Go to GitHub and assign all PRs that have been merged to milestones. This will

be helpful when you update the changelog. If you go to this [GitHub page](https://github.com/jupyter/nbconvert/pulls?utf8=%E2%9C%93&q=is%3Amerged%20is%3Apr%20no%3Amilestone%20) you will find all the PRs that currently have no milestones.

### Gather all PRs related to milestone[#](#gather-all-prs-related-to-milestone "Permalink to this heading")

[ghpro](https://github.com/mpacer/ghpro/tree/alternate_styling) can be used to extract the pull requests by call the following from nbconvert directory (will ask for an API token the first time):

> 

> 

> ```

> github-stats --milestone=$VERSION --since-tag $LAST\_VERSION --links

> 

> ```

> 

> 

> 

### Manually categorize tickets[#](#manually-categorize-tickets "Permalink to this heading")

Group the tickets by these general categories (or others if they are relevant). This usually a manual processes to evaluate the changes in each PR.

1. New Features

2. Deprecations

3. Fixing Problems

4. Testing, Docs, and Builds

### Collect major changes[#](#collect-major-changes "Permalink to this heading")

From the tickets write up any major features / changes that deserve a paragraph to describe how they work.

### Update docs/source/changelog.rst[#](#update-docs-source-changelog-rst "Permalink to this heading")

Copy these changes with the new version to the top of changelog.rst. Prior release changelogs can be used to pick formatting of the message.

### Check installed tools[#](#check-installed-tools "Permalink to this heading")

Review `CONTRIBUTING.md`, particularly the testing and release sections.

### Clean the repository[#](#clean-the-repository "Permalink to this heading")

You can remove all non-tracked files with:

> 

> 

> ```

> git clean -xfdi

> 

> ```

> 

> 

> 

This would ask you for confirmation before removing all untracked files.

Make sure the `dist/` and `build/` folders are clean and avoid stale builds from

previous attempts.

### Create the release[#](#create-the-release "Permalink to this heading")

1. Update the [changelog](index.html#document-changelog) to account for all the PRs assigned to this milestone.

2. Update version number in `nbconvert/\_version.py` and remove `.dev` from dev\_info. Note that the version may already be on the dev version of the number you’re releasing.

3. Commit and tag the release with the current version number:

```

git commit -am "release $VERSION"

git tag $VERSION

```

4. You are now ready to build the `sdist` and `wheel`:

```

pip install build

python -m build .

```

5. You can now test the `wheel` and the `sdist` locally before uploading

to PyPI. Make sure to use [twine](https://github.com/pypa/twine) to

upload the archives over SSL.

```

twine upload dist/*

```

6. The conda-forge bot will automatically add a PR on your behalf to the [nbconvert-feedstock repo](https://github.com/conda-forge/nbconvert-feedstock). You may want to review this PR to ensure conda-forge will be updated cleanly.

### Release the new version[#](#release-the-new-version "Permalink to this heading")

Push directly on main, including –tags separately

> 

> 

> ```

> git push upstream

> git push upstream --tags

> 

> ```

> 

> 

> 

### Return to development state[#](#return-to-development-state "Permalink to this heading")

If all went well, change the `nbconvert/\_version.py` back by adding the`.dev` suffix and moving the version forward to the next patch

release number.

### Email googlegroup with update letter[#](#email-googlegroup-with-update-letter "Permalink to this heading")

Make sure to email [jupyter@googlegroups.com](mailto:jupyter%40googlegroups.com) with the subject line of

“[ANN] NBConvert $VERSION – …” and include at least the significant changes,

contributors, and individual PR notes (if not many significant changes).

Changes in nbconvert[#](#changes-in-nbconvert "Permalink to this heading")

--------------------------------------------------------------------------

### 7.9.2[#](#id1 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.9.1...8e85303e530013f9e6d29be85f25e9602a443194))

#### Bugs fixed[#](#bugs-fixed "Permalink to this heading")

* Restore ResourcesDict to the public API [#2055](https://github.com/jupyter/nbconvert/pull/2055) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#contributors-to-this-release "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-10-04&amp;to=2023-10-05&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2023-10-04..2023-10-05&amp;type=Issues)

### 7.9.1[#](#id2 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.9.0...6d679efebf8b6b7c65c4ab0dcb0dec97f6d389b9))

#### Maintenance and upkeep improvements[#](#maintenance-and-upkeep-improvements "Permalink to this heading")

* Include tests in sdist [#2053](https://github.com/jupyter/nbconvert/pull/2053) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id3 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-10-04&amp;to=2023-10-04&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2023-10-04..2023-10-04&amp;type=Issues)

### 7.9.0[#](#id4 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.8.0...0e36347f31ee0b06d461aaa845e458eb7c9f8fc0))

#### Maintenance and upkeep improvements[#](#id5 "Permalink to this heading")

* Update to mermaidjs 10.5.0 [#2051](https://github.com/jupyter/nbconvert/pull/2051) ([@bollwyvl](https://github.com/bollwyvl))

* Update typing for traitlets 5.11 [#2050](https://github.com/jupyter/nbconvert/pull/2050) ([@blink1073](https://github.com/blink1073))

* chore: update pre-commit hooks [#2049](https://github.com/jupyter/nbconvert/pull/2049) ([@pre-commit-ci](https://github.com/pre-commit-ci))

* Fixup typings [#2048](https://github.com/jupyter/nbconvert/pull/2048) ([@blink1073](https://github.com/blink1073))

* Remove redundant link check in CI [#2044](https://github.com/jupyter/nbconvert/pull/2044) ([@blink1073](https://github.com/blink1073))

* Bump actions/checkout from 3 to 4 [#2042](https://github.com/jupyter/nbconvert/pull/2042) ([@dependabot](https://github.com/dependabot))

* Adopt sp-repo-review [#2040](https://github.com/jupyter/nbconvert/pull/2040) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id6 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-08-29&amp;to=2023-10-04&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2023-08-29..2023-10-04&amp;type=Issues) | [@bollwyvl](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Abollwyvl+updated%3A2023-08-29..2023-10-04&amp;type=Issues) | [@dependabot](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Adependabot+updated%3A2023-08-29..2023-10-04&amp;type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2023-08-29..2023-10-04&amp;type=Issues)

### 7.8.0[#](#id7 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.7.4...9e8d252f2bf5b4177bbbeb007fd1a489356926ec))

#### Enhancements made[#](#enhancements-made "Permalink to this heading")

* MermaidJS 10.3.1, accessibility features, handle MIME [#2034](https://github.com/jupyter/nbconvert/pull/2034) ([@bollwyvl](https://github.com/bollwyvl))

#### Bugs fixed[#](#id8 "Permalink to this heading")

* Fix: Prevent error from all whitespace lang string [#2036](https://github.com/jupyter/nbconvert/pull/2036) ([@Adamtaranto](https://github.com/Adamtaranto))

#### Contributors to this release[#](#id9 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-08-16&amp;to=2023-08-29&amp;type=c))

[@Adamtaranto](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3AAdamtaranto+updated%3A2023-08-16..2023-08-29&amp;type=Issues) | [@bollwyvl](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Abollwyvl+updated%3A2023-08-16..2023-08-29&amp;type=Issues)

### 7.7.4[#](#id10 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.7.3...bbb095ba24c005ce26f0e8b47f4ddf19a5debe68))

#### Bugs fixed[#](#id11 "Permalink to this heading")

* Give main tag a height of 100% in css for reveal html [#2032](https://github.com/jupyter/nbconvert/pull/2032) ([@lkeegan](https://github.com/lkeegan))

#### Maintenance and upkeep improvements[#](#id12 "Permalink to this heading")

#### Contributors to this release[#](#id13 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-07-25&amp;to=2023-08-16&amp;type=c))

[@Carreau](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3ACarreau+updated%3A2023-07-25..2023-08-16&amp;type=Issues) | [@lkeegan](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Alkeegan+updated%3A2023-07-25..2023-08-16&amp;type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2023-07-25..2023-08-16&amp;type=Issues)

### 7.7.3[#](#id14 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.7.2...73fd3b9eb5e364bc86f9407e027d5577c5c8db9e))

#### Bugs fixed[#](#id15 "Permalink to this heading")

* Restore pauses during webpdf render [#2025](https://github.com/jupyter/nbconvert/pull/2025) ([@jstorrs](https://github.com/jstorrs))

#### Contributors to this release[#](#id16 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-07-19&amp;to=2023-07-25&amp;type=c))

[@jstorrs](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ajstorrs+updated%3A2023-07-19..2023-07-25&amp;type=Issues)

### 7.7.2[#](#id17 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.7.1...1cbb0a46d97f9f0b2a6a0d359ebf9b4b50178c25))

#### Bugs fixed[#](#id18 "Permalink to this heading")

* Show a warning if an image has no alternative text [#2024](https://github.com/jupyter/nbconvert/pull/2024) ([@brichet](https://github.com/brichet))

#### Contributors to this release[#](#id19 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-07-17&amp;to=2023-07-19&amp;type=c))

[@brichet](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Abrichet+updated%3A2023-07-17..2023-07-19&amp;type=Issues)

### 7.7.1[#](#id20 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.7.0...86cebfc16920fcdddef557620a7b8a23d84072d6))

#### Bugs fixed[#](#id21 "Permalink to this heading")

* Restore ‘media=print’ option [#2022](https://github.com/jupyter/nbconvert/pull/2022) ([@brichet](https://github.com/brichet))

#### Contributors to this release[#](#id22 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-07-17&amp;to=2023-07-17&amp;type=c))

[@brichet](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Abrichet+updated%3A2023-07-17..2023-07-17&amp;type=Issues)

### 7.7.0[#](#id23 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.6.0...f2fc3e13fe8e8836324550dac5286bbb0e4315bb))

#### Enhancements made[#](#id24 "Permalink to this heading")

* [Accessibility] some accessibility improvements [#2021](https://github.com/jupyter/nbconvert/pull/2021) ([@brichet](https://github.com/brichet))

* Adopt playwright [#2013](https://github.com/jupyter/nbconvert/pull/2013) ([@brichet](https://github.com/brichet))

* Update to Jupyterlab 4 [#2012](https://github.com/jupyter/nbconvert/pull/2012) ([@brichet](https://github.com/brichet))

#### Bugs fixed[#](#id25 "Permalink to this heading")

* html: write image/svg+xml data as base64 and skip clean\_html [#2018](https://github.com/jupyter/nbconvert/pull/2018) ([@jstorrs](https://github.com/jstorrs))

* Remove HTML escaping JSON-encoded widget state [#1934](https://github.com/jupyter/nbconvert/pull/1934) ([@manzt](https://github.com/manzt))

#### Maintenance and upkeep improvements[#](#id26 "Permalink to this heading")

* Fix lint error [#2010](https://github.com/jupyter/nbconvert/pull/2010) ([@blink1073](https://github.com/blink1073))

* Support Python 3.8-3.12 [#2008](https://github.com/jupyter/nbconvert/pull/2008) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id27 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-06-19&amp;to=2023-07-17&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2023-06-19..2023-07-17&amp;type=Issues) | [@brichet](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Abrichet+updated%3A2023-06-19..2023-07-17&amp;type=Issues) | [@jstorrs](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ajstorrs+updated%3A2023-06-19..2023-07-17&amp;type=Issues) | [@maartenbreddels](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Amaartenbreddels+updated%3A2023-06-19..2023-07-17&amp;type=Issues) | [@manzt](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Amanzt+updated%3A2023-06-19..2023-07-17&amp;type=Issues) | [@martinRenou](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3AmartinRenou+updated%3A2023-06-19..2023-07-17&amp;type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2023-06-19..2023-07-17&amp;type=Issues)

### 7.6.0[#](#id28 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.5.0...60af6d897c083444586829c636f278d84ae81962))

#### Maintenance and upkeep improvements[#](#id29 "Permalink to this heading")

* Update to Mistune v3 [#1820](https://github.com/jupyter/nbconvert/pull/1820) ([@TiagodePAlves](https://github.com/TiagodePAlves))

#### Contributors to this release[#](#id30 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-06-13&amp;to=2023-06-19&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2023-06-13..2023-06-19&amp;type=Issues) | [@kloczek](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Akloczek+updated%3A2023-06-13..2023-06-19&amp;type=Issues) | [@TiagodePAlves](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3ATiagodePAlves+updated%3A2023-06-13..2023-06-19&amp;type=Issues)

### 7.5.0[#](#id31 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.4.0...3dd3a67bf16474042efac25519ef257d708a8d7b))

#### Enhancements made[#](#id32 "Permalink to this heading")

* Add mermaidjs 10.2.3 [#1957](https://github.com/jupyter/nbconvert/pull/1957) ([@bollwyvl](https://github.com/bollwyvl))

#### Bugs fixed[#](#id33 "Permalink to this heading")

* Fix pdf conversion with explicitly relative paths [#2005](https://github.com/jupyter/nbconvert/pull/2005) ([@tuncbkose](https://github.com/tuncbkose))

* Ensure TEXINPUTS is an absolute path [#2002](https://github.com/jupyter/nbconvert/pull/2002) ([@tuncbkose](https://github.com/tuncbkose))

#### Maintenance and upkeep improvements[#](#id34 "Permalink to this heading")

* bump pandoc max version [#1997](https://github.com/jupyter/nbconvert/pull/1997) ([@tuncbkose](https://github.com/tuncbkose))

* exclude bleach 5.0.0 from dependencies resolution [#1990](https://github.com/jupyter/nbconvert/pull/1990) ([@karlicoss](https://github.com/karlicoss))

#### Contributors to this release[#](#id35 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-05-08&amp;to=2023-06-13&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2023-05-08..2023-06-13&amp;type=Issues) | [@bollwyvl](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Abollwyvl+updated%3A2023-05-08..2023-06-13&amp;type=Issues) | [@karlicoss](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Akarlicoss+updated%3A2023-05-08..2023-06-13&amp;type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2023-05-08..2023-06-13&amp;type=Issues) | [@tuncbkose](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Atuncbkose+updated%3A2023-05-08..2023-06-13&amp;type=Issues)

### 7.4.0[#](#id36 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.3.1...32fcf7b26462f5d51d577f8beda9d49cd3a0f441))

#### Enhancements made[#](#id37 "Permalink to this heading")

* Add ExtractAttachmentsPreprocessor [#1978](https://github.com/jupyter/nbconvert/pull/1978) ([@tuncbkose](https://github.com/tuncbkose))

#### Bugs fixed[#](#id38 "Permalink to this heading")

* Moved ensure\_dir\_exists to FilesWriter [#1987](https://github.com/jupyter/nbconvert/pull/1987) ([@tuncbkose](https://github.com/tuncbkose))

* Tweak exporter default\_config merging behavior [#1981](https://github.com/jupyter/nbconvert/pull/1981) ([@tuncbkose](https://github.com/tuncbkose))

* Revert unintended effects of #1966 [#1974](https://github.com/jupyter/nbconvert/pull/1974) ([@tuncbkose](https://github.com/tuncbkose))

#### Maintenance and upkeep improvements[#](#id39 "Permalink to this heading")

* Fix test\_errors\_print\_traceback test [#1985](https://github.com/jupyter/nbconvert/pull/1985) ([@blink1073](https://github.com/blink1073))

* Ensure toml support in coverage reporting [#1984](https://github.com/jupyter/nbconvert/pull/1984) ([@blink1073](https://github.com/blink1073))

* Use local coverage [#1976](https://github.com/jupyter/nbconvert/pull/1976) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id40 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-04-10&amp;to=2023-05-08&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2023-04-10..2023-05-08&amp;type=Issues) | [@krassowski](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Akrassowski+updated%3A2023-04-10..2023-05-08&amp;type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2023-04-10..2023-05-08&amp;type=Issues) | [@tuncbkose](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Atuncbkose+updated%3A2023-04-10..2023-05-08&amp;type=Issues)

### 7.3.1[#](#id41 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.3.0...3860152ecea3d9833540eebe279ff603b3d47cea))

#### Bugs fixed[#](#id42 "Permalink to this heading")

* Remove overwriting of default KernelManager [#1972](https://github.com/jupyter/nbconvert/pull/1972) ([@tuncbkose](https://github.com/tuncbkose))

#### Maintenance and upkeep improvements[#](#id43 "Permalink to this heading")

#### Contributors to this release[#](#id44 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-04-03&amp;to=2023-04-10&amp;type=c))

[@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2023-04-03..2023-04-10&amp;type=Issues) | [@tuncbkose](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Atuncbkose+updated%3A2023-04-03..2023-04-10&amp;type=Issues)

### 7.3.0[#](#id45 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.2.10...056dc4ecc8f9f3e9249f0dbddf1221c65228b961))

#### Enhancements made[#](#id46 "Permalink to this heading")

* Allow pattern in output\_base [#1967](https://github.com/jupyter/nbconvert/pull/1967) ([@JeppeKlitgaard](https://github.com/JeppeKlitgaard))

* Make date configurable in latex/PDF [#1963](https://github.com/jupyter/nbconvert/pull/1963) ([@achimgaedke](https://github.com/achimgaedke))

* Update jupyterlab CSS [#1960](https://github.com/jupyter/nbconvert/pull/1960) ([@martinRenou](https://github.com/martinRenou))

#### Maintenance and upkeep improvements[#](#id47 "Permalink to this heading")

* Update ci badge [#1968](https://github.com/jupyter/nbconvert/pull/1968) ([@blink1073](https://github.com/blink1073))

* More detailed release instructions [#1959](https://github.com/jupyter/nbconvert/pull/1959) ([@Carreau](https://github.com/Carreau))

#### Contributors to this release[#](#id48 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-03-14&amp;to=2023-04-03&amp;type=c))

[@achimgaedke](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Aachimgaedke+updated%3A2023-03-14..2023-04-03&amp;type=Issues) | [@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2023-03-14..2023-04-03&amp;type=Issues) | [@Carreau](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3ACarreau+updated%3A2023-03-14..2023-04-03&amp;type=Issues) | [@JeppeKlitgaard](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3AJeppeKlitgaard+updated%3A2023-03-14..2023-04-03&amp;type=Issues) | [@martinRenou](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3AmartinRenou+updated%3A2023-03-14..2023-04-03&amp;type=Issues)

### 7.2.10[#](#id49 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.2.9...acf41acf6d83cb725f3a2c48686c828eff7b24d8))

#### Enhancements made[#](#id50 "Permalink to this heading")

* Add cell-id anchor for cell identification [#1897](https://github.com/jupyter/nbconvert/pull/1897) ([@krassowski](https://github.com/krassowski))

#### Bugs fixed[#](#id51 "Permalink to this heading")

* Do not import pyppeteer for installation check [#1947](https://github.com/jupyter/nbconvert/pull/1947) ([@krassowski](https://github.com/krassowski))

#### Maintenance and upkeep improvements[#](#id52 "Permalink to this heading")

* Clean up license [#1949](https://github.com/jupyter/nbconvert/pull/1949) ([@dcsaba89](https://github.com/dcsaba89))

* Add more linting [#1943](https://github.com/jupyter/nbconvert/pull/1943) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id53 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-01-24&amp;to=2023-03-14&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2023-01-24..2023-03-14&amp;type=Issues) | [@dcsaba89](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Adcsaba89+updated%3A2023-01-24..2023-03-14&amp;type=Issues) | [@krassowski](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Akrassowski+updated%3A2023-01-24..2023-03-14&amp;type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2023-01-24..2023-03-14&amp;type=Issues)

### 7.2.9[#](#id54 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.2.8...14b1d7aa75485ea754c2d0ffc67cc528e3984a99))

#### Bugs fixed[#](#id55 "Permalink to this heading")

* Fix handling of css sanitizer [#1940](https://github.com/jupyter/nbconvert/pull/1940) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id56 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-01-16&amp;to=2023-01-24&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2023-01-16..2023-01-24&amp;type=Issues)

### 7.2.8[#](#id57 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.2.7...73f7b1b93a4526d7e9d987f5a5b207eaed8171f2))

#### Bugs fixed[#](#id58 "Permalink to this heading")

* always pass relax\_add\_props=True when validating [#1936](https://github.com/jupyter/nbconvert/pull/1936) ([@minrk](https://github.com/minrk))

#### Maintenance and upkeep improvements[#](#id59 "Permalink to this heading")

* Update codecov link [#1935](https://github.com/jupyter/nbconvert/pull/1935) ([@blink1073](https://github.com/blink1073))

* Fix types and add lint to automerge [#1932](https://github.com/jupyter/nbconvert/pull/1932) ([@blink1073](https://github.com/blink1073))

* Add type checking [#1930](https://github.com/jupyter/nbconvert/pull/1930) ([@blink1073](https://github.com/blink1073))

* Add spelling and docstring enforcement [#1929](https://github.com/jupyter/nbconvert/pull/1929) ([@blink1073](https://github.com/blink1073))

* Add scheduled ci run [#1926](https://github.com/jupyter/nbconvert/pull/1926) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id60 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2022-12-19&amp;to=2023-01-16&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2022-12-19..2023-01-16&amp;type=Issues) | [@maartenbreddels](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Amaartenbreddels+updated%3A2022-12-19..2023-01-16&amp;type=Issues) | [@martinRenou](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3AmartinRenou+updated%3A2022-12-19..2023-01-16&amp;type=Issues) | [@minrk](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Aminrk+updated%3A2022-12-19..2023-01-16&amp;type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2022-12-19..2023-01-16&amp;type=Issues)

### 7.2.7[#](#id61 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.2.6...a32c3c1063e081d7e639b7f1670788d220b93810))

#### Bugs fixed[#](#id62 "Permalink to this heading")

* Fix Hanging Tests on Linux [#1924](https://github.com/jupyter/nbconvert/pull/1924) ([@blink1073](https://github.com/blink1073))

#### Maintenance and upkeep improvements[#](#id63 "Permalink to this heading")

* Adopt ruff and handle lint [#1925](https://github.com/jupyter/nbconvert/pull/1925) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id64 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2022-12-05&amp;to=2022-12-19&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2022-12-05..2022-12-19&amp;type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2022-12-05..2022-12-19&amp;type=Issues)

### 7.2.6[#](#id65 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.2.5...788dd3c4de1b6333e807250d0f33b59b80d5b202))

#### Maintenance and upkeep improvements[#](#id66 "Permalink to this heading")

* Include all templates in sdist [#1916](https://github.com/jupyter/nbconvert/pull/1916) ([@blink1073](https://github.com/blink1073))

* clean up workflows [#1911](https://github.com/jupyter/nbconvert/pull/1911) ([@blink1073](https://github.com/blink1073))

* CI Cleanup [#1910](https://github.com/jupyter/nbconvert/pull/1910) ([@blink1073](https://github.com/blink1073))

#### Documentation improvements[#](#documentation-improvements "Permalink to this heading")

* Fix docs build and switch to PyData Sphinx Theme [#1912](https://github.com/jupyter/nbconvert/pull/1912) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id67 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2022-11-14&amp;to=2022-12-05&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2022-11-14..2022-12-05&amp;type=Issues)

### 7.2.5[#](#id68 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.2.4...e5fefbb17b0bf3d6b5bbeb9a2ee62412d75ab0d8))

#### Bugs fixed[#](#id69 "Permalink to this heading")

* Fix for webpdf print margins [#1907](https://github.com/jupyter/nbconvert/pull/1907) ([@JWock82](https://github.com/JWock82))

#### Maintenance and upkeep improvements[#](#id70 "Permalink to this heading")

* Bump actions/upload-artifact from 2 to 3 [#1904](https://github.com/jupyter/nbconvert/pull/1904) ([@dependabot](https://github.com/dependabot))

* Bump actions/checkout from 2 to 3 [#1903](https://github.com/jupyter/nbconvert/pull/1903) ([@dependabot](https://github.com/dependabot))

#### Contributors to this release[#](#id71 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2022-11-09&amp;to=2022-11-14&amp;type=c))

[@dependabot](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Adependabot+updated%3A2022-11-09..2022-11-14&amp;type=Issues) | [@JWock82](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3AJWock82+updated%3A2022-11-09..2022-11-14&amp;type=Issues)

### 7.2.4[#](#id72 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.2.3...90ca66ccf02abc59052f4f38dcc657b0d2c34a07))

#### Maintenance and upkeep improvements[#](#id73 "Permalink to this heading")

* Handle jupyter core warning [#1905](https://github.com/jupyter/nbconvert/pull/1905) ([@blink1073](https://github.com/blink1073))

* Add dependabot [#1902](https://github.com/jupyter/nbconvert/pull/1902) ([@blink1073](https://github.com/blink1073))

* Add Py-typed marker. [#1898](https://github.com/jupyter/nbconvert/pull/1898) ([@Carreau](https://github.com/Carreau))

#### Contributors to this release[#](#id74 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2022-10-27&amp;to=2022-11-09&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2022-10-27..2022-11-09&amp;type=Issues) | [@Carreau](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3ACarreau+updated%3A2022-10-27..2022-11-09&amp;type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2022-10-27..2022-11-09&amp;type=Issues)

### 7.2.3[#](#id75 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.2.2...04180fdb015c56ac320d5062a81da065791c5726))

#### Bugs fixed[#](#id76 "Permalink to this heading")

* clean\_html: allow SVG tags and SVG attributes [#1890](https://github.com/jupyter/nbconvert/pull/1890) ([@akx](https://github.com/akx))

#### Maintenance and upkeep improvements[#](#id77 "Permalink to this heading")

#### Contributors to this release[#](#id78 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2022-10-19&amp;to=2022-10-27&amp;type=c))

[@akx](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Aakx+updated%3A2022-10-19..2022-10-27&amp;type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2022-10-19..2022-10-27&amp;type=Issues)

### 7.2.2[#](#id79 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.2.1...a9566befb6e457b51373b61debffc78050d41273))

#### Bugs fixed[#](#id80 "Permalink to this heading")

* Fix default config test [#1885](https://github.com/jupyter/nbconvert/pull/1885) ([@blink1073](https://github.com/blink1073))

#### Maintenance and upkeep improvements[#](#id81 "Permalink to this heading")

* Add ensure label workflow [#1884](https://github.com/jupyter/nbconvert/pull/1884) ([@blink1073](https://github.com/blink1073))

* Add release workflows [#1883](https://github.com/jupyter/nbconvert/pull/1883) ([@blink1073](https://github.com/blink1073))

* Maintenance cleanup [#1881](https://github.com/jupyter/nbconvert/pull/1881) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id82 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2022-10-06&amp;to=2022-10-19&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2022-10-06..2022-10-19&amp;type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2022-10-06..2022-10-19&amp;type=Issues)

### 7.2.1[#](#id83 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/v7.2.0...5cfa5893e3e8fe830eec2b8abf791199a52aad07))

#### Bugs fixed[#](#id84 "Permalink to this heading")

* Fix version handling [#1878](https://github.com/jupyter/nbconvert/pull/1878) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id85 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2022-10-06&amp;to=2022-10-06&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2022-10-06..2022-10-06&amp;type=Issues)

### 7.2.0[#](#id86 "Permalink to this heading")

([Full Changelog](https://github.com/jupyter/nbconvert/compare/7.1.0...e4e85b60c4c130f33db02c4ce209cc4704c7001a))

#### Maintenance and upkeep improvements[#](#id87 "Permalink to this heading")

* Prep for jupyter releaser [#1877](https://github.com/jupyter/nbconvert/pull/1877) ([@blink1073](https://github.com/blink1073))

* Add support for jupyter\_client 8 [#1867](https://github.com/jupyter/nbconvert/pull/1867) ([@blink1073](https://github.com/blink1073))

#### Contributors to this release[#](#id88 "Permalink to this heading")

([GitHub contributors page for this release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2022-10-03&amp;to=2022-10-06&amp;type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ablink1073+updated%3A2022-10-03..2022-10-06&amp;type=Issues)

### 7.1.0[#](#id89 "Permalink to this heading")

* Fix markdown table not render bug by @Neutree in

[#1853](https://github.com/jupyter/nbconvert/pull/1853)

* Replace lxml.html.clean\_html with bleach; drop lxml dependency by

@akx in [#1854](https://github.com/jupyter/nbconvert/pull/1854)

* Remove CircleCI badge from README by @akx in

[#1857](https://github.com/jupyter/nbconvert/pull/1857)

* Added support for section (slide) “data-\*” attributes by

@bouzidanas in [#1861](https://github.com/jupyter/nbconvert/pull/1861)

### 7.0.0[#](#id90 "Permalink to this heading")

* Update to Mistune 2.0.2 by @TiagodePAlves in

[#1764](https://github.com/jupyter/nbconvert/pull/1764)

* Add qtpdf and qtpng exporters by @davidbrochart in

[#1611](https://github.com/jupyter/nbconvert/pull/1611)

* Add recursive flag for glob notebook search by @paoloalba in

[#1785](https://github.com/jupyter/nbconvert/pull/1785)

* Encode SVG image data as UTF-8 before calling lxml cleaner by

@emarsden in [#1837](https://github.com/jupyter/nbconvert/pull/1837)

* Fix lab template output alignment by @dakoop in

[#1795](https://github.com/jupyter/nbconvert/pull/1795)

* Handle nbformat 5.5 by @blink1073 [#1841](https://github.com/jupyter/nbconvert/pull/1841)

* Remove downloaded CSS from repository by @martinRenou

[#1827](https://github.com/jupyter/nbconvert/pull/1827)

* Switch from entrypoints to importlib-metadata by @konstin in

[#1782](https://github.com/jupyter/nbconvert/pull/1782)

* Updates for sphinx 5.0 support by @blink1073 in

[#1788](https://github.com/jupyter/nbconvert/pull/1788)

* Fixed unique div ids in lab template, fixed #1759 by @veghdev in

[#1761](https://github.com/jupyter/nbconvert/pull/1761)

* WebPDFExporter: Emulate media print by @martinRenou in

[#1791](https://github.com/jupyter/nbconvert/pull/1791)

* Fix fonts overridden by user stylesheet by inheriting styles by

@dakoop in [#1793](https://github.com/jupyter/nbconvert/pull/1793)

* Fix lab template output alignment by @dakoop in

[#1795](https://github.com/jupyter/nbconvert/pull/1795)

* Clean up markdown parsing by @blink1073 in [#1774](https://github.com/jupyter/nbconvert/pull/1774)

* Switch to hatch build backend by @blink1073 in

[#1777](https://github.com/jupyter/nbconvert/pull/1777)

### 6.5.0[#](#id91 "Permalink to this heading")

* Support bleach 5, add packaging and tinycss2 dependencies by

@bollwyvl in [#1755](https://github.com/jupyter/nbconvert/pull/1755)

* Drop dependency on testpath. by @anntzer in

[#1723](https://github.com/jupyter/nbconvert/pull/1723)

* Adopt pre-commit by @blink1073 in [#1744](https://github.com/jupyter/nbconvert/pull/1744), [#1746](https://github.com/jupyter/nbconvert/pull/1746),

[#1748](https://github.com/jupyter/nbconvert/pull/1748), [#1749](https://github.com/jupyter/nbconvert/pull/1749), [#1757](https://github.com/jupyter/nbconvert/pull/1757)

* Add pytest settings and handle warnings by @blink1073 in

[#1745](https://github.com/jupyter/nbconvert/pull/1745)

* Update cli example by @leahecole in [#1753](https://github.com/jupyter/nbconvert/pull/1753)

* Clean up workflows by @blink1073 in [#1750](https://github.com/jupyter/nbconvert/pull/1750)

### 6.4.4[#](#id92 "Permalink to this heading")

* HTMLExporter: Respect the embed\_images flag for HTML blocks

[#1721](https://github.com/jupyter/nbconvert/pull/1721)

### 6.4.3[#](#id93 "Permalink to this heading")

* Remove ipython genutils [#1727](https://github.com/jupyter/nbconvert/pull/1727)

* Add section to customizing showing how to use template inheritance

[#1719](https://github.com/jupyter/nbconvert/pull/1719)

### 6.4.2[#](#id94 "Permalink to this heading")

* Adding theme support for WebPDF exporter [#1718](https://github.com/jupyter/nbconvert/pull/1718)

* Add option to embed\_images in Markdown cells

[#1717](https://github.com/jupyter/nbconvert/pull/1717)

* HTMLExporter: Add theme alias and docs [#1716](https://github.com/jupyter/nbconvert/pull/1716)

* Add basic support for federated labextensions themes

[#1703](https://github.com/jupyter/nbconvert/pull/1703)

* Always hide the collapser element [#1712](https://github.com/jupyter/nbconvert/pull/1712)

* Raise pyppeteer requirement to >=1,<1.1 [#1711](https://github.com/jupyter/nbconvert/pull/1711)

### 6.4.1[#](#id95 "Permalink to this heading")

* Handle needs\_background cell metadata [#1704](https://github.com/jupyter/nbconvert/pull/1704)

* Fix styling regression [#1708](https://github.com/jupyter/nbconvert/pull/1708)

* Fix DOM structure of markdown cells in lab template

[#1709](https://github.com/jupyter/nbconvert/pull/1709)

* CodeMirror style bleed fix [#1710](https://github.com/jupyter/nbconvert/pull/1710)

### 6.4.0[#](#id96 "Permalink to this heading")

The full list of changes can be seen on the [6.4.0

milestone](https://github.com/jupyter/nbconvert/milestone/23?closed=1)

* Allow passing extra args to code highlighter

[#1683](https://github.com/jupyter/nbconvert/pull/1683)

* Prevent page breaks in outputs when printing

[#1679](https://github.com/jupyter/nbconvert/pull/1679)

* Add collapsers to template [#1689](https://github.com/jupyter/nbconvert/pull/1689)

* Optionally speed up validation [#1672](https://github.com/jupyter/nbconvert/pull/1672)

### 6.3.0[#](#id97 "Permalink to this heading")

The full list of changes can be seen on the [6.3.0

milestone](https://github.com/jupyter/nbconvert/milestone/22?closed=1)

* Update state filter [#1664](https://github.com/jupyter/nbconvert/pull/1664)

* Add slide numbering [#1654](https://github.com/jupyter/nbconvert/pull/1654)

* Fix HTML templates mentioned in help docs [#1653](https://github.com/jupyter/nbconvert/pull/1653)

### 6.2.0[#](#id98 "Permalink to this heading")

The full list of changes can be seen on the [6.2.0

milestone](https://github.com/jupyter/nbconvert/milestone/21?closed=1)

* Add the ability to fully customize `widget\_renderer\_url`

[#1614](https://github.com/jupyter/nbconvert/pull/1614)

* Enable users to customize MathJax URLs [#1609](https://github.com/jupyter/nbconvert/pull/1609)

* Add CLI configuration for disable-chromium-sandbox

[#1625](https://github.com/jupyter/nbconvert/pull/1625)

* Enables webpdf to be rendered with templates

[#1601](https://github.com/jupyter/nbconvert/pull/1601)

* Adds dejavu [#1599](https://github.com/jupyter/nbconvert/pull/1599)

### 6.1.0[#](#id99 "Permalink to this heading")

This release is mostly a long list of bug fixes and capability

additions. Thanks to the many contributors for helping Improve

nbconvert!

The following 31 authors contributed 81 commits.

* Adolph

* Alessandro Finamore

* Angus Hollands

* Atsuo Ishimoto

* Bo

* David Brochart

* Frédéric Collonval

* Jeremy Howard

* Jim Zwartveld

* José Ignacio Romero

* Joyce Er

* joyceerhl

* Kyle Cutler

* Leah E. Cole

* Leah Wasser

* Nihiue

* Matthew Seal

* Michael Adolph

* Mohammad Mostafa Farzan

* Okky Mabruri

* Pill-GZ

* ptcane

* Raniere Silva

* Ryan Moe

* Stefan Lang

* Sylvain Corlay

* Tobin Jones

* txoof

* Yuvi Panda

#### Significant Changes[#](#significant-changes "Permalink to this heading")

* Dropped Python 3.6 and added Python 3.9 [#1542](https://github.com/jupyter/nbconvert/pull/1542) and [#1556](https://github.com/jupyter/nbconvert/pull/1556)

* Convert execute preprocessor wrapper to resemble papermill

[#1448](https://github.com/jupyter/nbconvert/pull/1448)

#### Comprehensive notes[#](#comprehensive-notes "Permalink to this heading")

* Feature: support static widgets in Reveal.js slides

[#1553](https://github.com/jupyter/nbconvert/pull/1553)

* Feature: add speaker notes to Reveal.js template

[#1543](https://github.com/jupyter/nbconvert/pull/1543)

* Add correct output mimetype to WebPDF exporter

[#1534](https://github.com/jupyter/nbconvert/pull/1534)

* Set mimetype for webpdf correctly [#1514](https://github.com/jupyter/nbconvert/pull/1514)

* Fix docstring issue and a broken link [#1576](https://github.com/jupyter/nbconvert/pull/1576)

* Add CLI example for removing cell tag syntax

[#1504](https://github.com/jupyter/nbconvert/pull/1504)

* Include output of stdin stream in lab template

[#1454](https://github.com/jupyter/nbconvert/pull/1454)

* Don’t use a shell to call inkscape [#1512](https://github.com/jupyter/nbconvert/pull/1512)

* JupyterLab export as HTML with widgets fails to load widgets

[#1474](https://github.com/jupyter/nbconvert/pull/1474)

* Move note inside Reveal.js HTML slideshow [#1510](https://github.com/jupyter/nbconvert/pull/1510)

* fix issue 1507: broken command line option

–CSSHTMLHeaderPreprocessor.style= [#1548](https://github.com/jupyter/nbconvert/pull/1548)

* Fix order of template paths [#1496](https://github.com/jupyter/nbconvert/pull/1496)

* Changed documentation of external\_exporters [#1582](https://github.com/jupyter/nbconvert/pull/1582)

* Fix template precedence when using a custom template (#1558)

[#1577](https://github.com/jupyter/nbconvert/pull/1577)

* add pip to docs envt [#1571](https://github.com/jupyter/nbconvert/pull/1571)

* Fix CI By Adding PIP to conda envt for docs build

[#1570](https://github.com/jupyter/nbconvert/pull/1570)

* Explicitly install pip in docs environment.yml

[#1569](https://github.com/jupyter/nbconvert/pull/1569)

* small update to docs hide cell [#1567](https://github.com/jupyter/nbconvert/pull/1567)

* Allow child templates to override mathjax [#1551](https://github.com/jupyter/nbconvert/pull/1551)

* Allow get\_export\_names to skip configuration check

[#1471](https://github.com/jupyter/nbconvert/pull/1471)

* Update docs: Tex Live package on Ubuntu [#1555](https://github.com/jupyter/nbconvert/pull/1555)

* Test jupyter\_client [#1545](https://github.com/jupyter/nbconvert/pull/1545)

* Update jupyterlab css [#1539](https://github.com/jupyter/nbconvert/pull/1539)

* Webpdf: Use a temporary file instead of an URL

[#1489](https://github.com/jupyter/nbconvert/pull/1489)

* Applied patch for marking network changes [#1527](https://github.com/jupyter/nbconvert/pull/1527)

* Change webpdf display name [#1515](https://github.com/jupyter/nbconvert/pull/1515)

* Allow disabling pyppeteer sandbox [#1516](https://github.com/jupyter/nbconvert/pull/1516)

* Make pagination configurable in webpdf [#1513](https://github.com/jupyter/nbconvert/pull/1513)

* Fix Reveal.js version in documentation [#1509](https://github.com/jupyter/nbconvert/pull/1509)

* Fix dangling reference to get\_template\_paths()

[#1463](https://github.com/jupyter/nbconvert/pull/1463)

* Solved svg2pdf conversion error if Inkscape is installed into the

default path on a windows machine [#1469](https://github.com/jupyter/nbconvert/pull/1469)

* fix typo [#1499](https://github.com/jupyter/nbconvert/pull/1499)

* Update version dependency of traitlets [#1498](https://github.com/jupyter/nbconvert/pull/1498)

* Update execute.py [#1457](https://github.com/jupyter/nbconvert/pull/1457)

* Fix code output indentation when running nbconvert –no-input

[#1444](https://github.com/jupyter/nbconvert/pull/1444)

* fix issue (i’d call it a BUG) #1167 [#1450](https://github.com/jupyter/nbconvert/pull/1450)

* #1428 add docstring [#1433](https://github.com/jupyter/nbconvert/pull/1433)

* Update nbconvert\_library.ipynb [#1438](https://github.com/jupyter/nbconvert/pull/1438)

* Supports isolated iframe when converting to HTML

[#1593](https://github.com/jupyter/nbconvert/pull/1593)

### 6.0.7[#](#id100 "Permalink to this heading")

Primarily a release addressing template extensions issues reported since

6.0 launched.

#### Comprehensive notes[#](#id101 "Permalink to this heading")

* Comment typo fix [#1425](https://github.com/jupyter/nbconvert/pull/1425)

* Documented updated to default conversion changes from 6.0

[#1426](https://github.com/jupyter/nbconvert/pull/1426)

* Allow custom template files outside of the template system to set

their base template name [#1429](https://github.com/jupyter/nbconvert/pull/1429)

* Restored basic template from 5.x [#1431](https://github.com/jupyter/nbconvert/pull/1431)

* Added proper support for backwards compatibility templates

[#1431](https://github.com/jupyter/nbconvert/pull/1431)

### 6.0.6[#](#id102 "Permalink to this heading")

A range of bug fixes for webpdf exports

#### Comprehensive notes[#](#id103 "Permalink to this heading")

* Removed CSS preprocessor from default proprocessor list (fixes

classic rendering) [#1411](https://github.com/jupyter/nbconvert/pull/1411)

* Fixed error when pickling TemplateExporter [#1399](https://github.com/jupyter/nbconvert/pull/1399)

* Support for fractional height html / webpdf exports

[#1413](https://github.com/jupyter/nbconvert/pull/1413)

* Added short wait time for fonts and rendering in webpdf

[#1414](https://github.com/jupyter/nbconvert/pull/1414)

* Updated template documentation

* Minor fixes to the webpdf exporter [#1419](https://github.com/jupyter/nbconvert/pull/1419)

* Fixup use with a running event loop within webpdf

[#1420](https://github.com/jupyter/nbconvert/pull/1420)

* Prevent overflow in input areas in lab template

[#1422](https://github.com/jupyter/nbconvert/pull/1422)

### 6.0.5[#](#id104 "Permalink to this heading")

* Revert networkidle2 change which caused custom cdn-fetched widgets

in webpdf

### 6.0.4[#](#id105 "Permalink to this heading")

#### Comprehensive notes[#](#id106 "Permalink to this heading")

##### Fixing Problems[#](#fixing-problems "Permalink to this heading")

* The webpdf exporters does not add pagebreaks anymore before reaching

the maximum height allowed by Adobe [#1402](https://github.com/jupyter/nbconvert/pull/1402)

* Fixes some timeout issues with the webpdf exporter

[#1400](https://github.com/jupyter/nbconvert/pull/1400)

### 6.0.3[#](#id107 "Permalink to this heading")

Execute preprocessor no longer add illegal execution counts to markdown

cells [#1396](https://github.com/jupyter/nbconvert/pull/1396)

### 6.0.2[#](#id108 "Permalink to this heading")

A patch for a few minor issues raised out of the 6.0 release.

#### Comprehensive notes[#](#id109 "Permalink to this heading")

##### Fixing Problems[#](#id110 "Permalink to this heading")

* Added windows work-around fix in CLI for async applications

[#1383](https://github.com/jupyter/nbconvert/pull/1383)

* Fixed pathed template files to behave correctly for local relative

paths without a dot [#1381](https://github.com/jupyter/nbconvert/pull/1381)

* ExecuteProcessor now properly has a `preprocess\_cell` function to

overwrite [#1380](https://github.com/jupyter/nbconvert/pull/1380)

##### Testing, Docs, and Builds[#](#testing-docs-and-builds "Permalink to this heading")

* Updated README and docs with guidance on how to get help with

nbconvert [#1377](https://github.com/jupyter/nbconvert/pull/1377)

* Fixed documentation that was referencing `template\_path` instead of

`template\_paths` [#1374](https://github.com/jupyter/nbconvert/pull/1374)

### 6.0.1[#](#id111 "Permalink to this heading")

A quick patch to fix an issue with get\_exporter [#1367](https://github.com/jupyter/nbconvert/pull/1367)

### 6.0[#](#id112 "Permalink to this heading")

The following authors and reviewers contributed the changes for this

release – Thanks you all!

* Ayaz Salikhov

* bnables

* Bo

* David Brochart

* David Cortés

* Eric Wieser

* Florian Rathgeber

* Ian Allison

* James Wilshaw

* Jeremy Tuloup

* Joel Ostblom

* Jon Bannister

* Jonas Drotleff

* Josh Devlin

* Karthikeyan Singaravelan

* Kerwin.Sun

* letmerecall

* Luciano Resende

* Lumír ‘Frenzy’ Balhar

* Maarten A. Breddels

* Maarten Breddels

* Marcel Stimberg

* Matthew Brett

* Matthew Seal

* Matthias Bussonnier

* Matthias Geier

* Miro Hrončok

* Phil Austin

* Praveen Batra

* Ruben Di Battista

* Ruby Werman

* Sang-Yun Oh

* Sergey Kizunov

* Sundar

* Sylvain Corlay

* telamonian

* Thomas Kluyver

* Thomas Ytterdal

* Tyler Makaro

* Yu-Cheng (Henry) Huang

#### Significant Changes[#](#id113 "Permalink to this heading")

Nbconvert 6.0 is a major release of nbconvert which includes many

significant changes.

* Python 2 support was dropped. Currently Python 3.6-3.8 is supported

and tested by nbconvert. However, nbconvert 6.0 provides limited

support for Python 3.6. nbconvert 6.1 will drop support for Python

3.6. Limited support means we will test and run CI on Python 3.6.12

or higher. Issues that are found only affecting Python 3.6 are not

guaranteed to be fixed. We recommend all users of nbconvert use

Python 3.7 and higher.

* Unlike previous versions, nbconvert 6.0 relies on the

[nbclient](https://github.com/jupyter/nbclient/) package for the

execute preprocessor, which allows for asynchronous kernel requests.

* `template\_path` has become `template\_paths`. If referring to a 5.x

style `.tpl` template use the full path with the `template\_file`

argument to the file. On the command line the pattern is

`--template-file=<path/to/file.tpl>`.

* Nbconvert 6.0 includes a new “webpdf” exporter, which renders

notebooks in pdf format through a headless web browser, so that

complex outputs such as HTML tables, or even widgets are rendered in

the same way as with the HTML exporter and a web browser.

* The default template applied when exporting to HTML now produces the

same DOM structure as JupyterLab, and is styled using JupyterLab’s

CSS. The pygments theme in use mimics JupyterLab’s codemirror mode

with the same CSS variables, so that custom JupyterLab themes could

be applied. The classic notebook styling can still be enabled with

```

jupyter nbconvert --to html --template classic

```

* Nbconvert 6.0 includes a new system for creating custom templates,

which can now be installed as packages. A custom “foobar” template

is installed in Jupyter’s data directory under

`nbconvert/templates` and has the form of a directory containing all

resources. Templates specify their base template as well as other

configuration parameters in a `conf.json` at the root of the

template directory.

* The “slideshow” template now makes use of RevealJS version 4. It

can now be used with the HTML exporter with

```

jupyter nbconvert --to html --template reveal

```

The `--to slides` exporter is still supported for convenience.

* Inkscape 1.0 is now supported, which had some breaking changes that

prevented 5.x versions of nbconvert from converting documents on

some systems that updated.

#### Remaining changes[#](#remaining-changes "Permalink to this heading")

We merged 105 pull requests! Rather than enumerate all of them we’ll

link to the github page which contains the many smaller impact

improvements.

The full list can be seen [on

GitHub](https://github.com/jupyter/nbconvert/issues?q=milestone%3A6.0+)

### 5.6.1[#](#id114 "Permalink to this heading")

The following authors and reviewers contributed the changes for this

release – Thanks you all!

* Charles Frye

* Chris Holdgraf

* Felipe Rodrigues

* Gregor Sturm

* Jim

* Kerwin Sun

* Ryan Beesley

* Matthew Seal

* Matthias Geier

* thuy-van

* Tyler Makaro

#### Significant Changes[#](#id115 "Permalink to this heading")

##### RegExRemove applies to all cells[#](#regexremove-applies-to-all-cells "Permalink to this heading")

RegExRemove preprocessor now removes cells regardless of cell outputs.

Before this only cells that had outputs were filtered.

#### Comprehensive notes[#](#id116 "Permalink to this heading")

##### New Features[#](#new-features "Permalink to this heading")

* Add support for alt tags for jpeg and png images

[#1112](https://github.com/jupyter/nbconvert/pull/1112)

* Allow HTML header anchor text to be HTML [#1101](https://github.com/jupyter/nbconvert/pull/1101)

* Change RegExRemove to remove code cells with output

[#1095](https://github.com/jupyter/nbconvert/pull/1095)

* Added cell tag data attributes to HTML exporter

[#1090](https://github.com/jupyter/nbconvert/pull/1090) and

[#1089](https://github.com/jupyter/nbconvert/pull/1089)

##### Fixing Problems[#](#id117 "Permalink to this heading")

* Update svg2pdf.py to search the PATH for inkscape

[#1115](https://github.com/jupyter/nbconvert/pull/1115)

* Fix latex dependencies installation command for Ubuntu systems

[#1109](https://github.com/jupyter/nbconvert/pull/1109)

##### Testing, Docs, and Builds[#](#id118 "Permalink to this heading")

* Added Circle CI builds for documentation [#1114](https://github.com/jupyter/nbconvert/pull/1114) [#1120](https://github.com/jupyter/nbconvert/pull/1120), and

[#1116](https://github.com/jupyter/nbconvert/pull/1116)

* Fix typo in argument name in docstring (TagRemovePreprocessor)

[#1103](https://github.com/jupyter/nbconvert/pull/1103)

* Changelog typo fix [#1100](https://github.com/jupyter/nbconvert/pull/1100)

* Updated API page for TagRemovePreprocessor and TemplateExporter

[#1088](https://github.com/jupyter/nbconvert/pull/1088)

* Added remove\_input\_tag traitlet to the docstring

[#1088](https://github.com/jupyter/nbconvert/pull/1088)

### 5.6[#](#id119 "Permalink to this heading")

The following 24 authors and reviewers contributed 224 commits – Thank

you all!

* 00Kai0

* Aidan Feldman

* Alex Rudy

* Alexander Kapshuna

* Alexander Rudy

* amniskin

* Carol Willing

* Dustin H

* Hsiaoming Yang

* imtsuki

* Jessica B. Hamrick

* KrokodileDandy

* Kunal Marwaha

* Matthew Seal

* Matthias Geier

* Miro Hrončok

* M Pacer

* Nils Japke

* njapke

* Sebastian Führ

* Sylvain Corlay

* Tyler Makaro

* Valery M

* Wayne Witzel

The full list of changes they made can be seen [on

GitHub](https://github.com/jupyter/nbconvert/issues?q=milestone%3A5.6+)

#### Significant Changes[#](#id120 "Permalink to this heading")

##### Jupter Client Pin[#](#jupter-client-pin "Permalink to this heading")

The `jupyter\_client` dependency is now pinned to `>5.3.1`. This is done

to support the Parallel NBConvert below, and

future versions may require interface changes from that version.

##### Parallel NBConvert[#](#parallel-nbconvert "Permalink to this heading")

NBConvert `--execute` can now be run in parallel via threads,

multiprocessing, or async patterns! This means you can now parallelize

nbconvert via a bash loop, or a python concurrency pattern and it should

be able to execute those notebooks in parallel.

Kernels have varying support for safe concurrent execution. The ipython

kernel (ipykernel version 1.5.2 and higher) should be safe to run

concurrently using Python 3. However, the Python 2 ipykernel does not

always provide safe concurrent execution and sometimes fails with a

socket bind exception. Unlike ipykernel which is maintained by the

project, other community-maintained kernels may have varying support for

concurrent execution, and these kernels were not tested heavily.

Issues for nbconvert can be viewed here: [#1018](https://github.com/jupyter/nbconvert/pull/1018), and [#1017](https://github.com/jupyter/nbconvert/pull/1017)

##### Execute Loop Rewrite[#](#execute-loop-rewrite "Permalink to this heading")

This release completely rewrote the execution loop responsible for

monitoring kernel messages until cell execution is completed. This

removes an error where kernel messages could be dropped if too many were

posted too quickly. Furthermore, the change means that messages are not

buffered. Now, messages can be logged immediately rather than waiting

for the cell to terminate.

See [#994](https://github.com/jupyter/nbconvert/pull/994) for exact code changes if

you’re curious.

#### Comprehensive notes[#](#id121 "Permalink to this heading")

##### New Features[#](#id122 "Permalink to this heading")

* Make a default global location for custom user templates

[#1028](https://github.com/jupyter/nbconvert/pull/1028)

* Parallel execution improvements [#1018](https://github.com/jupyter/nbconvert/pull/1018), and [#1017](https://github.com/jupyter/nbconvert/pull/1017)

* Added `store\_history` option to `preprocess\_cell` and `run\_cell`

[#1055](https://github.com/jupyter/nbconvert/pull/1055)

* Simplify the function signature for preprocess()

[#1042](https://github.com/jupyter/nbconvert/pull/1042)

* Set flag to not always stop kernel execution on errors

[#1040](https://github.com/jupyter/nbconvert/pull/1040)

* `setup\_preprocessor` passes kwargs to `start\_new\_kernel`

[#1021](https://github.com/jupyter/nbconvert/pull/1021)

##### Fixing Problems[#](#id123 "Permalink to this heading")

* Very fast stream outputs no longer drop some messages

[#994](https://github.com/jupyter/nbconvert/pull/994)

* LaTeX errors now properly raise exceptions [#1053](https://github.com/jupyter/nbconvert/pull/1053)

* Improve template whitespacing [#1076](https://github.com/jupyter/nbconvert/pull/1076)

* Fixes for character in LaTeX exports and filters

[#1068](https://github.com/jupyter/nbconvert/pull/1068), [#1039](https://github.com/jupyter/nbconvert/pull/1039), [#1024](https://github.com/jupyter/nbconvert/pull/1024), and

[#1077](https://github.com/jupyter/nbconvert/pull/1077)

* Mistune pinned in preparation for 2.0 release

[#1074](https://github.com/jupyter/nbconvert/pull/1074)

* Require mock only on Python 2 [#1060](https://github.com/jupyter/nbconvert/pull/1060) and [#1011](https://github.com/jupyter/nbconvert/pull/1011)

* Fix selection of mimetype when converting to HTML

[#1036](https://github.com/jupyter/nbconvert/pull/1036)

* Correct a few typos [#1029](https://github.com/jupyter/nbconvert/pull/1029)

* Update `export\_from\_notebook` names [#1027](https://github.com/jupyter/nbconvert/pull/1027)

* Dedenting html in ExtractOutputPreprocessor [#1023](https://github.com/jupyter/nbconvert/pull/1023)

* Fix backwards incompatibility with markdown2html

[#1022](https://github.com/jupyter/nbconvert/pull/1022)

* Fixed html image tagging [#1013](https://github.com/jupyter/nbconvert/pull/1013)

* Remove unnecessary css [#1010](https://github.com/jupyter/nbconvert/pull/1010)

##### Testing, Docs, and Builds[#](#id124 "Permalink to this heading")

* Pip-install nbconvert on readthedocs.org [#1069](https://github.com/jupyter/nbconvert/pull/1069)

* Fix various doc build issues [#1051](https://github.com/jupyter/nbconvert/pull/1051), [#1050](https://github.com/jupyter/nbconvert/pull/1050),

[#1019](https://github.com/jupyter/nbconvert/pull/1019), and

[#1048](https://github.com/jupyter/nbconvert/pull/1048)

* Add issue templates [#1046](https://github.com/jupyter/nbconvert/pull/1046)

* Added instructions for bumping the version forward when releasing

[#1034](https://github.com/jupyter/nbconvert/pull/1034)

* Fix Testing on Windows [#1030](https://github.com/jupyter/nbconvert/pull/1030)

* Refactored `test\_run\_notebooks` [#1015](https://github.com/jupyter/nbconvert/pull/1015)

* Fixed documentation typos [#1009](https://github.com/jupyter/nbconvert/pull/1009)

### 5.5[#](#id125 "Permalink to this heading")

The following 18 authors contributed 144 commits – Thank you all!

* Benjamin Ragan-Kelley

* Clayton A Davis

* DInne Bosman

* Doug Blank

* Henrique Silva

* Jeff Hale

* Lukasz Mitusinski

* M Pacer

* Maarten Breddels

* Madhumitha N

* Matthew Seal

* Paul Gowder

* Philipp A

* Rick Lupton

* Rüdiger Busche

* Thomas Kluyver

* Tyler Makaro

* WrRan

The full list of changes they made can be seen [on

GitHub](https://github.com/jupyter/nbconvert/issues?q=milestone%3A5.5+)

#### Significant Changes[#](#id126 "Permalink to this heading")

##### Deprecations[#](#deprecations "Permalink to this heading")

Python 3.4 support was dropped. Many of our upstream libraries stopped

supporting 3.4 and it was found that serious bugs were being caught

during testing against those libraries updating past 3.4.

See [#979](https://github.com/jupyter/nbconvert/pull/979) for details.

##### IPyWidget Support[#](#ipywidget-support "Permalink to this heading")

Now when a notebook executing contains [Jupyter

Widgets](https://github.com/jupyter-widgets/ipywidgets/), the state of

all the widgets can be stored in the notebook’s metadata. This allows

rendering of the live widgets on, for instance nbviewer, or when

converting to html.

You can tell nbconvert to not store the state using the

`store\_widget\_state` argument:

```

jupyter nbconvert --ExecutePreprocessor.store\_widget\_state=False --to notebook --execute mynotebook.ipynb

```

This widget rendering is not performed against a browser during

execution, so only widget default states or states manipulated via user

code will be calculated during execution. `%%javascript` cells will

execute upon notebook rendering, enabling complex interactions to

function as expected when viewed by a UI.

If you can’t view widget results after execution, you may need to

select `File --> Trust Notebook` in the menu.

See [#779](https://github.com/jupyter/nbconvert/pull/779), [#900](https://github.com/jupyter/nbconvert/pull/900), and [#983](https://github.com/jupyter/nbconvert/pull/983) for details.

##### Execute Preprocessor Rework[#](#execute-preprocessor-rework "Permalink to this heading")

Based on monkey patching required in

[papermill](https://github.com/nteract/papermill/blob/0.19.1/papermill/preprocess.py)

the `run\_cell` code path in the ExecutePreprocessor was reworked to

allow for accessing individual message parses without reimplementing the

entire function. Now there is a `process\_message` function which take a

ZeroMQ message and applies all of its side-effect updates on the

cell/notebook objects before returning the output it generated, if it

generated any such output.

The change required a much more extensive test suite covering cell

execution as test coverage on the various, sometimes wonky, code paths

made improvements and reworks impossible to prove undamaging. Now

changes to kernel message processing has much better coverage, so future

additions or changes with specs over time will be easier to add.

See [#905](https://github.com/jupyter/nbconvert/pull/905) and [#982](https://github.com/jupyter/nbconvert/pull/982) for details

##### Out Of Memory Kernel Failure Catches[#](#out-of-memory-kernel-failure-catches "Permalink to this heading")

When running out of memory on a machine, if the kernel process was

killed by the operating system it would result in a timeout error at

best and hang indefinitely at worst. Now regardless of timeout

configuration, if the underlying kernel process dies before emitting any

messages to the effect an exception will be raised notifying the

consumer of the lost kernel within a few seconds.

See [#959](https://github.com/jupyter/nbconvert/pull/959), [#971](https://github.com/jupyter/nbconvert/pull/971), and [#998](https://github.com/jupyter/nbconvert/pull/998) for details

##### Latex / PDF Template Improvements[#](#latex-pdf-template-improvements "Permalink to this heading")

The latex template was long overdue for improvements. The default

template had a rewrite which makes exports for latex and pdf look a lot

better. Code cells in particular render much better with line breaks and

styling the more closely matches notebook browser rendering. Thanks

t-makaro for the efforts here!

See [#992](https://github.com/jupyter/nbconvert/pull/992) for details

#### Comprehensive notes[#](#id127 "Permalink to this heading")

##### New Features[#](#id128 "Permalink to this heading")

* IPyWidget Support [#779](https://github.com/jupyter/nbconvert/pull/779),

[#900](https://github.com/jupyter/nbconvert/pull/900), and [#983](https://github.com/jupyter/nbconvert/pull/983)

* A new ClearMetadata Preprocessor is available

[#805](https://github.com/jupyter/nbconvert/pull/805)

* Support for pandoc 2 [#964](https://github.com/jupyter/nbconvert/pull/964)

* New, and better, latex template [#992](https://github.com/jupyter/nbconvert/pull/992)

##### Fixing Problems[#](#id129 "Permalink to this heading")

* Refactored execute preprocessor to have a process\_message function

[#905](https://github.com/jupyter/nbconvert/pull/905):

* Fixed OOM kernel failures hanging [#959](https://github.com/jupyter/nbconvert/pull/959) and [#971](https://github.com/jupyter/nbconvert/pull/971)

* Fixed latex export for svg data in python 3 [#985](https://github.com/jupyter/nbconvert/pull/985)

* Enabled configuration to be shared to exporters from script exporter

[#993](https://github.com/jupyter/nbconvert/pull/993)

* Make latex errors less verbose [#988](https://github.com/jupyter/nbconvert/pull/988)

* Typo in template syntax [#984](https://github.com/jupyter/nbconvert/pull/984)

* Improved attachments +fix supporting non-unique names

[#980](https://github.com/jupyter/nbconvert/pull/980)

* PDFExporter “output\_mimetype” traitlet is not longer

‘text/latex’ [#972](https://github.com/jupyter/nbconvert/pull/972)

* FIX: respect wait for clear\_output [#969](https://github.com/jupyter/nbconvert/pull/969)

* address deprecation warning in cgi.escape [#963](https://github.com/jupyter/nbconvert/pull/963)

* Correct inaccurate description of available LaTeX template

[#958](https://github.com/jupyter/nbconvert/pull/958)

* Fixed kernel death detection for executions with timeouts

[#998](https://github.com/jupyter/nbconvert/pull/998):

* Fixed export names for various templates [#1000](https://github.com/jupyter/nbconvert/pull/1000), [#1001](https://github.com/jupyter/nbconvert/pull/1001), and

[#1001](https://github.com/jupyter/nbconvert/pull/1001):

##### Deprecations[#](#id130 "Permalink to this heading")

* Dropped support for python 3.4 [#979](https://github.com/jupyter/nbconvert/pull/979)

* Removed deprecated `export\_by\_name` [#945](https://github.com/jupyter/nbconvert/pull/945)

##### Testing, Docs, and Builds[#](#id131 "Permalink to this heading")

* Added tests for each branch in execute’s run\_cell method

[#982](https://github.com/jupyter/nbconvert/pull/982)

* Mention formats in –to options more clearly

[#991](https://github.com/jupyter/nbconvert/pull/991)

* Adds ascii output type to command line docs page, mention image

folder output [#956](https://github.com/jupyter/nbconvert/pull/956)

* Simplify setup.py [#949](https://github.com/jupyter/nbconvert/pull/949)

* Use utf-8 encoding in execute\_api example [#921](https://github.com/jupyter/nbconvert/pull/921)

* Upgrade pytest on Travis [#941](https://github.com/jupyter/nbconvert/pull/941)

* Fix LaTeX base template name in docs [#940](https://github.com/jupyter/nbconvert/pull/940)

* Updated release instructions based on 5.4 release walk-through

[#887](https://github.com/jupyter/nbconvert/pull/887)

* Fixed broken link to jinja docs [#997](https://github.com/jupyter/nbconvert/pull/997)

### 5.4.1[#](#id132 "Permalink to this heading")

[5.4.1 on Github](https://github.com/jupyter/nbconvert/milestones/5.4.1)

Thanks to the following 11 authors who contributed 57 commits.

* Benjamin Ragan-Kelley

* Carol Willing

* Clayton A Davis

* Daniel Rodriguez

* M Pacer

* Matthew Seal

* Matthias Geier

* Matthieu Parizy

* Rüdiger Busche

* Thomas Kluyver

* Tyler Makaro

#### Comprehensive notes[#](#id133 "Permalink to this heading")

##### New Features[#](#id134 "Permalink to this heading")

* Expose pygments styles [#889](https://github.com/jupyter/nbconvert/pull/889)

* Tornado 6.0 support – Convert proxy handler from callback to

coroutine [#937](https://github.com/jupyter/nbconvert/pull/937)

* Add option to overwrite the highlight\_code filter

[#877](https://github.com/jupyter/nbconvert/pull/877)

##### Fixing Problems[#](#id135 "Permalink to this heading")

* Mathjax.tpl fix for rendering Latex in html [#932](https://github.com/jupyter/nbconvert/pull/932)

* Backwards compatibility for empty kernel names

[#927](https://github.com/jupyter/nbconvert/pull/927) [#924](https://github.com/jupyter/nbconvert/pull/924)

##### Testing, Docs, and Builds[#](#id136 "Permalink to this heading")

* DOC: Add missing language specification to code-block

[#882](https://github.com/jupyter/nbconvert/pull/882)

### 5.4[#](#id137 "Permalink to this heading")

[5.4 on Github](https://github.com/jupyter/nbconvert/milestones/5.4)

#### Significant Changes[#](#id138 "Permalink to this heading")

##### Deprecations[#](#id139 "Permalink to this heading")

Python 3.3 support was dropped. The version of python is no longer

common and new versions have many fixes and interface improvements that

warrant the change in support.

See [#843](https://github.com/jupyter/nbconvert/pull/843) for implementation details.

##### Changes in how we handle metadata[#](#changes-in-how-we-handle-metadata "Permalink to this heading")

There were a few new metadata fields which are now respected in

nbconvert.

`nb.metadata.authors` metadata attribute will be respected in latex

exports. Multiple authors will be added with `,` separation against

their names.

`nb.metadata.title` will be respected ahead of `nb.metadata.name` for

title assignment. This better matches with the notebook format.

`nb.metadata.filename` will override the default

`output\_filename\_template` when extracting notebook resources in the

`ExtractOutputPreprocessor`. The attribute is helpful for when you want

to consistently fix to a particular output filename, especially when you

need to set image filenames for your exports.

The `raises-exception` cell tag

(`nb.cells[].metadata.tags[raises-exception]`) allows for cell

exceptions to not halt execution. The tag is respected in the same way

by [nbval](https://github.com/computationalmodelling/nbval) and other

notebook interfaces. `nb.metadata.allow\_errors` will apply this rule for

all cells. This feature is toggleable with the `force\_raise\_errors`

configuration option. Errors from executing the notebook can be allowed

with a `raises-exception` tag on a single cell, or the `allow\_errors`

configurable option for all cells. An allowed error will be recorded in

notebook output, and execution will continue. If an error occurs when it

is not explicitly allowed, a ‘CellExecutionError’ will be raised. If

`force\_raise\_errors` is True, `CellExecutionError` will be raised for

any error that occurs while executing the notebook. This overrides both

the `allow\_errors` option and the `raises-exception` cell tags.

See [#867](https://github.com/jupyter/nbconvert/pull/867), [#703](https://github.com/jupyter/nbconvert/pull/703), [#685](https://github.com/jupyter/nbconvert/pull/685),

[#672](https://github.com/jupyter/nbconvert/pull/672), and [#684](https://github.com/jupyter/nbconvert/pull/684) for implementation changes.

##### Configurable kernel managers when executing notebooks[#](#configurable-kernel-managers-when-executing-notebooks "Permalink to this heading")

The kernel manager can now be optionally passed into the

`ExecutePreprocessor.preprocess` and the `executenb` functions as the

keyword argument `km`. This means that the kernel can be configured as

desired before beginning preprocessing.

This is useful for executing in a context where the kernel has external

dependencies that need to be set to non-default values. An example of

this might be a Spark kernel where you wish to configure the Spark

cluster location ahead of time without building a new kernel.

Overall the ExecutePreprocessor has been reworked to make it easier to

use. Future releases will continue this trend to make this section of

the code more inheritable and reusable by others. We encourage you read

the source code for this version if you’re interested in the detailed

improvements.

See [#852](https://github.com/jupyter/nbconvert/pull/852) for implementation changes.

##### Surfacing exporters in front-ends[#](#surfacing-exporters-in-front-ends "Permalink to this heading")

Exporters are now exposed for front-ends to consume, including classic

notebook. As an example, this means that latex exporter will be made

available for latex ‘text/latex’ media type from the Download As

interface.

See [#759](https://github.com/jupyter/nbconvert/pull/759) and [#864](https://github.com/jupyter/nbconvert/pull/864) for implementation changes.

##### Raw Templates[#](#raw-templates "Permalink to this heading")

Template exporters can now be assigned raw templates as string

attributes by setting the `raw\_template` variable.

```

class AttrExporter(TemplateExporter):

    # If the class has a special template and you want it defined within the class

    raw\_template = """{%- extends 'rst.tpl' -%}

{%- block in\_prompt -%}

raw template

{%- endblock in\_prompt -%}

 """

exporter\_attr = AttrExporter()

output\_attr, \_ = exporter\_attr.from\_notebook\_node(nb)

assert "raw template" in output\_attr

```

See [#675](https://github.com/jupyter/nbconvert/pull/675) for implementation changes.

##### New command line flags[#](#new-command-line-flags "Permalink to this heading")

The `--no-input` will hide input cells on export. This is great for

notebooks which generate “reports” where you want the code that was

executed to not appear by default in the extracts.

An alias for `notebook` was added to exporter commands. Now `--to ipynb`

will behave as `--to notebook` does.

See [#825](https://github.com/jupyter/nbconvert/pull/825) and [#873](https://github.com/jupyter/nbconvert/pull/873) for implementation changes.

#### Comprehensive notes[#](#id140 "Permalink to this heading")

##### New Features[#](#id141 "Permalink to this heading")

* No input flag (`--no-input`) [#825](https://github.com/jupyter/nbconvert/pull/825)

* Add alias `--to ipynb` for notebook exporter [#873](https://github.com/jupyter/nbconvert/pull/873)

* Add `export\_from\_notebook` [#864](https://github.com/jupyter/nbconvert/pull/864)

* If set, use `nb.metadata.authors` for LaTeX author line

[#867](https://github.com/jupyter/nbconvert/pull/867)

* Populate language\_info metadata when executing

[#860](https://github.com/jupyter/nbconvert/pull/860)

* Support for `\mathscr` [#830](https://github.com/jupyter/nbconvert/pull/830)

* Allow the execute preprocessor to make use of an existing kernel

[#852](https://github.com/jupyter/nbconvert/pull/852)

* Refactor ExecutePreprocessor [#816](https://github.com/jupyter/nbconvert/pull/816)

* Update widgets CDN for ipywidgets 7 w/fallback

[#792](https://github.com/jupyter/nbconvert/pull/792)

* Add support for adding custom exporters to the “Download as” menu.

[#759](https://github.com/jupyter/nbconvert/pull/759)

* Enable ANSI underline and inverse [#696](https://github.com/jupyter/nbconvert/pull/696)

* Update notebook css to 5.4.0 [#748](https://github.com/jupyter/nbconvert/pull/748)

* Change default for slides to direct to the reveal cdn rather than

locally [#732](https://github.com/jupyter/nbconvert/pull/732)

* Use “title” instead of “name” for metadata to match the notebook

format [#703](https://github.com/jupyter/nbconvert/pull/703)

* Img filename metadata [#685](https://github.com/jupyter/nbconvert/pull/685)

* Added MathJax compatibility definitions [#687](https://github.com/jupyter/nbconvert/pull/687)

* Per cell exception [#684](https://github.com/jupyter/nbconvert/pull/684)

* Simple API for in-memory templates [#674](https://github.com/jupyter/nbconvert/pull/674) [#675](https://github.com/jupyter/nbconvert/pull/675)

* Set BIBINPUTS and BSTINPUTS environment variables when making PDF

[#676](https://github.com/jupyter/nbconvert/pull/676)

* If `nb.metadata.title` is set, default to that for notebook

[#672](https://github.com/jupyter/nbconvert/pull/672)

##### Deprecations[#](#id142 "Permalink to this heading")

* Drop support for python 3.3 [#843](https://github.com/jupyter/nbconvert/pull/843)

* Default conversion method on the CLI was removed (`--to html` now

required)

##### Fixing Problems[#](#id143 "Permalink to this heading")

* Fix api break [#872](https://github.com/jupyter/nbconvert/pull/872)

* Don’t remove empty cells by default [#784](https://github.com/jupyter/nbconvert/pull/784)

* Handle attached images in html converter [#780](https://github.com/jupyter/nbconvert/pull/780)

* No need to check for the channels already running

[#862](https://github.com/jupyter/nbconvert/pull/862)

* Update `font-awesome` version for slides [#793](https://github.com/jupyter/nbconvert/pull/793)

* Properly treat JSON data [#847](https://github.com/jupyter/nbconvert/pull/847)

* Skip executing empty code cells [#739](https://github.com/jupyter/nbconvert/pull/739)

* Ppdate log.warn (deprecated) to log.warning [#804](https://github.com/jupyter/nbconvert/pull/804)

* Cleanup notebook.tex during PDF generation [#768](https://github.com/jupyter/nbconvert/pull/768)

* Windows unicode error fixed, nosetest added to setup.py

[#757](https://github.com/jupyter/nbconvert/pull/757)

* Better content hiding; template & testing improvements

[#734](https://github.com/jupyter/nbconvert/pull/734)

* Fix Jinja syntax in custom template example. [#738](https://github.com/jupyter/nbconvert/pull/738)

* Fix for an issue with empty math block [#729](https://github.com/jupyter/nbconvert/pull/729)

* Add parser for Multiline math for LaTeX blocks

[#716](https://github.com/jupyter/nbconvert/pull/716) [#717](https://github.com/jupyter/nbconvert/pull/717)

* Use defusedxml to parse potentially untrusted XML

[#708](https://github.com/jupyter/nbconvert/pull/708)

* Fixes for traitlets 4.1 deprecation warnings [#695](https://github.com/jupyter/nbconvert/pull/695)

##### Testing, Docs, and Builds[#](#id144 "Permalink to this heading")

* A couple of typos [#870](https://github.com/jupyter/nbconvert/pull/870)

* Add python\_requires metadata. [#871](https://github.com/jupyter/nbconvert/pull/871)

* Document `--inplace` command line flag. [#839](https://github.com/jupyter/nbconvert/pull/839)

* Fix minor typo in `usage.rst` [#863](https://github.com/jupyter/nbconvert/pull/863)

* Add note about local `reveal\_url\_prefix` [#844](https://github.com/jupyter/nbconvert/pull/844)

* Move `onlyif\_cmds\_exist` decorator to test-specific utils

[#854](https://github.com/jupyter/nbconvert/pull/854)

* Include LICENSE file in wheels [#827](https://github.com/jupyter/nbconvert/pull/827)

* Added Ubuntu Linux Instructions [#724](https://github.com/jupyter/nbconvert/pull/724)

* Check for too recent of pandoc version [#814](https://github.com/jupyter/nbconvert/pull/814) [#872](https://github.com/jupyter/nbconvert/pull/872)

* Removing more nose remnants via dependencies.

[#758](https://github.com/jupyter/nbconvert/pull/758)

* Remove offline statement and add some clarifications in slides docs

[#743](https://github.com/jupyter/nbconvert/pull/743)

* Linkify PR number [#710](https://github.com/jupyter/nbconvert/pull/710)

* Added shebang for python [#694](https://github.com/jupyter/nbconvert/pull/694)

* Upgrade mistune dependency [#705](https://github.com/jupyter/nbconvert/pull/705)

* add feature to improve docs by having links to prs

[#662](https://github.com/jupyter/nbconvert/pull/662)

* Update notebook CSS from version 4.3.0 to 5.1.0

[#682](https://github.com/jupyter/nbconvert/pull/682)

* Explicitly exclude or include all files in Manifest.

[#670](https://github.com/jupyter/nbconvert/pull/670)

### 5.3.1[#](#id145 "Permalink to this heading")

[5.3.1 on Github](https://github.com/jupyter/nbconvert/milestones/5.3.1)

* MANIFEST.in updated to include `LICENSE` and `scripts/` when

creating sdist. [#666](https://github.com/jupyter/nbconvert/pull/666)

### 5.3[#](#id146 "Permalink to this heading")

[5.3 on Github](https://github.com/jupyter/nbconvert/milestones/5.3)

#### Major features[#](#major-features "Permalink to this heading")

##### Tag Based Element Filtering[#](#tag-based-element-filtering "Permalink to this heading")

For removing individual elements from notebooks, we need a way to signal

to nbconvert that the elements should be removed. With this release, we

introduce the use of tags for that purpose.

Tags are user-defined strings attached to cells or outputs. They are

stored in cell or output metadata. For more on tags see the [nbformat

docs on cell

metadata](https://nbformat.readthedocs.io/en/latest/format_description.html#cell-metadata).

**Usage**:

1. Apply tags to the elements that you want to remove.

For removing an entire cell, the cell input, or all cell outputs apply

the tag to the cell.

For removing individual outputs, put the tag in the output metadata

using a call like

`display(your\_output\_element, metadata={tags=[<your\_tags\_here>]})`.

*NB*: Use different tags depending on whether you want to remove the

entire cell, the input, all outputs, or individual outputs.

2. Add the tags for removing the different kinds of elements to the

following traitlets. Which kind of element you want to remove

determines which traitlet you add the tags to.

The following traitlets remove elements of different kinds:

* `remove\_cell\_tags`: removes cells

* `remove\_input\_tags`: removes inputs

* `remove\_all\_outputs\_tag`: removes all outputs

* `remove\_single\_output\_tag`: removes individual outputs

#### Comprehensive notes[#](#id147 "Permalink to this heading")

* new: configurable `browser` in ServePostProcessor

[#618](https://github.com/jupyter/nbconvert/pull/618)

* new: `--clear-output` command line flag to clear output in-place

[#619](https://github.com/jupyter/nbconvert/pull/619)

* new: remove elements based on tags with `TagRemovePreprocessor`.

[#640](https://github.com/jupyter/nbconvert/pull/640), [#643](https://github.com/jupyter/nbconvert/pull/643)

* new: CellExecutionError can now be imported from

`nbconvert.preprocessors` [#656](https://github.com/jupyter/nbconvert/pull/656)

* new: slides now can enable scrolling and custom transitions

[#600](https://github.com/jupyter/nbconvert/pull/600)

* docs: Release instructions for nbviewer-deploy

* docs: improved instructions for handling errors using the

`ExecutePreprocessor` [#656](https://github.com/jupyter/nbconvert/pull/656)

* tests: better height/width metadata testing for images in rst & html

[#601](https://github.com/jupyter/nbconvert/pull/601) [#602](https://github.com/jupyter/nbconvert/pull/602)

* tests: normalise base64 output data to avoid false positives

[#650](https://github.com/jupyter/nbconvert/pull/650)

* tests: normalise ipython traceback messages to handle old and new

style [#631](https://github.com/jupyter/nbconvert/pull/631)

* bug: mathjax obeys `\\(\\)` & `\\[\\]` (both nbconvert & pandoc)

[#609](https://github.com/jupyter/nbconvert/pull/609) [#617](https://github.com/jupyter/nbconvert/pull/617)

* bug: specify default templates using extensions

[#639](https://github.com/jupyter/nbconvert/pull/639)

* bug: fix pandoc version number [#638](https://github.com/jupyter/nbconvert/pull/638)

* bug: require recent mistune version [#630](https://github.com/jupyter/nbconvert/pull/630)

* bug: catch errors from IPython `execute\_reply` and `error` messages

[#642](https://github.com/jupyter/nbconvert/pull/642)

* nose completely removed & dependency dropped [#595](https://github.com/jupyter/nbconvert/pull/595) [#660](https://github.com/jupyter/nbconvert/pull/660)

* mathjax processing in mistune now only uses inline grammar

[#611](https://github.com/jupyter/nbconvert/pull/611)

* removeRegex now enabled by default on all TemplateExporters, does

not remove cells with outputs [#616](https://github.com/jupyter/nbconvert/pull/616)

* validate notebook after applying each preprocessor (allowing

additional attributes) [#645](https://github.com/jupyter/nbconvert/pull/645)

* changed COPYING.md to LICENSE for more standard licensing that

GitHub knows how to read [#654](https://github.com/jupyter/nbconvert/pull/654)

### 5.2.1[#](#id148 "Permalink to this heading")

[5.2 on GitHub](https://github.com/jupyter/nbconvert/milestones/5.2)

#### Major features[#](#id149 "Permalink to this heading")

In this release (along with the usual bugfixes and documentation

improvements, which are legion) we have a few new major features that

have been requested for a long time:

##### Global Content Filtering[#](#global-content-filtering "Permalink to this heading")

You now have the ability to remove input or output from code cells,

markdown cells and the input and output prompts. The easiest way to

access all of these is by using traitlets like

TemplateExporter.exclude\_input = True (or, for example

HTMLExporter.exclude\_markdown = True if you wanted to make it specific

to HTML output). On the command line if you just want to not have input

or output prompts just use –no-prompt.

##### Execute notebooks from a function[#](#execute-notebooks-from-a-function "Permalink to this heading")

You can now use the executenb function to execute notebooks as though

you ran the execute preprocessor on the notebooks. It returns the

standard notebook and resources options.

##### Remove cells based on regex pattern[#](#remove-cells-based-on-regex-pattern "Permalink to this heading")

This removes cells based on their matching a regex pattern (by default,

empty cells). This is the RegexRemovePreprocessor.

##### Script exporter entrypoints for nonpython scripts[#](#script-exporter-entrypoints-for-nonpython-scripts "Permalink to this heading")

Now there is an entrypoint for having an exporter specific to the type

of script that is being exported. While designed for use with the

IRkernel in particular (with a script exporter focused on exporting R

scripts) other non-python kernels that wish to have a language specific

exporter can now surface that directly.

#### Comprehensive notes[#](#id150 "Permalink to this heading")

* new: configurable ExecutePreprocessor.startup\_timeout configurable

[#583](https://github.com/jupyter/nbconvert/pull/583)

* new: RemoveCell preprocessor based on cell content (defaults to

empty cell) [#575](https://github.com/jupyter/nbconvert/pull/575)

* new: function for executing notebooks: `executenb`

[#573](https://github.com/jupyter/nbconvert/pull/573)

* new: global filtering to remove inputs, outputs, markdown cells

(&c.), this works on all templates [#554](https://github.com/jupyter/nbconvert/pull/554)

* new: script exporter entrypoint [#531](https://github.com/jupyter/nbconvert/pull/531)

* new: configurable anchor link text (previously ¶)

`HTMLExporter.anchor\_link\_text` [#522](https://github.com/jupyter/nbconvert/pull/522)

* new: configurable values for slides exporter [#542](https://github.com/jupyter/nbconvert/pull/542) [#558](https://github.com/jupyter/nbconvert/pull/558)

* improved releases (how-to documentation, version-number generation

and checking) [#593](https://github.com/jupyter/nbconvert/pull/593)

* doc improvements [#593](https://github.com/jupyter/nbconvert/pull/593)

[#580](https://github.com/jupyter/nbconvert/pull/580) [#565](https://github.com/jupyter/nbconvert/pull/565) [#554](https://github.com/jupyter/nbconvert/pull/554)

* language information from cell magics (for highlighting) is now

included in more formats [#586](https://github.com/jupyter/nbconvert/pull/586)

* mathjax upgrades and cdn fixes [#584](https://github.com/jupyter/nbconvert/pull/584) [#567](https://github.com/jupyter/nbconvert/pull/567)

* better CI [#571](https://github.com/jupyter/nbconvert/pull/571)

[#540](https://github.com/jupyter/nbconvert/pull/540)

* better traceback behaviour when execution errs

[#521](https://github.com/jupyter/nbconvert/pull/521)

* deprecated nose test features removed [#519](https://github.com/jupyter/nbconvert/pull/519)

* bug fixed: we now respect width and height metadata on jpeg and png

mimetype outputs [#588](https://github.com/jupyter/nbconvert/pull/588)

* bug fixed: now we respect the `resolve\_references` filter in

`report.tplx` [#577](https://github.com/jupyter/nbconvert/pull/577)

* bug fixed: output metadata now is removed by ClearOutputPreprocessor

[#569](https://github.com/jupyter/nbconvert/pull/569)

* bug fixed: display id respected in execute preproessor

[#563](https://github.com/jupyter/nbconvert/pull/563)

* bug fixed: dynamic defaults for optional jupyter\_client import

[#559](https://github.com/jupyter/nbconvert/pull/559)

* bug fixed: don’t self-close non-void HTML tags

[#548](https://github.com/jupyter/nbconvert/pull/548)

* buf fixed: upgrade jupyter\_client dependency to 4.2

[#539](https://github.com/jupyter/nbconvert/pull/539)

* bug fixed: LaTeX output through md→LaTeX conversion shouldn’t be

touched [#535](https://github.com/jupyter/nbconvert/pull/535)

* bug fixed: now we escape `<` inside math formulas when converting to

html [#514](https://github.com/jupyter/nbconvert/pull/514)

#### Credits[#](#credits "Permalink to this heading")

This release has been larger than previous releases. In it 33 authors

contributed a total of 546 commits.

Many thanks to the following individuals who contributed to this release

(in alphabetical order):

* Adam Chainz

* Andreas Mueller

* Bartosz T

* Benjamin Ragan-Kelley

* Carol Willing

* Damián Avila

* Elliot Marsden

* Gao, Xiang

* Jaeho Shin

* Jan Schulz

* Jeremy Kun

* Jessica B. Hamrick

* John B Nelson

* juhasch

* Livia Barazzetti

* M Pacer

* Matej Urbas

* Matthias Bussonnier

* Matthias Geier

* Maximilian Albert

* Michael Scott Cuthbert

* Nicholas Bollweg

* Paul Gowder

* Paulo Villegas

* Peter Parente

* Philipp A

* Scott Sanderson

* Srinivas Reddy Thatiparthy

* Sylvain Corlay

* Thomas Kluyver

* Till Hoffmann

* Xiang Gao

* YuviPanda

### 5.1.1[#](#id151 "Permalink to this heading")

[5.1.1 on GitHub](https://github.com/jupyter/nbconvert/milestones/5.1.1)

* fix version numbering because of incomplete previous version number

### 5.1[#](#id152 "Permalink to this heading")

[5.1 on GitHub](https://github.com/jupyter/nbconvert/milestones/5.1)

* improved CSS (specifically tables, in line with notebook)

[#498](https://github.com/jupyter/nbconvert/pull/498)

* improve in-memory templates handling [#491](https://github.com/jupyter/nbconvert/pull/491)

* test improvements [#516](https://github.com/jupyter/nbconvert/pull/516)

[#509](https://github.com/jupyter/nbconvert/pull/509) [#505](https://github.com/jupyter/nbconvert/pull/505)

* new configuration option: IOPub timeout [#513](https://github.com/jupyter/nbconvert/pull/513)

* doc improvements [#489](https://github.com/jupyter/nbconvert/pull/489)

[#500](https://github.com/jupyter/nbconvert/pull/500) [#493](https://github.com/jupyter/nbconvert/pull/493) [#506](https://github.com/jupyter/nbconvert/pull/506)

* newly customizable: output prompt [#500](https://github.com/jupyter/nbconvert/pull/500)

* more python2/3 compatible unicode handling [#502](https://github.com/jupyter/nbconvert/pull/502)

### 5.0[#](#id153 "Permalink to this heading")

[5.0 on GitHub](https://github.com/jupyter/nbconvert/milestones/5.0)

* Use `xelatex` by default for latex

export, improving unicode and font support.

* Use entrypoints internally to access Exporters, allowing for

packages to declare custom exporters more easily.

* New ASCIIDoc Exporter.

* New preprocessor for sanitised html output.

* New general `convert\_pandoc` filter to reduce the need to hard-code

lists of filters in templates.

* Use pytest, nose dependency to be removed.

* Refactored Exporter code to avoid ambiguity and cyclic dependencies.

* Update to traitlets 4.2 API.

* Fixes for Unicode errors when showing execution errors on Python 2.

* Default math font matches default Palatino body text font.

* General documentation improvements. For example, testing,

installation, custom exporters.

* Improved link handling for LaTeX output

* Refactored the automatic id generation.

* New kernel\_manager\_class configuration option for allowing systems

to be set up to resolve kernels in different ways.

* Kernel errors now will be logged for debugging purposes when

executing notebooks.

### 4.3[#](#id154 "Permalink to this heading")

[4.3 on GitHub](https://github.com/jupyter/nbconvert/milestones/4.3)

* added live widget rendering for html output, nbviewer by extension

### 4.2[#](#id155 "Permalink to this heading")

[4.2 on GitHub](https://github.com/jupyter/nbconvert/milestones/4.2)

* `Custom Exporters` can be provided by external packages, and registered

with nbconvert via setuptools entrypoints.

* allow nbconvert reading from stdin with `--stdin` option (write into

`notebook` basename)

* Various ANSI-escape fixes and improvements

* Various LaTeX/PDF export fixes

* Various fixes and improvements for executing notebooks with

`--execute`.

### 4.1[#](#id156 "Permalink to this heading")

[4.1 on GitHub](https://github.com/jupyter/nbconvert/milestones/4.1)

* setuptools fixes for entrypoints on Windows

* various fixes for exporters, including slides, latex, and PDF

* fixes for exceptions met during execution

* include markdown outputs in markdown/html exports

### 4.0[#](#id157 "Permalink to this heading")

[4.0 on GitHub](https://github.com/jupyter/nbconvert/milestones/4.0)

Need help?[#](#need-help "Permalink to this heading")

-----------------------------------------------------

### Technical Support[#](#technical-support "Permalink to this heading")

* [GitHub Issues and Bug Reports](https://github.com/jupyter/nbconvert/issues). A place to report bugs or regressions found for nbconvert

* [Community Technical Support and Discussion - Jupyter Discourse](https://discourse.jupyter.org/) :

A place for installation, configuration, and troubleshooting assistance by the Jupyter community.

As a non-profit project with maintainers who are primarily volunteers, we rely on the community

for technical support. Please use Discourse to ask questions and share your knowledge.

### Documentation[#](#documentation "Permalink to this heading")

* [Documentation for Jupyter nbconvert](https://nbconvert.readthedocs.io/en/latest/)

[PDF](https://media.readthedocs.org/pdf/nbconvert/latest/nbconvert.pdf)

* [nbconvert examples repo on GitHub](https://github.com/jupyter/nbconvert-examples)

* [Documentation for Project Jupyter](https://jupyter.readthedocs.io/en/latest/index.html)

### Jupyter Resources[#](#jupyter-resources "Permalink to this heading")

* [Jupyter mailing list](https://groups.google.com/forum/#!forum/jupyter)

* [Project Jupyter website](https://jupyter.org)

Indices and tables[#](#indices-and-tables "Permalink to this heading")

----------------------------------------------------------------------

* [Index](genindex.html)

* [Module Index](py-modindex.html)

* [Search Page](search.html)

 On this page

 

User Documentation

* [Installation](index.html#document-install)

	+ [Supported Python versions](index.html#supported-python-versions)

	+ [Installing nbconvert](index.html#installing-nbconvert)

	+ [Installing Pandoc](index.html#installing-pandoc)

	+ [Installing TeX](index.html#installing-tex)

	+ [Installing Chromium](index.html#installing-chromium)

* [Using as a command line tool](index.html#document-usage)

	+ [Default output format](index.html#default-output-format)

	+ [Supported output formats](index.html#supported-output-formats)

	+ [Converting multiple notebooks](index.html#converting-multiple-notebooks)

* [Using nbconvert as a library](index.html#document-nbconvert_library)

	+ [Quick overview](index.html#Quick-overview)

	+ [Extracting Figures using the RST Exporter](index.html#Extracting-Figures-using-the-RST-Exporter)

	+ [Extracting Figures using the HTML Exporter](index.html#Extracting-Figures-using-the-HTML-Exporter)

	+ [Custom Preprocessors](index.html#Custom-Preprocessors)

	+ [Example](index.html#Example)

	+ [Programmatically creating templates](index.html#Programmatically-creating-templates)

	+ [Real World Uses](index.html#Real-World-Uses)

* [Dejavu](index.html#document-dejavu)

	+ [Running dejavu](index.html#running-dejavu)

	+ [Configuring the Notebook for slides presentations](index.html#configuring-the-notebook-for-slides-presentations)

* [LaTeX citations](index.html#document-latex_citations)

* [Removing cells, inputs, or outputs](index.html#document-removing_cells)

	+ [Removing pieces of cells using cell tags](index.html#removing-pieces-of-cells-using-cell-tags)

	+ [Removing cells using Regular Expressions on cell content](index.html#removing-cells-using-regular-expressions-on-cell-content)

* [Executing notebooks](index.html#document-execute_api)

	+ [Executing notebooks from the command line](index.html#executing-notebooks-from-the-command-line)

	+ [Executing notebooks using the Python API interface](index.html#executing-notebooks-using-the-python-api-interface)

	+ [Execution arguments (traitlets)](index.html#execution-arguments-traitlets)

	+ [Handling errors and exceptions](index.html#handling-errors-and-exceptions)

	+ [Widget state](index.html#widget-state)

Configuration

* [Configuration options](index.html#document-config_options)

	+ [CLI Flags and Aliases](index.html#cli-flags-and-aliases)

	+ [App Options](index.html#app-options)

	+ [Exporter Options](index.html#exporter-options)

	+ [Writer Options](index.html#writer-options)

	+ [Preprocessor Options](index.html#preprocessor-options)

	+ [Postprocessor Options](index.html#postprocessor-options)

	+ [Other Options](index.html#other-options)

* [Creating Custom Templates for nbconvert](index.html#document-customizing)

	+ [Selecting a template](index.html#selecting-a-template)

	+ [Where are nbconvert templates installed?](index.html#where-are-nbconvert-templates-installed)

	+ [The content of nbconvert templates](index.html#the-content-of-nbconvert-templates)

* [Customizing exporters](index.html#document-external_exporters)

	+ [Extending the built-in format exporters](index.html#extending-the-built-in-format-exporters)

	+ [Registering a custom exporter as an entry point](index.html#registering-a-custom-exporter-as-an-entry-point)

	+ [Using a custom exporter without entrypoints](index.html#using-a-custom-exporter-without-entrypoints)

* [Parameters controlled by an external exporter](index.html#parameters-controlled-by-an-external-exporter)

* [Writing a custom `Exporter`](index.html#writing-a-custom-exporter)

* [Customizing Syntax Highlighting](index.html#document-highlighting)

	+ [Using Builtin styles](index.html#using-builtin-styles)

	+ [Making your own styles](index.html#making-your-own-styles)

Developer Documentation

* [Architecture of nbconvert](index.html#document-architecture)

	+ [A detailed pipeline exploration](index.html#a-detailed-pipeline-exploration)

	+ [Classes](index.html#classes)

* [Python API for working with nbconvert](index.html#document-api/index)

	+ [NbConvertApp](index.html#document-api/nbconvertapp)

	+ [Exporters](index.html#document-api/exporters)

	+ [Preprocessors](index.html#document-api/preprocessors)

	+ [Filters](index.html#document-api/filters)

	+ [Writers](index.html#document-api/writers)

	+ [Postprocessors](index.html#document-api/postprocessors)

* [Making an `nbconvert` release](index.html#document-development_release)

	+ [Assign all merged PRs to milestones](index.html#assign-all-merged-prs-to-milestones)

	+ [Gather all PRs related to milestone](index.html#gather-all-prs-related-to-milestone)

	+ [Manually categorize tickets](index.html#manually-categorize-tickets)

	+ [Collect major changes](index.html#collect-major-changes)

	+ [Update docs/source/changelog.rst](index.html#update-docs-source-changelog-rst)

	+ [Check installed tools](index.html#check-installed-tools)

	+ [Clean the repository](index.html#clean-the-repository)

	+ [Create the release](index.html#create-the-release)

	+ [Release the new version](index.html#release-the-new-version)

	+ [Return to development state](index.html#return-to-development-state)

	+ [Email googlegroup with update letter](index.html#email-googlegroup-with-update-letter)

About nbconvert

* [Changes in nbconvert](index.html#document-changelog)

	+ [7.9.2](index.html#id1)

	+ [7.9.1](index.html#id2)

	+ [7.9.0](index.html#id4)

	+ [7.8.0](index.html#id7)

	+ [7.7.4](index.html#id10)

	+ [7.7.3](index.html#id14)

	+ [7.7.2](index.html#id17)

	+ [7.7.1](index.html#id20)

	+ [7.7.0](index.html#id23)

	+ [7.6.0](index.html#id28)

	+ [7.5.0](index.html#id31)

	+ [7.4.0](index.html#id36)

	+ [7.3.1](index.html#id41)

	+ [7.3.0](index.html#id45)

	+ [7.2.10](index.html#id49)

	+ [7.2.9](index.html#id54)

	+ [7.2.8](index.html#id57)

	+ [7.2.7](index.html#id61)

	+ [7.2.6](index.html#id65)

	+ [7.2.5](index.html#id68)

	+ [7.2.4](index.html#id72)

	+ [7.2.3](index.html#id75)

	+ [7.2.2](index.html#id79)

	+ [7.2.1](index.html#id83)

	+ [7.2.0](index.html#id86)

	+ [7.1.0](index.html#id89)

	+ [7.0.0](index.html#id90)

	+ [6.5.0](index.html#id91)

	+ [6.4.4](index.html#id92)

	+ [6.4.3](index.html#id93)

	+ [6.4.2](index.html#id94)

	+ [6.4.1](index.html#id95)

	+ [6.4.0](index.html#id96)

	+ [6.3.0](index.html#id97)

	+ [6.2.0](index.html#id98)

	+ [6.1.0](index.html#id99)

	+ [6.0.7](index.html#id100)

	+ [6.0.6](index.html#id102)

	+ [6.0.5](index.html#id104)

	+ [6.0.4](index.html#id105)

	+ [6.0.3](index.html#id107)

	+ [6.0.2](index.html#id108)

	+ [6.0.1](index.html#id111)

	+ [6.0](index.html#id112)

	+ [5.6.1](index.html#id114)

	+ [5.6](index.html#id119)

	+ [5.5](index.html#id125)

	+ [5.4.1](index.html#id132)

	+ [5.4](index.html#id137)

	+ [5.3.1](index.html#id145)

	+ [5.3](index.html#id146)

	+ [5.2.1](index.html#id148)

	+ [5.1.1](index.html#id151)

	+ [5.1](index.html#id152)

	+ [5.0](index.html#id153)

	+ [4.3](index.html#id154)

	+ [4.2](index.html#id155)

	+ [4.1](index.html#id156)

	+ [4.0](index.html#id157)

Questions? Suggestions?

* [Need help?](index.html#document-need_help)

	+ [Technical Support](index.html#technical-support)

	+ [Documentation](index.html#documentation)

	+ [Jupyter Resources](index.html#jupyter-resources)

 

 © Copyright 2015-2023, Jupyter Development Team.

   

 Created using [Sphinx](https://www.sphinx-doc.org/) 5.0.2.

   

 Built with the [PyData Sphinx Theme](https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html) 0.14.1.





{# Load FontAwesome icons #}

{% macro head\_pre\_icons() %}

 

{% endmacro %}

{% macro head\_pre\_assets() %}

 

{% endmacro %}

{% macro head\_js\_preload() %}

 

{% endmacro %}

{% macro body\_post() %}

 

{% endmacro %}