Skip to main content
`Ctrl`+`K`

# nbconvert: Convert Notebooks to other formats

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:

User Documentation

- Installation
  - Supported Python versions
  - Installing nbconvert
  - Installing Pandoc
  - Installing TeX
  - Installing Chromium
- Using as a command line tool
  - Default output format
  - Supported output formats
  - Converting multiple notebooks
- Using nbconvert as a library
  - Quick overview
  - Extracting Figures using the RST Exporter
  - Extracting Figures using the HTML Exporter
  - Custom Preprocessors
  - Example
  - Programmatically creating templates
  - Real World Uses
- Dejavu
  - Running dejavu
  - Configuring the Notebook for slides presentations
- LaTeX citations
- Removing cells, inputs, or outputs
  - Removing pieces of cells using cell tags
  - Removing cells using Regular Expressions on cell content
- Executing notebooks
  - Executing notebooks from the command line
  - Executing notebooks using the Python API interface
  - Execution arguments (traitlets)
  - Handling errors and exceptions
  - Widget state

Configuration

- Configuration options
  - CLI Flags and Aliases
  - App Options
  - Exporter Options
  - Writer Options
  - Preprocessor Options
  - Postprocessor Options
  - Other Options
- Creating Custom Templates for nbconvert
  - Selecting a template
  - Where are nbconvert templates installed?
  - The content of nbconvert templates
- Customizing exporters
  - Extending the built-in format exporters
  - Registering a custom exporter as an entry point
  - Using a custom exporter without entrypoints
- Parameters controlled by an external exporter
- Writing a custom `Exporter`
- Customizing Syntax Highlighting
  - Using Builtin styles
  - Making your own styles

Developer Documentation

- Architecture of nbconvert
  - A detailed pipeline exploration
  - Classes
- Python API for working with nbconvert
  - NbConvertApp
  - Exporters
  - Preprocessors
  - Filters
  - Writers
  - Postprocessors
- Making an `nbconvert` release
  - Assign all merged PRs to milestones
  - Gather all PRs related to milestone
  - Manually categorize tickets
  - Collect major changes
  - Update docs/source/changelog.rst
  - Check installed tools
  - Clean the repository
  - Create the release
  - Release the new version
  - Return to development state
  - Email googlegroup with update letter

About nbconvert

- Changes in nbconvert
  - 7.17.0
  - 7.16.6
  - 7.16.5
  - 7.16.4
  - 7.16.3
  - 7.16.2
  - 7.16.1
  - 7.16.0
  - 7.15.0
  - 7.14.2
  - 7.14.1
  - 7.14.0
  - 7.13.1
  - 7.13.0
  - 7.12.0
  - 7.11.0
  - 7.10.0
  - 7.9.2
  - 7.9.1
  - 7.9.0
  - 7.8.0
  - 7.7.4
  - 7.7.3
  - 7.7.2
  - 7.7.1
  - 7.7.0
  - 7.6.0
  - 7.5.0
  - 7.4.0
  - 7.3.1
  - 7.3.0
  - 7.2.10
  - 7.2.9
  - 7.2.8
  - 7.2.7
  - 7.2.6
  - 7.2.5
  - 7.2.4
  - 7.2.3
  - 7.2.2
  - 7.2.1
  - 7.2.0
  - 7.1.0
  - 7.0.0
  - 6.5.0
  - 6.4.4
  - 6.4.3
  - 6.4.2
  - 6.4.1
  - 6.4.0
  - 6.3.0
  - 6.2.0
  - 6.1.0
  - 6.0.7
  - 6.0.6
  - 6.0.5
  - 6.0.4
  - 6.0.3
  - 6.0.2
  - 6.0.1
  - 6.0
  - 5.6.1
  - 5.6
  - 5.5
  - 5.4.1
  - 5.4
  - 5.3.1
  - 5.3
  - 5.2.1
  - 5.1.1
  - 5.1
  - 5.0
  - 4.3
  - 4.2
  - 4.1
  - 4.0

Questions? Suggestions?

- Need help?
  - Technical Support
  - Documentation
  - Jupyter Resources

## Indices and tables

- Index

- Module Index

- Search Page