Jupyter Notebook Markdown Cheat Sheet

Master Jupyter Notebook Markdown syntax with this comprehensive cheat sheet. Learn LaTeX math formulas, code blocks, tables, MyST extensions, and advanced formatting techniques for data science documentation. Perfect for Python developers, data scientists, and researchers working with Jupyter notebooks.

Quick Syntax Search

💡 Search Tips:
Try: "math" for formulasTry: "table" for table syntaxTry: "code" for code blocksTry: "link" for links & imagesTry: "html" for advanced features
💡 Tip: Search filters content in real-time. Clear search to show all sections.

Basic Jupyter Notebook Markdown Syntax

Headers

# Heading Level 1
## Heading Level 2
### Heading Level 3
#### Heading Level 4
##### Heading Level 5
###### Heading Level 6
Heading Level 1

Heading Level 2

Heading Level 3

Heading Level 4

Heading Level 5
Heading Level 6

Text Emphasis

*italic text* or _italic text_
**bold text** or __bold text__
***bold italic*** or ___bold italic___
~~strikethrough~~
`inline code`

italic text or italic text

bold text or bold text

bold italic or bold italic

strikethrough

inline code

Lists

# Unordered list
- Item 1
- Item 2
  - Sub-item 2.1
  - Sub-item 2.2

# Ordered list
1. First item
2. Second item
   1. Sub-item 2.1
   2. Sub-item 2.2

Unordered list:

  • Item 1
  • Item 2
    • Sub-item 2.1
    • Sub-item 2.2

Ordered list:

  1. First item
  2. Second item
    1. Sub-item 2.1
    2. Sub-item 2.2

Links & Images

# Links
[Link text](http://example.com)
[Link with title](http://example.com "Link title")

# Images
![Alt text](https://via.placeholder.com/150x100)
![Image with title](https://via.placeholder.com/150x100 "Image title")

# Reference-style links
[Link text][1]
[1]: http://example.com

Images:

Alt textImage with title

Reference-style links:

Link text

Jupyter Notebook LaTeX Math & Code Blocks

Mathematical Formulas

# Inline math formula
$E = mc^2$

# Block math formula
$$
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$

# Complex math expression
$$
f(x) = \begin{cases}
x^2 & \text{if } x \geq 0 \\
-x^2 & \text{if } x < 0
\end{cases}
$$

Inline math formula:

Einstein's famous equation: E = mc²

Block math formula:

-∞ e-x² dx = √π

Gaussian integral

Complex math expression:

f(x) = {
x²     if x ≥ 0
-x²    if x < 0
}

Piecewise function

Common math symbols:

α β γ

Greek letters

∑ ∏ ∫

Operators

≤ ≥ ≠

Relations

Code Blocks

# Python code block
```python
def hello_world():
    print("Hello, World!")
    return True
```

# Code block with line numbers
```python {.line-numbers}
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 2*np.pi, 100)
y = np.sin(x)
plt.plot(x, y)
```

Python code block:

def hello_world():
    print("Hello, World!")
    return True

Code block with syntax highlighting:

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 2*np.pi, 100)
y = np.sin(x)
plt.plot(x, y)

MyST Markdown Extensions for Jupyter

Admonitions

```{note}
This is a note box
```

```{warning}
This is a warning box
```

```{tip}
This is a tip box
```

```{important}
This is an important box
```
This is a note box
This is a warning box
This is a tip box
This is an important box

Cross References

# Label definition
(my-label)=
## My Section

# Reference labels
{ref}`my-label`
{ref}`Custom text <my-label>`

# Reference figures
{numref}`figure-{number}`
{ref}`Figure caption <my-figure>`

Label definition:

My Section

Reference labels:

Reference figures:

Figures & Tables

# Figure
```{figure} ./images/example.png
:name: my-figure
:width: 300px

Figure caption text
```

# Table
```{list-table} Table title
:header-rows: 1
:name: my-table

* - Column 1
  - Column 2
* - Row 1 Col 1
  - Row 1 Col 2
* - Row 2 Col 1
  - Row 2 Col 2
```

Figure:

Example
Figure caption text

Table title:

Column 1Column 2
Row 1 Col 1Row 1 Col 2
Row 2 Col 1Row 2 Col 2

Advanced Jupyter Markdown Features

HTML Blocks

# Colored alert boxes
Tip: Use blue boxes for tips and information
Warning: Use yellow boxes for warnings
Success: Use green boxes for success messages
Danger: Use red boxes for danger warnings
Tip: Use blue boxes for tips and information
Warning: Use yellow boxes for warnings
Success: Use green boxes for success messages
Danger: Use red boxes for danger warnings

Internal Links

# Link to section
[Section Title](#section-title)

# Section link with ID

[Section Title](#section_ID)

# Link to other page
[Other Page](other-page.md)

Example Section Title

This is an example section that can be linked to.

External page link:

Other Page

Special Characters

# Geometric shapes
→ (→)
← (←)
↑ (↑)
↓ (↓)
★ (★)
☆ (☆)
♠ (♠)
♣ (♣)
♥ (♥)
♦ (♦)

# Mathematical symbols
≤ (≤)
≥ (≥)
≠ (≠)
∞ (∞)
∑ (∑)
∏ (∏)
√ (√)

Geometric shapes:

Mathematical symbols:

Line Breaks

# Force line break
This is the first line
This is the second line # Horizontal rules *** --- ___

Force line break:

This is the first line
This is the second line

Horizontal rules:




Jupyter Notebook Markdown Tables

Basic Table

| Header1 | Header2 | Header3 |
|---------|---------|---------|
| Row1Col1 | Row1Col2 | Row1Col3 |
| Row2Col1 | Row2Col2 | Row2Col3 |
Header1Header2Header3
Row1Col1Row1Col2Row1Col3
Row2Col1Row2Col2Row2Col3

Aligned Table

| Left Align | Center Align | Right Align |
|:-----------|:------------:|------------:|
| Left       | Center       | Right       |
| Content    | Content      | Content     |
Left AlignCenter AlignRight Align
LeftCenterRight
ContentContentContent

Jupyter Notebook Markdown Quick Reference

Bold Text
**text**
Make text bold
Italic Text
*text*
Emphasize text
Inline Code
`code`
Highlight code
Math Formula
$formula$
Inline math expression
Block Formula
$$formula$$
Block math formula
Code Block
```python code ```
Multi-line code display
Link
[text](URL)
Create hyperlink
Image
![alt](imageURL)
Insert image
Header
## Header
Create section header
List
- item
Unordered list item
Table
| Col1 | Col2 | |-----|-----|
Create table structure
Admonition
```{note} content ```
MyST admonition box

Frequently Asked Questions (FAQ)

Jupyter Notebook Markdown Cheat Sheet Reference Guide

Jupyter Notebook Markdown syntax overview

How to display mathematical formulas in Jupyter?

Use LaTeX syntax with inline formulas surrounded by $...$ and block formulas by $$...$$. Jupyter automatically renders math formulas using MathJax.

Why is my table not displaying correctly?

Ensure proper table format: each row must have the same number of columns, and there must be a separator row (|---|---|---) between header and data rows.

How to insert code blocks in Markdown?

Use three backticks ``` to surround code. You can specify a language for syntax highlighting, for example ```python.

What's the difference between MyST Markdown and regular Markdown?

MyST Markdown is an extension of Markdown that supports additional features like cross-references, admonitions, directives, etc., primarily used for technical documentation and academic publishing.