Merge branch 'main' into 'publish'

Main

See merge request interactivetextbooks-citg/jupyter-book-manual!88
This commit is contained in:
Tom van Woudenberg 2024-06-14 15:06:47 +02:00
commit 82b471d585
4 changed files with 61 additions and 3 deletions

View file

@ -4,6 +4,6 @@ A short introduction to Git, VSCode and Jupyter Books for teachers and TA's. Cur
## Contributing
Feedback is always welcome. If something doesn't work, or if you have suggestions, you can always make an issue on the Issue Board or make a Merge Request.
Feedback is always welcome. If something doesn't work, or if you have suggestions, you can always make an issue on the Issue Board or make a Merge Request. If you create a branch, that branch will also be visible on the mirrored repository on GitHub to ease reviewing: https://github.com/TeachBooks/mirror_teachbook_manual/actions
If you've questions, contact Tom van Woudenberg, Robert Lanzafame or our TAs Julie Kirsch at TeachBooks@tudelft.nl, also for non-TU Delft account holders. TU Delft account holder can also contact us in the [MS Teams Open Interactive Textbooks Community](https://teams.microsoft.com/l/team/19%3Ah9-uRcP_yYauh-VuoPFozJVUvHVOB4a0mz1ZWvh4q4Q1%40thread.tacv2/conversations?groupId=3e88c1f3-4a4f-483a-a366-7e617de9ba99&tenantId=096e524d-6929-4030-8cd3-8ab42de0887b)

View file

@ -2,6 +2,24 @@
To make references to figures, equations et cetera, use the following syntax:
- For figures, use: ``{numref}`<name of the figure>` ``
- For figures, use: ``{numref}`Figure {number} <name of the figure>` ``
- For equations, use: ``{eq}`<equation label>` ``
- For citations, use: ``{cite:p}`<bibtex_entry>` `` for a citation between parenthesis, or ``{cite:t}`<bibtex_entry>` `` for an inline citation.
**Examples**
Using ``{numref}`Figure {number} <fig-gitpush>` `` produces the output: {numref}`Figure {number} <fig-gitpush>`.
```{figure} ../images/git-push.png
---
width: 50%
name: fig-gitpush
---
Some caption here
```
Or, the derivation results in equation {eq}`<eq:Newton>`.
$$ F = m\cdot a $$(eq:Newton)

View file

@ -14,6 +14,12 @@ $$
F = m \cdot a
$$
```{tip}
The scientific rules dictate that quantities ($F$, $m$, $a$ etc.) should be printed in italics. Units, however, should not! One can use `\text{m}` in an equation to comply to this rule:
$$ F = m \cdot a = 10 \cdot 9.81 = 98 \text{N}
```
> **Warning**
>
> Make sure there is a blank line *before* the display mode equations, otherwise it will render as inline and display the outer set of $$$ symbols. Also, the Euro symbol is not included in MathJax (see note below) and must be specified using `\unicode{0x20AC}` (note that it displays incorrectly in some Markdown renderers like VS Code).
@ -24,6 +30,12 @@ To number the equations and refer in text, you need to provide a label to the eq
F = m \cdot a
$$ (newtons_second_law)
Resulting in:
$$
F = m \cdot a
$$ (newtons_second_law)
> **Note**
>
> The Jupyter Book uses MathJax to display equations, which provides some LaTeX-like functionality, but not all! For example, the Euro symbol is missing, and packages like `siunitx` are not available (hint, use `\textrm{}` and `\textrm{}`). When something is not working, it's useful to search for MathJax-specific solutions (hint, include "mathjax" in your Google search).

View file

@ -7,7 +7,7 @@ To build a Jupyter Book, you need three things:
3. Content
## The configuration file
The configuration file of Jupyter Books is named `_config.yml`. It mainly contains settings that apply when building the book. Here is a basic example of a configuration file, taken from this book:
The configuration file of Jupyter Books is named `_config.yml`. It mainly contains settings that apply when building the book. Here is a basic example of a configuration file, taken from this book:
```yml
title: Jupyter Book Manual
@ -83,4 +83,32 @@ parts:
- file: section_3_1
et cetera...
```
## The structure of a chapter
The 'nested' structure in the TOC is one way to organize your book. Another way to do so is in the file itself. The structure is defined by the number of `#`:
```
# Chapter 1 title
## Section 1.1
### Subsection 1.1.1
## Section 1.2
### Subsection 1.2.1
```
The depth for numbered subsection can be set in the TOC file:
```
parts:
- caption: Part 1
numbered: 2
chapters:
- file: chapter_1
sections:
- file: section_1_1
- file: section_1_2
```