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.

Tutorial 3: Rich Outputs — Figures, Math, Cross-References

Open In Colab Open In Kaggle

Tutorial 3: Rich Outputs

MyST supports a full range of scientific publishing features natively.

Figures with captions

An example figure used to demonstrate the figure directive

Figure 1:A figure with a caption and a label. Reference it elsewhere with Figure 1.

The image lives in images/ next to this page. Paths are relative to the page, which is also the working directory when the page’s code runs.

Where images and data files go

Keep a day’s files in that day’s folder, next to the pages that use them:

tutorials/W1D1_GettingStarted/
  W1D1_Tutorial3.md
  images/example_figure.png     # figures
  data/                         # small data files (create it when you need it)

Math

Inline math: E=mc2E = mc^2

Display math with a label:

∫−∞∞e−x2dx=π\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}

Reference equations: see (1).

Cross-references

Label any heading with (label)= and reference it with the ref role.

This section has a label

Refer back to it anywhere in the book using: ref to sec-crossref-demo.

Matplotlib figures from code

Tables

Column AColumn BColumn C
Value 1Value 2Value 3
Value 4Value 5Value 6

Summary