referencing

This commit is contained in:
Julie Kirsch 2025-03-03 23:14:03 +01:00
parent 437bedb142
commit d4a2b8d60e
2 changed files with 26 additions and 17 deletions

View file

@ -15,14 +15,16 @@ To help you illustrate your content, it can be sueful to add some type of visual
5. Copy this syntax and adjust the file name, width, alignment and caption.
```{figure} figures/<new_figure>.PNG
---
width: 80%
align: center
name: my_new_figure
---
<caption>
```
```md
```{figure} figures/<new_figure>.PNG
---
width: 80%
align: center
name: my_new_figure
---
<caption>
```
```
```{Warning}
Make sure the file extension of your figure is correct because markdown differentiates capital letters!

View file

@ -8,7 +8,7 @@ It can be really useful to refer to a specific section in your book while worki
1. Navigate to the file you want to work in (for example `book/some_content/overview.md`) and make sure you're in the correct branch.
2. Identify the section you want to reference and name it between brackets for example `exercise_`1.
2. Identify the section you want to reference and name it between brackets for example `exercise_1`.
```
(exercise_1)=
@ -18,21 +18,28 @@ Let's start with the most basic edit: add some text to a file and see that the w
```
3. Referencing
3. There are three types of referencing:
There are three types of referencing:
* If you want to refernce in line you can use:
* You can use the standard title text which will be the title after the target header
My favourite exercise was {ref}`exercise_1`.
```
My favourte exercise was {ref}`exercise_1`.
```
* You can also specify the in-line text of the target (aka what the link will say):
* You can also specify the title text of the target header (aka specify what the link will say):
{ref}`Best exercise <exercise_1>`
My favourite exercise was {ref}`the first one <exercise_1>`.
* Another alternative is to use Markdown syntax:
```
My favourite exercise was {ref}`the first one <exercise_1>`.
```
* You can also use Markdown syntax, then the title text is also fully customizable.
My favourite exercise was [this one](exercise_1).
```
My favourite exercise was [this one](exercise_1).
```
[Best exercose](exercise_1)