1.1. MyST Markdown

For a comprehensive cheat sheet, see the official documentation.

Here is provided a short overview of some useful basics.

1.1.1. Equations

You can write LaTeX equations either inline, such as \(x^2 + y^2 = r^2\), or in display mode with

(1.1)\[G_{\mu\nu} + \Lambda g_{\mu\nu} = \frac{8 \pi G}{c^4} T_{\mu\nu}.\]

Note that either fenced sections (three back-ticks or :::) or double dollar signs ($$) can be used to denote display math. In the prior case, equations can be assigned a label with

:::{math}
:label: my_equation
:::

and referenced (1.1).

1.1.2. Admonitions

Admonitions are richly formatted HTML objects, defined similarly to code blocks. To insert, for example, a note box into your content, you can use

```{note}
Here is a note
```

This results in:

Note

Here is a note

Alternatively, for a warning

```{warning}
Here is a dangerous warning.
```

This results in:

Warning

Here is a dangerous warning.

1.1.3. Using roles

Roles are very similar to directives, but they are less-complex and written entirely on one line. You can insert a role into your book’s content with this pattern:

Some content {rolename}`and here is my role's content!`

Again, roles will only work if rolename is a valid role’s name. For example, the doc role can be used to refer to another page in your book. You can refer directly to another page by its relative path. For example, the role syntax {doc}`intro` will result in: Writing expressive content.

For more information on writing roles, see the MyST documentation.

1.1.3.1. Adding a citation

You can also cite references that are stored in a bibtex file. For example, the following syntax: {cite}`holdgraf_evidence_2014` will render like this: [HdHPK14].

Moreover, you can insert a bibliography into your page with this syntax: The {bibliography} directive must be used for all the {cite} roles to render properly. For example, if the references for your book are stored in references.bib, then the bibliography is inserted with:

```{bibliography}
```

Resulting in a rendered bibliography that looks like:

HdHPK14

Christopher Ramsay Holdgraf, Wendy de Heer, Brian N. Pasley, and Robert T. Knight. Evidence for Predictive Coding in Human Auditory Cortex. In International Conference on Cognitive Neuroscience. Brisbane, Australia, Australia, 2014. Frontiers in Neuroscience.