Markdown in Quarto

Author

My Name

Published

July 7, 2025

Including BibTex references

There are many ways to manage BibTex references. In ReadCube Papers, you just right-click to select Copy...>BibTex entry and paste it into your BibTex file (I also have a script that formats your entire Papers library for BibTex with meaningful labels).

You can render citations in different ways to accommodate their sentence. Skov et al. reported strong selection on the human X chromosome (2023). Lineages in small populations have shorter coalescence times (see Nielsen and Slatkin 2016, chap. 1). The Neanderthal genome has been sequenced (Prüfer et al. 2012). The X chromosome is subject to recurrent sweeps (Nam et al. 2015; Dutheil et al. 2015). Following Munch et al. (2014), we blah blah…

Illustrations

You can see an elephant in Figure 12.1.

Figure 12.1: Some caption for an illustration showing an elephant

Elephants are big (Figure 12.2):

Figure 12.2

There are two elephants in Figure 12.3. The elephants in Figure 12.3 (a) and Figure 12.3 (b) look similar.

(a)
(b)
Figure 12.3: Some caption you wrote for an illustration of two elephants.

Asides

If you like,

you can make comments in the margin without footnote a reference.

Plot included from notebook

See plot Figure 12.4 below.

Figure 12.4: Figure legends are defined alongside the figure in the notebook. The figure size in the notebook is determines its size when embedded in a document 4x3 inches.

Or this really wide plot below (Figure 12.5).

Figure 12.5: Figure legends are defined alongside the figure in the notebook. The figure size in the notebook is determines its size when embedded in a document 4x3 inches.

Text included from notebook

The 24 subjects from workplaces in Denmark were interviewed …. blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah

Table included from notebook

These were selected to represent as many nationalities as possible (Table 12.1).

you can also allow the table to be wider

Table 12.1: People included in the analysis.
name age sex position nationality
Julie 27 F PhDstudent DK
Thomas 33 M Postdoc GB
Emilie 23 F PhDstudent CH
Sofie 31 F Postdoc DK
Sara 29 F Postdoc US
Cecilie 34 F Postdoc DK
Anders 32 M PhDstudent UK
Emma 42 F Professor DK
Caroline 31 F PhDstudent DK
Laura 30 F Postdoc DK
Mikkel 33 M Postdoc NL
Jens 27 M PhDstudent DK
Andreas 29 M PhDstudent DK
Jakob 28 M PhDstudent DK
Mathilde 61 F Professor DK
Katrine 35 F Postdoc DK
Poul 30 M Postdoc DK
Anna 26 F PhDstudent DK
Peter 42 M Professor GB
Ida 53 F Postdoc DK
Freja 30 F Postdoc DK
Maria 39 F Professor UK
Amalie 29 F PhDstudent DK
Camilla 35 F Postdoc DK

Margin content

You can anything in the margin like Figure 12.6.

Figure 12.6: Figure legends are defined alongside the figure in the notebook. The figure size in the notebook is determines its size when embedded in a document 4x3 inches.

Diagrams

Diagram in Figure 12.7.

Code
graph G {
  layout=neato
  run -- intr;
  intr -- runbl;
  runbl -- run;
  run -- kernel;
  kernel -- zombie;
  kernel -- sleep;
  kernel -- runmem;
  sleep -- swap;
  swap -- runswap;
  runswap -- new;
  runswap -- runmem;
  new -- runmem;
  sleep -- runmem;
}
G run run intr intr run--intr kernel kernel run--kernel runbl runbl intr--runbl runbl--run zombie zombie kernel--zombie sleep sleep kernel--sleep runmem runmem kernel--runmem sleep--runmem swap swap sleep--swap runswap runswap swap--runswap runswap--runmem new new runswap--new new--runmem
(a) This is a simple graphviz graph.
Figure 12.7
Code
flowchart LR
  A[Beginning] --> B[Middle]
  B --> C[End]

flowchart LR
  A[Beginning] --> B[Middle]
  B --> C[End]

Code
flowchart LR
  A[Beginning] --> B[Middle]
  B --> C[End]

flowchart LR
  A[Beginning] --> B[Middle]
  B --> C[End]

This is a flow chart.

Code

Executed but hide code and any output:

Show and execute Python code:

Code
x = 5

Values can be embedded in the text, too. The value of x is 5.

Shown, not executed, Python code:

y = 4

A for loop:

for i in range(10):
    print(i)

Shown, not executed, R code:

z <- 7

Math

This is calculated as \(\pi_k = \prod_{i=1}^K x_i\). You can crossref formulas (Equation 12.1).

\[ \lambda = \sum_{k=1}^N \pi_k \tag{12.1}\]

We know from the first fundamental theorem of calculus that for \(x\) in \([a, b]\):

\[\frac{d}{dx}\left( \int_{a}^{x} f(u)\,du\right)=f(x).\]

Bold and italics

This is bold, so is this. This is italics, so is this. This is both, so is this.

Section

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sagittis posuere ligula sit amet lacinia. Duis dignissim pellentesque magna, rhoncus congue sapien finibus mollis. Ut eu sem laoreet, vehicula ipsum in, convallis erat. Vestibulum magna sem, blandit pulvinar augue sit amet, auctor malesuada sapien. Nullam faucibus leo eget eros hendrerit, non laoreet ipsum lacinia. Curabitur cursus diam elit, non tempus ante volutpat a. Quisque hendrerit blandit purus non fringilla. Integer sit amet elit viverra ante dapibus semper. Vestibulum viverra rutrum enim, at luctus enim posuere eu. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

Subsection

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sagittis posuere ligula sit amet lacinia. Duis dignissim pellentesque magna, rhoncus congue sapien finibus mollis. Ut eu sem laoreet, vehicula ipsum in, convallis erat. Vestibulum magna sem, blandit pulvinar augue sit amet, auctor malesuada sapien. Nullam faucibus leo eget eros hendrerit, non laoreet ipsum lacinia. Curabitur cursus diam elit, non tempus ante volutpat a. Quisque hendrerit blandit purus non fringilla. Integer sit amet elit viverra ante dapibus semper. Vestibulum viverra rutrum enim, at luctus enim posuere eu. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

Subsubsection

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sagittis posuere ligula sit amet lacinia. Duis dignissim pellentesque magna, rhoncus congue sapien finibus mollis. Ut eu sem laoreet, vehicula ipsum in, convallis erat. Vestibulum magna sem, blandit pulvinar augue sit amet, auctor malesuada sapien. Nullam faucibus leo eget eros hendrerit, non laoreet ipsum lacinia. Curabitur cursus diam elit, non tempus ante volutpat a. Quisque hendrerit blandit purus non fringilla. Integer sit amet elit viverra ante dapibus semper. Vestibulum viverra rutrum enim, at luctus enim posuere eu. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.