mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 06:35:52 +00:00
29 lines
No EOL
1,007 B
Markdown
29 lines
No EOL
1,007 B
Markdown
# Exercise 8: Add a figure/gif/video
|
|
|
|
Now let's add a figure. If you want to add a figure/gif/video to you book, you can refer to another website. This is quite handy for video's but it does carry the risk that this figure/gif/video will no longer be visible if the location is changed.
|
|
|
|
|
|
|
|
|
|
|
|
So it is better to add the source directly to the book. So you first need to upload a figure to GitHub and then reference that figure in our file. (Note: later this becomes much easier).
|
|
|
|
|
|
```{figure} figures/HubUser3_EditFile2.PNG
|
|
---
|
|
width: 80%
|
|
align: center
|
|
---
|
|
Commit changes
|
|
```
|
|
|
|
6. In case you added a new file, you also need to include it table of contents of your book! The table of contents is specified in a file called `toc.yml` and it is already included in your repository if you used the teachbooks template. You can edit it and commit the changes in the same manner as with markdown `(file.md)` files.
|
|
|
|
```{figure} figures/HubUser3_toc.PNG
|
|
---
|
|
width: 80%
|
|
align: center
|
|
---
|
|
Table of contents
|
|
```
|
|
```` |