Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Markdown (Cheat sheet)

Updated: 23 Mar 2026

Below is a set of frequently used markdown commands for Jupyter Book 2 made with MyST. A good practice is to download the source file by clicking the download icon at the top right of this page and inspect the code.

Book structure

We can distinguish between two structures: that of the book’s content (a collection of different documents), and the (internal) structure of the chapters which consists of content structured in sections and subsections.

Table of Contents

In the myst.yml file, you can specify the structure of the book as shown in Figure 1. Here you can indicate which files belong to the book and in what order. You can also create dropdown menus. When not specifying a ToC, all files are automatically included in alphabetical order.

The Table of Contents (ToC) for this book.

Figure 1:The Table of Contents (ToC) for this book.

If you create a new file, you need to add it to the myst.yml file to include it in the book.

Chapters, sections and subsections

To distinguish between chapter, section, and subsection (and further), use a number of # symbols, as shown below.

# H1 chapter  
## H1.1 section   
### H1.1.3 subsection  

Basic Formatting

Markdown is a markup language where text formatting is done with small pieces of code (just like HTML). This is a table with some frequently used formatting options.

ElementSyntaxExample
Bold**bold text**Bold
Italic*italics*Italics
Emphasis***emphasis***emphasis
Inline Formula$F = m \cdot a$F=maF = m \cdot a
Footnote - A footnote reference[^myref]
[^myref]: This is an auto-numbered footnote definition.
- A footnote reference[1]

You can create a new line by either a hard enter and a blank line, a \ at the end of the line and enter, or two spaces at the end of the line.

New Line

Generally, in markdown, a single hard enter does not create a new line. You need to use one of the options below.

ways for a new line
syntax

A new line with double space.
A new line with a \.
A new line with a hard enter and blank line.

No new line with just a hard enter and text on the next line. Like this

Equations & Symbols

For STEM subjects, mathematical equations and symbols (Δλ\Delta \lambda) are essential. You can include equations in JB’s. What is possible in LaTeX is also possible in JB, for example:

Fres=maF_{res} = m \cdot a

Where labeled equations, such as (1), can be referenced.

$$ Equation $$ (<label>)

But you can also include inline equations like this: s=vavgts=v_{avg}t. Use a single dollar sign before and after: $ Equation $

NameScriptSymbols
root\sqrt{4}4\sqrt{4}
power^{2x}2x^{2x}
fraction\frac{2}{3}23\frac{2}{3}
subscript_{avg}avg_{avg}
superscript^{N}N^{N}
multiply\cdot\cdot

Some examples:

NameScriptOutput
Derivative\frac{\Delta f}{\Delta t}ΔfΔt\frac{\Delta f}{\Delta t}
Integral\int_a^b dxabdx\int_a^b dx
sinesin(x)sin(x)sin(x)

More: https://en.wikibooks.org/wiki/LaTeX/Mathematics

Lists & tables

Lists Option 1

list
syntax
  1. item 1

  2. item 2.

  3. item 3.

Lists Option 2

list
syntax
  1. item 1

  2. item 2.

  3. item 3.

Tables

Tables are created with the separator |

Tables
MyST Syntax
|Header 1|Header 2|Header 3|
|---|---|---|
|text 1|text 2|text 3|
|text 4|text 5|text 6|

Or via ...

Tables
MyST Syntax

Table 1:Overview of sanctions for certain behavior

Behavior

  • Sanction for 1st time

  • Sanction for 2nd time

Not (timely or with a valid reason) deregistered

  • A penalty

  • exclusion

Method 2 has the advantage of allowing references to Table 1

Tabs

::::{tab-set}
:::{tab-item} Tab 1
Text in tab 1
:::

:::{tab-item} Tab 2
Text in tab 2
:::
::::

Will create this tab:

Tab 1
Tab 2

Text in tab 1

Checklists

list
syntax
  • Create a markdown cheat sheet

  • Publish online

  • Let others test

Admonitions

You can add special blocks that are highlighted in the text. See, for example, the warning below.

Created using:

```{warning}    
Here is a warning
```

There are different variants such as:

Exercises

A special case is the exercises which can be labeled and can come with a solution that is linked to the exercise:

Solution to Exercise 1

6

Figures

A site/book naturally needs figures. There are roughly two ways to add a figure:

Quick figure, without formatting options

| Quick figure | ![](link to figure) |

Better way with more control:

Figures
MyST Syntax
With a nice caption

Figure 2:With a nice caption

Here we used figures hosted online, but you can also add figures to a folder (e.g., called Figures), and then use a relative path.

YouTube

To embed YouTube videos on the site, you need the embed YT link. The code is then:

YouTube
syntax

A super fun video from the project Show the Physics

References & Links

You can included links like this. With the markdown syntax: [text](link).

It also possible to include reference through the reference.bib file, or directly by including the DOI: Pols (2021) (syntax: [](https://doi.org/10.1088/1361-6552/abf208)) or Pols, 2021 (syntax: [@doi:10.1088/1361-6552/abf208]).

Below a few examples of links and references to labeled items.

list
syntax
  • This is a hyperlink

  • This is a reference to equation (1)

  • This is a reference to a table like Table 1

  • This is a reference to a figure like Figure 2

Footnotes
  1. This is an auto-numbered footnote definition.

References
  1. Pols, F. (2021). What’s inside the pink box? A nature of science activity for teachers and students. Physics Education, 56(4), 045004. 10.1088/1361-6552/abf208
  2. Pols, F. (2021). What’s inside the pink box? A nature of science activity for teachers and students. Physics Education, 56(4), 045004. 10.1088/1361-6552/abf208