From 508fd7e8a1197e626dd13eb776d5f4a66e5c4d16 Mon Sep 17 00:00:00 2001 From: Freek Pols Date: Wed, 5 Jun 2024 13:57:17 +0200 Subject: [PATCH 1/5] chapters --- book/basic-features/jupyterbook.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/book/basic-features/jupyterbook.md b/book/basic-features/jupyterbook.md index 3758da2..2186618 100644 --- a/book/basic-features/jupyterbook.md +++ b/book/basic-features/jupyterbook.md @@ -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,19 @@ parts: - file: section_3_1 et cetera... -``` \ No newline at end of file +``` + +## 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 define by the number of `#`: + +``` +# Chapter 1 title + +## Section 1.1 + +### Subsection 1.1.1 + +## Section 1.2 + +### Subsection 1.2.1 +``` From 44972b3587004c913e734c0b8ee50778ad9e72f8 Mon Sep 17 00:00:00 2001 From: Freek Pols Date: Thu, 13 Jun 2024 10:13:12 +0200 Subject: [PATCH 2/5] edits to reference --- book/basic-features/References.md | 19 ++++++++++++++++++- book/basic-features/equations.md | 6 ++++++ book/basic-features/jupyterbook.md | 15 ++++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/book/basic-features/References.md b/book/basic-features/References.md index d48c47c..8ead841 100644 --- a/book/basic-features/References.md +++ b/book/basic-features/References.md @@ -2,6 +2,23 @@ To make references to figures, equations et cetera, use the following syntax: -- For figures, use: ``{numref}`` `` +- For figures, use: ``{numref}`Figure {number} ` `` - For equations, use: ``{eq}`` `` - For citations, use: ``{cite:p}`` `` for a citation between parenthesis, or ``{cite:t}`` `` for an inline citation. + +**Examples** + +As can be seen in ``{numref}`Figure {number} ` `` (result) {numref}`Figure {number} `, not related to {eq}`` + +```{figure} ../images/git-push.png +--- +width: 50% +name: fig-gitpush +--- +Some caption here +``` + +$$ F = m\cdot a $$(eq:Newton) + + + diff --git a/book/basic-features/equations.md b/book/basic-features/equations.md index 5e680ce..7a08943 100644 --- a/book/basic-features/equations.md +++ b/book/basic-features/equations.md @@ -24,6 +24,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). diff --git a/book/basic-features/jupyterbook.md b/book/basic-features/jupyterbook.md index 2186618..047b3d7 100644 --- a/book/basic-features/jupyterbook.md +++ b/book/basic-features/jupyterbook.md @@ -86,7 +86,7 @@ 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 define by the number of `#`: +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 @@ -99,3 +99,16 @@ The 'nested' structure in the TOC is one way to organize your book. Another way ### 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 +``` \ No newline at end of file From 2b10ff0153cb644f227f2f3d2356179a5473af77 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Thu, 13 Jun 2024 10:25:19 +0200 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d3d93c6..34c44ef 100644 --- a/README.md +++ b/README.md @@ -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) \ No newline at end of file From 4113800074176f8d5fda01bf2de6baef57e33938 Mon Sep 17 00:00:00 2001 From: Freek Pols Date: Thu, 13 Jun 2024 10:29:11 +0200 Subject: [PATCH 4/5] edit reference --- book/basic-features/References.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/book/basic-features/References.md b/book/basic-features/References.md index 8ead841..b5eeaba 100644 --- a/book/basic-features/References.md +++ b/book/basic-features/References.md @@ -8,8 +8,7 @@ To make references to figures, equations et cetera, use the following syntax: **Examples** -As can be seen in ``{numref}`Figure {number} ` `` (result) {numref}`Figure {number} `, not related to {eq}`` - +Using ``{numref}`Figure {number} ` `` produces the output: {numref}`Figure {number} `. ```{figure} ../images/git-push.png --- width: 50% @@ -18,6 +17,8 @@ name: fig-gitpush Some caption here ``` +Or, the derivation results in equation {eq}``. + $$ F = m\cdot a $$(eq:Newton) From 3b1bafe5719d62c88ad2408bbba740451dbf71c2 Mon Sep 17 00:00:00 2001 From: Freek Pols Date: Fri, 14 Jun 2024 12:26:03 +0200 Subject: [PATCH 5/5] Update equations.md --- book/basic-features/equations.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/book/basic-features/equations.md b/book/basic-features/equations.md index 7a08943..89c5a4e 100644 --- a/book/basic-features/equations.md +++ b/book/basic-features/equations.md @@ -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).