Jupyter Notebook Format Markdown

  • The Markdown syntax supported in this mode is the same syntax used in the Jupyter Notebook (for example, LaTeX equations work). As seen in the animation, edits to the Markdown source are immediately reflected in the rendered version.
  • The Jupyter Notebook format supports Markdown in text cells. There is not a strict specification for the flavor of markdown that is supported, but this page should help guide the user / developer in understanding what behavior to expect with Jupyter interfaces and markup languages. What flavor of Markdown does the notebook format support?

MyST Markdown Notebooks¶. MyST Markdown Notebooks allow you to write your Jupyter Notebook entirely in markdown using the MyST Markdown format.This allows you to store notebook metadata, markdown, and cell inputs in a text-based format that is easy to read and use with text-based tools.

Jupyter Notebook supports Markdown. This lesson will cover some of the things you can do using Markdown to interlace your thoughts and code in Notebooks to tell compelling stories about your data. You’ll see how to format text, add syntax highlighting, make lists, and other ways to make text presentable. 8/2/2019 Markdown for Jupyter notebooks cheatsheet 2/6 notebook. Here's how to format Markdown cells in Jupyter notebooks: Headings Use the number sign (#) followed by a blank space for notebook titles and section headings: # for titles ## for major headings ### for subheadings #### for 4th level subheadings Emphasis Use the following code to emphasize text: Bold text: string or.string.

Cell Types¶

Equations In Jupyter Notebook Markdown

There are a few basic cell types for encapsulating code and text.All cells have the following basic structure:

Markdown cells¶

Markdown cells are used for body-text, and contain markdown,as defined in GitHub-flavored markdown, and implemented in marked.

Changed in version nbformat: 4.0

Heading cells have been removed, in favor of simple headings in markdown.

Code cells¶

Code cells are the primary content of Jupyter notebooks.They contain source code in the language of the document’s associated kernel,and a list of outputs associated with executing that code.They also have an execution_count, which must be an integer or null.

Changed in version nbformat: 4.0 Lg stylo 4 cast to tv wireless.

input was renamed to source, for consistency among cell types.

Changed in version nbformat: 4.0

prompt_number renamed to execution_count

Code cell outputs¶

A code cell can have a variety of outputs (stream data or rich mime-type output).These correspond to messages produced as a result of executing the cell.

All outputs have an output_type field,which is a string defining what type of output it is.

stream output¶

Changed in version nbformat: 4.0

The keys stream key was changed to name to matchthe stream message.


Rich display outputs, as created by display_data messages,contain data keyed by mime-type. This is often called a mime-bundle,and shows up in various locations in the notebook format and message spec.The metadata of these messages may be keyed by mime-type as well.

Changed in version nbformat: 4.0

application/json output is no longer double-serialized into a string.

Changed in version nbformat: 4.0

mime-types are used for keys, instead of a combination of short names (text)and mime-types, and are stored in a data key, rather than the top-level.i.e. output.data['image/png'] instead of output.png.


Results of executing a cell (as created by displayhook in Python)are stored in execute_result outputs.execute_result outputs are identical to display_data,adding only a execution_count field, which must be an integer.

Changed in version nbformat: 4.0

pyout renamed to execute_result

Changed in version nbformat: 4.0

prompt_number renamed to execution_count


Failed execution may show a traceback

Changed in version nbformat: 4.0

pyerr renamed to error

Raw NBConvert cells¶

A raw cell is defined as content that should be included unmodified in nbconvert output.For example, this cell could include raw LaTeX for nbconvert to pdf via latex,or restructured text for use in Sphinx documentation.

Jupyter notebook markdown format code

The notebook authoring environment does not render raw cells.

The only logic in a raw cell is the format metadata field.If defined, it specifies which nbconvert output format is the intended targetfor the raw cell. When outputting to any other format,the raw cell’s contents will be excluded.In the default case when this value is undefined,a raw cell’s contents will be included in any nbconvert output,regardless of format.

  • Jupyter Tutorial
  • IPython
  • Jupyter
  • QtConsole
  • JupyterLab
  • Jupyter Resources
  • Selected Reading

Markdown cell displays text which can be formatted using markdown language. In order to enter a text which should not be treated as code by Notebook server, it must be first converted as markdown cell either from cell menu or by using keyboard shortcut M while in command mode. The In[] prompt before cell disappears.

Header cell

A markdown cell can display header text of 6 sizes, similar to HTML headers. Start the text in markdown cell by # symbol. Use as many # symbols corresponding to level of header you want. It means single # will render biggest header line, and six # symbols renders header of smallest font size. The rendering will take place when you run the cell either from cell menu or run button of toolbar.

Following screenshot shows markdown cells in edit mode with headers of three different levels.

When cells are run, the output is as follows −

Note that Jupyter notebook markdown doesn’t support WYSWYG feature. The effect of formatting will be rendered only after the markdown cell is run.

Ordered Lists

To render a numbered list as is done by <ol> tag of HTML, the First item in the list should be numbered as 1. Subsequent items may be given any number. It will be rendered serially when the markdown cell is run. To show an indented list, press tab key and start first item in each sublist with 1.

If you give the following data for markdown −

It will display the following list −

Bullet lists

Each item in the list will display a solid circle if it starts with – symbol where as solid square symbol will be displayed if list starts with * symbol. The following example explains this feature −

The rendered markdown shows up as below −


Markdown text starting with http or https automatically renders hyperlink. To attach link to text, place text in square brackets [] and link in parentheses () optionally including hovering text. Following screenshot will explain this.

The rendered markdown appears as shown below −

Bold and Italics

Jupyter Notebook Format Markdown Cells

To show a text in bold face, put it in between double underscores or two asterisks. To show in italics, put it between single underscores or single asterisks.

Jupyter Notebook Markdown Latex

The result is as shown below −


To display image in a markdown cell, choose ‘Insert image’ option from Edit menu and browse to desired image file. The markdown cell shows its syntax as follows −

Image will be rendered on the notebook as shown below −


In a markdown cell, a table can be constructed using (pipe symbol) and – (dash) to mark columns and rows. Note that the symbols need not be exactly aligned while typing. It should only take respective place of column borders and row border. Notebook will automatically resize according to content. A table is constructed as shown below −

The output table will be rendered as shown below −