mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 06:35:52 +00:00
referencing
This commit is contained in:
parent
437bedb142
commit
d4a2b8d60e
2 changed files with 26 additions and 17 deletions
|
|
@ -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.
|
5. Copy this syntax and adjust the file name, width, alignment and caption.
|
||||||
|
|
||||||
```{figure} figures/<new_figure>.PNG
|
```md
|
||||||
---
|
```{figure} figures/<new_figure>.PNG
|
||||||
width: 80%
|
---
|
||||||
align: center
|
width: 80%
|
||||||
name: my_new_figure
|
align: center
|
||||||
---
|
name: my_new_figure
|
||||||
<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!
|
||||||
|
|
|
||||||
|
|
@ -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)
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue