Markdown Crossrefs

Author

Jane Doe

Published

Invalid Date

TipLearn more

See the full guide on Cross References.

Figures

Markdown

![Elephant](elephant.png){#fig-elephant width=4in}

See @fig-elephant for an illustration.

Output

Figure 1: Elephant

See Figure 1 for an illustration.

Tables

Markdown

| Col1 | Col2 | Col3 |
|------|------|------|
| A    | B    | C    |
| E    | F    | G    |
| A    | G    | G    |

: My Caption {#tbl-letters}

See @tbl-letters.

Output

Table 1: My Caption
Col1 Col2 Col3
A B C
E F G
A G G

See Table 1.

Equations

Markdown

$$
P\left(A=2\middle|\frac{A^2}{B}>4\right)
$$ {#eq-testmath}

See @eq-testmath.

Output

\[ P\left(A=2\middle|\frac{A^2}{B}>4\right) \tag{1}\]

See Equation 1.

Sections

Markdown

# Sections {#sec-sections}

This is a section.

See @sec-sections.

Output

This is a section.

See sec. 1.4.

References

Markdown

@fig-elephant

@Fig-elephant

[Figure @fig-elephant; @eq-testmath]

See table [-@tbl-letters].

Output

Figure 1

Figure 1

Figure 1, Equation 1

See table 1.

Listings

Markdown

``` {#lst-pandas .python lst-cap="Pandas"}
import pandas as pd
d = {'one' : [1., 2., 3., 4.],
     'two' : [4., 3., 2., 1.]}
df = pd.DataFrame(d)
df
```

See @lst-pandas

Output

Listing 1: Pandas
import pandas as pd
d = {'one' : [1., 2., 3., 4.],
     'two' : [4., 3., 2., 1.]}
df = pd.DataFrame(d)
df

See Listing 1

Theorems

Markdown

::: {#thm-line name="Line"}
The equation of any straight line, called a linear equation, can be written as:

$$
y = mx + b
$$
:::

See @thm-line.

Output

Theorem 1 (Line) The equation of any straight line, called a linear equation, can be written as:

\[ y = mx + b \]

See Theorem 1.