Many other services and products use it to allow easy text formatting. It’s easy to find any coupon for Vscode Jupyter Notebook Markdown by searching. Since Jupyter notebook version 5.0, in addition to referencing external file you can attach a file to a markdown cell.

Cell Types¶

Working with Jupyter Notebooks in Visual Studio Code.

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

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

Changed in version nbformat: 4.0

Jupyter Notebook Markdown Formatting

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.

display_data¶

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.

Jupiter Notebook Markdown Formatting Template

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.

Jupyter Notebook Markdown Formatting Example

execute_result¶

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

Jupyter Notebook Markdown Format Code

error¶

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 Formatting Guide

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.