mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 14:45:52 +00:00
user type 4
This commit is contained in:
parent
1cb5bde1b0
commit
437bedb142
6 changed files with 26 additions and 19 deletions
|
|
@ -1,10 +1,14 @@
|
|||
# Exercise 9: Referencing using target headers
|
||||
|
||||
It can be really useful to refer to a specific section in your book while working in a different file. Referencing can be done using target headers. (<title>)=
|
||||
It can be really useful to refer to a specific section in your book while working in a different file. Referencing can be done using target headers such as:
|
||||
|
||||
```
|
||||
(<title>)=
|
||||
```
|
||||
|
||||
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 ebtween bracketsfor example exercise_1.
|
||||
2. Identify the section you want to reference and name it between brackets for example `exercise_`1.
|
||||
|
||||
```
|
||||
(exercise_1)=
|
||||
|
|
@ -14,21 +18,21 @@ Let's start with the most basic edit: add some text to a file and see that the w
|
|||
|
||||
```
|
||||
|
||||
3. Referncing
|
||||
3. Referencing
|
||||
|
||||
There are three types of referencing
|
||||
There are three types of referencing:
|
||||
|
||||
If you want to refernce in line you can use:
|
||||
* If you want to refernce in line you can use:
|
||||
|
||||
My favourte exercise was {ref}`exercise_1`.
|
||||
My favourite exercise was {ref}`exercise_1`.
|
||||
|
||||
```
|
||||
My favourte exercise was {ref}`exercise_1`.
|
||||
```
|
||||
You can specify the text of the target:
|
||||
* You can also specify the in-line text of the target (aka what the link will say):
|
||||
|
||||
{ref}`MyST syntax lecture <exercise_1>`
|
||||
{ref}`Best exercise <exercise_1>`
|
||||
|
||||
Another alternative is to use Markdown syntax:
|
||||
* Another alternative is to use Markdown syntax:
|
||||
|
||||
[MyST syntax lecture](exercise_1)
|
||||
[Best exercose](exercise_1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue