Markdown Cheat Sheet

Copied and adapted from this guide!

This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements to format Markdown cells in Jupyter notebooks.

Headings

Use the number sign (#) followed by a blank space for notebook titles and section headings, e.g.:

# for titles
## for major headings
### for subheadings
#### for 4th level subheading

Emphasis

Use the surrounding _ or * to emphasize text, e.g.:

Bold text: `__string___ or **string**`
Italic text:  `_string_ or *string`

Mathematical symbols

Surround mathematical symbols with a dollar sign ($), for example:

$ \lambda = \sqrt{2*\pi} $

gives $ \lambda `= :nbsphinx-math:sqrt{2*pi}` $

Monospace font

Surround text with a grave accent (` ) also called a back single quotation mark, for example:

`string`

You can use the monospace font for file paths , file names ,message text

Line breaks

Sometimes markdown does not make line breaks when you want them. To force a linebreak, use the following code: <br>

Indenting

Use the greater than sign (>) followed by a space, for example:

> Text that will be indented when the Markdown is rendered.
Any subsequent text is indented until the next carriage return.

Bullets

To create a circular bullet point, use one of the following methods. Each bullet point must be on its own line.

  • A hyphen (-) followed by one or two spaces, for example:

- Bulleted item
  • A space, a hyphen (-) and a space, for example:

- Bulleted item
  • An asterisk (*) followed by one or two spaces, for example:

* Bulleted item

To create a sub bullet, press Tab before entering the bullet point using one of the methods described above. For example:

- Main bullet point
     - Sub bullet point

Numbered lists

To create a numbered list, enter 1. followed by a space, for example:

1. Numbered item
1. Numbered item

For simplicity, you use 1. before each entry. The list will be numbered correctly when you run the cell.

To create a substep, press Tab before entering the numbered item, for example:

1. Numbered item
     1. Substep

Colored note boxes

Use one of the following

tags to display text in a colored box.

Restriction: Not all Markdown code displays correctly within

tags, so review your colored boxes carefully. For example, to make a word bold, surround it with the HTML code for bold (<b>text</b> -> text) instead of the Markdown code.

The color of the box is determined by the alert type that you specify:

  • Blue boxes (alert-info)

  • Yellow boxes (alert-warning)

  • Green boxes (alert-success)

  • Red boxes (alert-danger)

<div class="alert alert-block alert-info">
<b>Tip:</b>  For example use blue boxes to highlight a tip.
If it’s a note, you don’t have to include the word “Note”.
</div>

Tip: For example use blue boxes to highlight a tip. If it’s a note, you don’t have to include the word “Note”.

Graphics

You can attach image files directly to a notebook in Markdown cells by dragging and dropping it into the cell. To add images to other types of cells, you must use a graphic that is hosted on the web and use the following code to insert the graphic:

<img src="url.gif" alt="Alt text that describes the graphic" title="Title text" />

Alt text that describes the graphic

Restriction You cannot add captions to graphics.

Geometric shapes

Use &# followed by the decimal or hex reference number for the shape, for example:

&#reference_number;

e.g., &#9664;: ◀

For a list of reference numbers, see UTF-8 Geometric shapes.

Horizontal lines

On a new line, enter three asterisks: *** ***

Processing functions

This is the section that the internal link points to.

Now you can link to the section using:

[processing functions](#processing-functions)

processing functions