Markdown basics#
Whether you write your book’s content in Jupyter Notebooks (.ipynb
) or
in regular markdown files (.md
), you’ll write in the same flavor of markdown
called MyST Markdown.
This is a simple file to help you get started and show off some syntax.
What is MyST?#
MyST stands for “Markedly Structured Text”. It gives us those little boxes with notes and warnings, and some other useful and interactive content types.
In practice this means that your content will not be rendered very nicely in GitHub, so it always needs to be checked that things look correctly in the Handbook.
For more about MyST, see the MyST Markdown Overview.
Simple elements of Markdown files#
Headers#
Headers are not just big letters. JupyterBook uses headers to create the table of content for every page.
Hint
Take a look at the top right and you will see the content of this page! 🧑🏫 It is created using all the headers.
You can also use them in the link to send someone exactly the part of the page you want them to look. For example, Clicking on this link 👉 https://climaax.github.io/crabook-test/markdown.html#bold-italic-text-links-and-lists will take you down to the part of this page about bold and italic text.
Syntax |
Example |
Note |
---|---|---|
# Heading level 1
## Heading level 2
### Heading level 3
#### Heading level 4
##### Heading level 5
###### Heading level 6
|
# MyST Cheat Sheet
|
Level 1-6 headings, denoted by number of |
This is all much better explained in the Jupyter Book documentation
Bold and italic text#
You make the text **bold** by putting it between **.
You make the text *italic* by putting it betweeen *.
Result:
You make the text bold by putting it between **.
You make the text italic by putting it betweeen *.
Lists#
List is created using dash line - :
- First element
- Second element
- Third element
Results in:
First element
Second element
Third element
Links#
Links are done by putting the text under [] and target under ().
Syntax |
Example |
Result |
---|---|---|
[text](target)
|
[CLIMAAX website](https://climaax.eu)
|
|
[text](relative_path)
|
[CRA datasets](../CRA_steps/analysis/datasets)
|
|
[text](target "title")
|
[CLIMAAX website](https://climaax.eu "The main webiste of CLIMAAX project")
|
Code blocks#
Code and syntax highlighting#
Example:
```python
note = "Python syntax highlighting"
print(note)
```
Result:
note = "Python syntax highlighting"
print(note)
Learn more#
This is just a simple starter to get you started.
See also
You can learn a lot more at jupyterbook.org.
You can play around in this sandbox page in MyST markdown documentation
You can also use this handy cheat sheet