mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 14:45:52 +00:00
updates
This commit is contained in:
parent
4e3cb2a017
commit
0c4af84481
6 changed files with 70 additions and 13 deletions
|
|
@ -1,2 +1,34 @@
|
|||
# Ninth exercises
|
||||
kdjb
|
||||
# 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>)=
|
||||
|
||||
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.
|
||||
|
||||
```
|
||||
(exercise_1)=
|
||||
# Exercise 1: First file edit
|
||||
|
||||
Let's start with the most basic edit: add some text to a file and see that the website is updated...
|
||||
|
||||
```
|
||||
|
||||
3. Referncing
|
||||
|
||||
There are three types of referencing
|
||||
|
||||
If you want to refernce in line you can use:
|
||||
|
||||
My favourte exercise was {ref}`exercise_1`.
|
||||
|
||||
```
|
||||
My favourte exercise was {ref}`exercise_1`.
|
||||
```
|
||||
You can specify the text of the target:
|
||||
|
||||
{ref}`MyST syntax lecture <exercise_1>`
|
||||
|
||||
Another alternative is to use Markdown syntax:
|
||||
|
||||
[MyST syntax lecture](exercise_1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue