Configuration options

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.

Application.log_datefmt : Unicode

Default: '%Y-%m-%d %H:%M:%S'

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

Application.log_format : Unicode

Default: '[%(name)s]%(highlevel)s %(message)s'

The Logging format template

Application.log_level : 0|10|20|30|40|50|’DEBUG’|’INFO’|’WARN’|’ERROR’|’CRITICAL’

Default: 30

Set the log level by value or name.

JupyterApp.answer_yes : Bool

Default: False

Answer yes to any prompts.

JupyterApp.config_file : Unicode

Default: ''

Full path of a config file.

JupyterApp.config_file_name : Unicode

Default: ''

Specify a config file to load.

JupyterApp.generate_config : Bool

Default: False

Generate default config file.

NbConvertApp.export_format : Unicode

Default: 'html'

The export format to be used, either one of the built-in formats, or a dotted object name that represents the import path for an Exporter class

NbConvertApp.from_stdin : Bool

Default: False

read a single notebook from stdin.

NbConvertApp.notebooks : List

Default: []

List of notebooks to convert. Wildcards are supported. Filenames passed positionally will be added to the list.

NbConvertApp.output_base : Unicode

Default: ''

overwrite base name use for output files. can only be used when converting one notebook at a time.

NbConvertApp.output_files_dir : Unicode

Default: '{notebook_name}_files'

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

NbConvertApp.postprocessor_class : DottedOrNone

Default: ''

PostProcessor class used to write the results of the conversion

NbConvertApp.use_output_suffix : Bool

Default: True

Whether to apply a suffix prior to the extension (only relevant when converting to notebook format). The suffix is determined by the exporter, and is usually ‘.nbconvert’.

NbConvertApp.writer_class : DottedObjectName

Default: 'FilesWriter'

Writer class used to write the results of the conversion

NbConvertBase.default_language : Unicode

Default: 'ipython'

Deprecated default highlight language as of 5.0, please use language_info metadata instead

NbConvertBase.display_data_priority : List

Default: ['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.

Exporter.default_preprocessors : List

Default: ['nbconvert.preprocessors.RegexRemovePreprocessor', 'nbconver...

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

Exporter.file_extension : FilenameExtension

Default: '.txt'

Extension of the file that should be written to disk

Exporter.preprocessors : List

Default: []

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

TemplateExporter.exclude_code_cell : Bool

Default: False

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

TemplateExporter.exclude_input : Bool

Default: False

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

TemplateExporter.exclude_input_prompt : Bool

Default: False

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

TemplateExporter.exclude_markdown : Bool

Default: False

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

TemplateExporter.exclude_output : Bool

Default: False

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

TemplateExporter.exclude_output_prompt : Bool

Default: False

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

TemplateExporter.exclude_raw : Bool

Default: False

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

TemplateExporter.exclude_unknown : Bool

Default: False

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

TemplateExporter.filters : Dict

Default: {}

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

TemplateExporter.raw_mimetypes : List

Default: []

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

TemplateExporter.template_extension : Unicode

Default: '.tpl'

No description

TemplateExporter.template_file : Unicode

Default: ''

Name of the template file to use

TemplateExporter.template_path : List

Default: ['.']

No description

HTMLExporter.anchor_link_text : Unicode

Default: '¶'

The text used as the text for anchor links.

LatexExporter.template_extension : Unicode

Default: '.tplx'

No description

NotebookExporter.nbformat_version : 1|2|3|4

Default: 4

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

PDFExporter.bib_command : List

Default: ['bibtex', '{filename}']

Shell command used to run bibtex.

PDFExporter.latex_command : List

Default: ['xelatex', '{filename}']

Shell command used to compile latex.

PDFExporter.latex_count : Int

Default: 3

How many times latex will be called.

PDFExporter.temp_file_exts : List

Default: ['.aux', '.bbl', '.blg', '.idx', '.log', '.out']

File extensions of temp files to remove after running.

PDFExporter.verbose : Bool

Default: False

Whether to display the output of latex commands.

SlidesExporter.font_awesome_url : Unicode

Default: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/cs...

URL to load font awesome from.

Defaults to loading from cdnjs.

SlidesExporter.jquery_url : Unicode

Default: 'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.m...

URL to load jQuery from.

Defaults to loading from cdnjs.

SlidesExporter.require_js_url : Unicode

Default: '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_theme : Unicode

Default: '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.

https://github.com/hakimel/reveal.js/tree/master/css/theme has list of themes that ship by default with reveal.js.

SlidesExporter.reveal_url_prefix : Unicode

Default: ''

The URL prefix for reveal.js. This can be a a relative URL for a local copy of reveal.js, or point to a CDN.

For speaker notes to work, a local reveal.js prefix must be used.

Preprocessor.enabled : Bool

Default: False

No description

CSSHTMLHeaderPreprocessor.highlight_class : Unicode

Default: '.highlight'

CSS highlight class identifier

ClearOutputPreprocessor.remove_metadata_fields : Set

Default: {'collapsed', 'scrolled'}

No description

ConvertFiguresPreprocessor.from_format : Unicode

Default: ''

Format the converter accepts

ConvertFiguresPreprocessor.to_format : Unicode

Default: ''

Format the converter writes

ExecutePreprocessor.allow_errors : Bool

Default: False

If False (default), when a cell raises an error the execution is stopped and a CellExecutionError is raised. 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.interrupt_on_timeout : Bool

Default: 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 : Int

Default: 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.kernel_manager_class : Type

Default: 'builtins.object'

The kernel manager class to use.

ExecutePreprocessor.kernel_name : Unicode

Default: ''

Name of kernel to use to execute the cells. If not set, use the kernel_spec embedded in the notebook.

ExecutePreprocessor.raise_on_iopub_timeout : Bool

Default: 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.shutdown_kernel : ‘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.startup_timeout : Int

Default: 60

The time to wait (in seconds) for the kernel to start. If kernel startup takes longer, a RuntimeError is raised.

ExecutePreprocessor.timeout : Int

Default: 30

The time to wait (in seconds) for output from executions. If a cell execution takes longer, an exception (TimeoutError on python 3+, RuntimeError on python 2) is raised.

None or -1 will disable the timeout. If timeout_func is set, it overrides timeout.

ExecutePreprocessor.timeout_func : Any

Default: 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, an exception (TimeoutError on python 3+, RuntimeError on python 2) is raised.

Returning None or -1 will disable the timeout for the cell. Not setting timeout_func will cause the preprocessor to default to using the timeout trait for all cells. The timeout_func trait overrides timeout if it is not None.

ExtractOutputPreprocessor.extract_output_types : Set

Default: {'image/svg+xml', 'image/jpeg', 'image/png', 'application/pdf'}

No description

ExtractOutputPreprocessor.output_filename_template : Unicode

Default: '{unique_key}_{cell_index}_{index}{extension}'

No description

HighlightMagicsPreprocessor.languages : Dict

Default: {}

Syntax highlighting for magic’s extension languages. Each item associates a language magic extension such as %%R, with a pygments lexer such as r.

RegexRemovePreprocessor.patterns : List

Default: ['\\Z']

No description

SVG2PDFPreprocessor.command : Unicode

Default: ''

The command to use for converting SVG to PDF

This string is a template, which will be formatted with the keys to_filename and from_filename.

The conversion call must read the SVG from {from_flename}, and write a PDF to {to_filename}.

SVG2PDFPreprocessor.inkscape : Unicode

Default: ''

The path to Inkscape, if necessary

WriterBase.files : List

Default: []

List of the files that the notebook references. Files will be included with written output.

FilesWriter.build_directory : Unicode

Default: ''

Directory to write output(s) to. Defaults to output to the directory of each notebook. To recover previous default behaviour (outputting to the current working directory) use . as the flag value.

FilesWriter.relpath : Unicode

Default: ''

When copying files that the notebook depends on, copy them in relation 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.

ServePostProcessor.ip : Unicode

Default: '127.0.0.1'

The IP address to listen on.

ServePostProcessor.open_in_browser : Bool

Default: True

Should the browser be opened automatically?

ServePostProcessor.port : Int

Default: 8000

port for the server to listen on.

ServePostProcessor.reveal_cdn : Unicode

Default: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.1.0'

URL for reveal.js CDN.

ServePostProcessor.reveal_prefix : Unicode

Default: 'reveal.js'

URL prefix for reveal.js