diff --git a/README.md b/README.md index 7fbbb6e..a1d2881 100644 --- a/README.md +++ b/README.md @@ -85,3 +85,20 @@ Set the repository website as your GitHub Pages website under {octicon}`code;1em ## Contribute This tool's repository is stored on [GitHub](https://github.com/TeachBooks/template). The `README.md` of the branch `manual_description` is also part of the [TeachBooks manual](https://teachbooks.io/manual/external/template/README.html) as a submodule. If you'd like to contribute, you can create a fork and open a pull request on the [GitHub repository](https://github.com/TeachBooks/template). To update the `README.md` shown in the TeachBooks manual, create a fork and open a merge request for the [GitHub repository of the manual](https://github.com/TeachBooks/manual). If you intent to clone the manual including its submodules, clone using: `git clone --recurse-submodulesgit@github.com:TeachBooks/manual.git`. + +## Template README +> Remove all of the above after you've taken this template and followed the instructions. The following lines are a template for your own README + +# `` + +`` + +## Contributors +- `` + +## Reuse content +Feel free to reuse this content or contribute to it. Please give appropriate credit, provide a link to the license, and indicate if changes were made ([CC BY 4.0 License](https://creativecommons.org/licenses/by/4.0/)) + +The website (http://oit.tudelft.nl/Macaulays-method/) is created using the [TeachBooks Python package](https://github.com/TeachBooks/TeachBooks). To recreate it you have two options (more information in the [TeachBooks manual](https://teachbooks.io/manual/): +- In the GitHub interface: fork this repository, enable Github Pages from the source GitHub actions (Settings - Code and automation - Pages - Build and deployment - Source - GitHub Actions), enable workflows (Actions - I understand my workflows, go ahead and enable them) and run the call-deploy-book workflow (Actions - call-deploy-book - Run workflow - Run workflow). The website is released on the URL as shown on the workflow summary when the workflow has finished (Actions - call-deploy-book - call-deploy-book - Summary). +- On your own computer: clone this repository, install the required packages (`pip install -r requirements.txt`) and build the book (`teachbooks build book`). The website is stored locally in `book/_build/index.html`. diff --git a/WAIVER b/WAIVER index c679280..0099e6d 100644 --- a/WAIVER +++ b/WAIVER @@ -1,4 +1,7 @@ Technische Universiteit Delft hereby disclaims all copyright interest in the -program “TeachBooks Template” (a GitHub template repository to ease the +program "TeachBooks Template" (a GitHub template repository to ease the creation of TeachBooks) written by the Author(s). Stefan Aarninkhof, Dean of Civil Engineering & Geosciences + +This waiver does not claim copyright interest of repositories which used +the "TeachBooks Template" with a copy of this file. diff --git a/book/_config.yml b/book/_config.yml index 875faaf..8fbad43 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -1,5 +1,5 @@ title: TeachBooks template # Replace this with your own book title -author: TeachBooks Team, built with TeachBooks and Jupyter Book, CC BY 4.0 +author: TeachBooks Team, built with TeachBooks, CC BY 4.0 # Replace TeachBooks Teams with your own name in the line above execute: diff --git a/book/credits.md b/book/credits.md index 4363c3f..0daf82e 100644 --- a/book/credits.md +++ b/book/credits.md @@ -12,8 +12,11 @@ You can refer to individual chapters or pages within this book as: We anticipate that the content of this book will change significantly. Therefore, we recommend using the source code directly with the citation above that refers to the GitHub repository and lists the date and name of the file. Although content will be added over time, chapter titles and URL's in this book are expected to remain relatively static. However, we make no guarantee, so if it is important for you to reference a specific location/commit within the book. ## How the book is made +This website is written in markdown and jupyter notebooks files, which are converted to html using tools from [TeachBooks](https://teachbooks.io/). The files are stored on a [public GitHub repository](``). The website can be viewed at ``. -This book is created using open source tools: it is a JupyterBook that is written using Markdown and Jupyter notebooks. Additional tooling is used from the [TeachBooks initiative](https://teachbooks.io/) to enhance the editing and reading experience. The files are stored on a [public GitHub repository](``). The website can be viewed at ``. View the repository README file or contact the authors for additional information. +To recreate the website you have two options (more information in the [TeachBooks manual](https://teachbooks.io/manual/): +- In the GitHub interface: fork this repository, enable Github Pages from the source GitHub actions (Settings - Code and automation - Pages - Build and deployment - Source - GitHub Actions), enable workflows (Actions - I understand my workflows, go ahead and enable them) and run the call-deploy-book workflow (Actions - call-deploy-book - Run workflow - Run workflow). The website is released on the URL as shown on the workflow summary when the workflow has finished (Actions - call-deploy-book - call-deploy-book - Summary). +- On your own computer: clone this repository, install the required packages (`pip install -r requirements.txt`) and build the book (`teachbooks build book`). The website is stored locally in `book/_build/index.html`. ## License This book is [CC BY 4.0 licensed](https://creativecommons.org/licenses/by/4.0/) allowing you to share and adapt the material, as long as the source is named. External resources that are reused in this book are listed below. diff --git a/book/syntax_exercises/009.md b/book/syntax_exercises/009.md index c47122d..9598393 100644 --- a/book/syntax_exercises/009.md +++ b/book/syntax_exercises/009.md @@ -72,13 +72,48 @@ The displacement can be found using the equation $s = v \cdot t$. 10. Test your understanding by adding a new equation of your choice, ideally one that requires many LaTex symbols! -11. When you are ready, commit your changes to the repository by clicking on the green `Commit changes` button. -12. Add a commit message. +## Adding colours to equations -13. To see your changes, go to {octicon}`play` `Actions` - The most recent workflow run `overview.md / the commit message of the commit you just made` - Wait for it to finish - In the summary, click on the link of your book shown in the table `Branches deployed` and under `Primary book at root` (getting bored of waiting? There'll be exercising on doing this locally which prevents you from waiting). +11. The TeachBooks template includes the `sphinx-named-colors` extension, which lets you add colours to parts of your equations using LaTeX. Look at the [CSS named colours](https://developer.mozilla.org/en-US/docs/Web/CSS/named-color) to explore the possible colour options. -14. Do you see your change? If you don't see it click `CTRL`+`F5`/`Control`+`F5`to refresh the page. +12. It is also possible to use custom colours! Look [here](https://teachbooks.io/manual/external/Sphinx-Named-Colors/README.html#) for documentation about the TeachBook extension which allows custom colours. + +13. Colours are added to equations using `\namedcolour{...}`, replacing `namedcolour` with the colour of choice. Test this out with the examples in the table below: + +::::{list-table} +:widths: auto +:header-rows: 1 + * - Color + - $\LaTeX$ Code + * - olive + - `\olive{\int_a^bf(x)dx}` + * - hotpink + - `1.\hotpink{\mathbf{49}}` + * - darkturquoise + - `\dfrac{\darkturquoise{\partial}f}{\darkturquoise{\partial}x}` +:::: + + +14. For colours with hyphens we use need to use the class-based command `\class{named-colour}{...}. Try this using the format shown below: + +```md +$$ \class{hyphen-color}{\sum}_{n=1}^\infty $$ +``` + +15. Test your understanding by creating a block equation where each term is a different colour! + +```{tip} +This is especially helpful for highlighting changes between equations or focusing attention on specific terms! +``` + +16. When you are ready, commit your changes to the repository by clicking on the green `Commit changes` button. + +17. Add a commit message. + +18. To see your changes, go to {octicon}`play` `Actions` - The most recent workflow run `overview.md / the commit message of the commit you just made` - Wait for it to finish - In the summary, click on the link of your book shown in the table `Branches deployed` and under `Primary book at root` (getting bored of waiting? There'll be exercising on doing this locally which prevents you from waiting). + +19. Do you see your change? If you don't see it click `CTRL`+`F5`/`Control`+`F5`to refresh the page. ```{admonition} Check your understanding