mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 14:45:52 +00:00
Update 009.md
This commit is contained in:
parent
36cd954095
commit
2d74872a6e
1 changed files with 21 additions and 20 deletions
|
|
@ -1,9 +1,7 @@
|
||||||
# Exercise 9: Cross-referencing content
|
In this exercise, you will learn how to create references to other parts of your book, such as chapters, sections, equations, tables, figures, and links.
|
||||||
|
|
||||||
In this exercise, you will learn how to create references to other parts of your book, such as chapters, sections, equations, tables, and figures.
|
|
||||||
|
|
||||||
::::::{topic} Exercise objective
|
::::::{topic} Exercise objective
|
||||||
Can you create internal references to other sections, equations, tables, and figures?
|
Can you create internal references to other sections, equations, tables, figures, and links?
|
||||||
::::::
|
::::::
|
||||||
|
|
||||||
```{tip}
|
```{tip}
|
||||||
|
|
@ -55,15 +53,19 @@ Then, you can reference this section in three ways:
|
||||||
```
|
```
|
||||||
This will display: My favourite exercise was [this one](exercise_1).
|
This will display: My favourite exercise was [this one](exercise_1).
|
||||||
|
|
||||||
|
These three referencing methods can also be used for referencing equations, tables and figures.
|
||||||
|
|
||||||
## 2. Referencing an Equation
|
## 2. Referencing an Equation
|
||||||
|
|
||||||
To reference an equation, you need to define a label using `{eq}` and refer to it elsewhere in your text:
|
To reference an equation, you need to define a label using `{eq}` and refer to it elsewhere in your text:
|
||||||
|
|
||||||
```md
|
```md
|
||||||
|
|
||||||
```{math}
|
```{math}
|
||||||
:label: eq-example
|
:label: eq-example
|
||||||
E = mc^2
|
E = mc^2
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then reference this equation using:
|
You can then reference this equation using:
|
||||||
|
|
@ -72,8 +74,6 @@ You can then reference this equation using:
|
||||||
Equation {eq}`eq-example`
|
Equation {eq}`eq-example`
|
||||||
```
|
```
|
||||||
|
|
||||||
This will display: Equation {eq}`eq-example`.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 3. Referencing a Table
|
## 3. Referencing a Table
|
||||||
|
|
@ -95,6 +95,7 @@ And refer to it using:
|
||||||
Table {numref}`tab-example`
|
Table {numref}`tab-example`
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## 4. Referencing a Figure
|
## 4. Referencing a Figure
|
||||||
|
|
||||||
To reference a figure, label it when inserting it:
|
To reference a figure, label it when inserting it:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue