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,6 +15,7 @@ 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. 5. Copy this syntax and adjust the file name, width, alignment and caption.
```md
```{figure} figures/<new_figure>.PNG ```{figure} figures/<new_figure>.PNG
--- ---
width: 80% width: 80%
@ -23,6 +24,7 @@ To help you illustrate your content, it can be sueful to add some type of visual
--- ---
<caption> <caption>
``` ```
```
```{Warning} ```{Warning}
Make sure the file extension of your figure is correct because markdown differentiates capital letters! 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. 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)= (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: * You can use the standard title text which will be the title after the target header
* If you want to refernce in line you can use:
My favourite exercise was {ref}`exercise_1`. My favourite exercise was {ref}`exercise_1`.
``` ```
My favourte 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)