From 74b4b27f11bc405c5faa6931333b6519d5757a73 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Thu, 19 Dec 2024 09:54:54 +0100 Subject: [PATCH 01/23] move exercise in template --- book/external/template | 2 +- book/intro/template.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/book/external/template b/book/external/template index 6bacc35..1ea38ab 160000 --- a/book/external/template +++ b/book/external/template @@ -1 +1 @@ -Subproject commit 6bacc354c7e924ee91dd462abbd23eecf0d154ea +Subproject commit 1ea38abf8b30e9076fe315d258655ecf679e4bf2 diff --git a/book/intro/template.md b/book/intro/template.md index c84e81c..c45f4e1 100644 --- a/book/intro/template.md +++ b/book/intro/template.md @@ -28,7 +28,7 @@ Go to the [TeachBooks Template repository on GitHub](https://github.com/TeachBoo ## 3. Let's practice! Getting used to the syntax of writing in a Jupyter Book can be a bit daunting at the start, not to mention becoming familiar with the various tools and workflows required. To help make the learning curve somewhat easier to travel, a number of exercises have been prepared for you The exercises are designed such that no prior experience with any tools or programming is required, as long as you have read the preceding introductory pages. -The exercises can be found in your book at `https://.github.io//exercises/exercises` (case sensitive) or at https://teachbooks.io/template/exercises/exercises.html. +The exercises can be found in your book at `https://.github.io//exercises/exercises` (case sensitive) or at https://teachbooks.io/template/exercises.html. ```{figure} ../external/template/figures/exercises.png --- From 32a76c3cdd7daf5347a065d2a28df4038c2e6386 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Tue, 24 Dec 2024 16:36:08 +0100 Subject: [PATCH 02/23] Update Sphinx-TUDelft-theme --- book/external/Sphinx-TUDelft-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/external/Sphinx-TUDelft-theme b/book/external/Sphinx-TUDelft-theme index 7a52c03..35ecbdd 160000 --- a/book/external/Sphinx-TUDelft-theme +++ b/book/external/Sphinx-TUDelft-theme @@ -1 +1 @@ -Subproject commit 7a52c03dad4e50ec592041ee73e9a45558a68ee1 +Subproject commit 35ecbddad78b567a0b2d1d4bdb513d8b95181348 From 770bb1496f3b5133ca9868bc8a89923146147634 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Fri, 27 Dec 2024 09:35:26 +0100 Subject: [PATCH 03/23] Added local module live coe --- book/features/live_code.ipynb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/book/features/live_code.ipynb b/book/features/live_code.ipynb index 8406c69..6cf8d5e 100644 --- a/book/features/live_code.ipynb +++ b/book/features/live_code.ipynb @@ -147,7 +147,10 @@ "\n", "```python\n", "%pip install package_name\n", - "```" + "```\n", + "\n", + "### Import module from subdirectory\n", + "In case you've a module in a subdirectory you cannot do directly `import `. To solve this, you first have to add that subdirectory to the path with `sys.path.insert(1, '/matrixmethod')` (preferably in a hidden cell with `theme-remove-input-init`)" ] }, { From 37d4ba0dad8ea1191edeaa896d0067c6d9a613a9 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Fri, 27 Dec 2024 09:39:12 +0100 Subject: [PATCH 04/23] Update live_code.ipynb --- book/features/live_code.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/features/live_code.ipynb b/book/features/live_code.ipynb index 6cf8d5e..cc15402 100644 --- a/book/features/live_code.ipynb +++ b/book/features/live_code.ipynb @@ -150,7 +150,7 @@ "```\n", "\n", "### Import module from subdirectory\n", - "In case you've a module in a subdirectory you cannot do directly `import `. To solve this, you first have to add that subdirectory to the path with `sys.path.insert(1, '/matrixmethod')` (preferably in a hidden cell with `theme-remove-input-init`)" + "In case you've a module in a subdirectory you cannot do directly `import as `. To solve this, you first have to add that subdirectory to the path with `sys.path.insert(1, '/')` (preferably in a hidden cell with `theme-remove-input-init`)" ] }, { From e4e8107d7ae8a7d9a10d4846b7f62789088358f5 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Sun, 29 Dec 2024 15:44:07 +0100 Subject: [PATCH 05/23] comment 1 --- book/installation-and-setup/copyright.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/book/installation-and-setup/copyright.md b/book/installation-and-setup/copyright.md index 30d13aa..74fcfbb 100644 --- a/book/installation-and-setup/copyright.md +++ b/book/installation-and-setup/copyright.md @@ -52,7 +52,9 @@ _Here are a few selected answers from the [Copyright Information Point](https:// **3) Your own old content** -Even if created by you, you need to attribute yourself in order to avoid self-plagiarism. Read how to do so [here](https://www.tudelft.nl/library/support/copyright/researcher-copyright-answers#c1131032). +Even if created by you, you need to attribute yourself in order to avoid self-plagiarism. If the material has an open license, this is straightforward; if not, you may need permission from your university (the copyright holder),;for example [see here](https://www.tudelft.nl/library/support/copyright/teacher-copyright-answers#c1132157) + +If you want to use your own content that a (commercial) publisher has published, you must check your contract to see if you are allowed to use it. Read more [here](https://www.tudelft.nl/library/support/copyright/teacher-copyright-answers#c1132153). Even if you have created the work yourself but years ago, check whether you have the right to reuse it. If you have created it while you were under the employment of your previous employer, then you will need to ask permission from them. From dbaaaecb84a8ea6bd2c1a6a96e052faa0996d02f Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Sun, 29 Dec 2024 15:51:31 +0100 Subject: [PATCH 06/23] adjust copyright --- book/installation-and-setup/copyright.md | 2 +- book/installation-and-setup/copyright/considerations.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/book/installation-and-setup/copyright.md b/book/installation-and-setup/copyright.md index 74fcfbb..192f13e 100644 --- a/book/installation-and-setup/copyright.md +++ b/book/installation-and-setup/copyright.md @@ -52,7 +52,7 @@ _Here are a few selected answers from the [Copyright Information Point](https:// **3) Your own old content** -Even if created by you, you need to attribute yourself in order to avoid self-plagiarism. If the material has an open license, this is straightforward; if not, you may need permission from your university (the copyright holder),;for example [see here](https://www.tudelft.nl/library/support/copyright/teacher-copyright-answers#c1132157) +Even if created by you, you need to attribute yourself in order to avoid self-plagiarism. If the material has an open license, this is straightforward. If there is no license, or a non-open license, you may need permission from your university (the copyright holder; explained {ref}`here`). Read more [here](https://www.tudelft.nl/library/support/copyright/teacher-copyright-answers#c1132157) If you want to use your own content that a (commercial) publisher has published, you must check your contract to see if you are allowed to use it. Read more [here](https://www.tudelft.nl/library/support/copyright/teacher-copyright-answers#c1132153). diff --git a/book/installation-and-setup/copyright/considerations.md b/book/installation-and-setup/copyright/considerations.md index 38ffa89..8cb0dd8 100644 --- a/book/installation-and-setup/copyright/considerations.md +++ b/book/installation-and-setup/copyright/considerations.md @@ -32,6 +32,7 @@ The TeachBooks Team isn't really sure when the "line is crossed" from educationa Do you have a better answer than this? Let us know! ``` +(copyright_considerations_copyright)= ## You Don't Own Everything The law is very clear on this, and the TU Delft Copyright page states it quite clearly: From 0fefff63f60b28afaea723450771647c97349cf5 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Sun, 29 Dec 2024 15:59:38 +0100 Subject: [PATCH 07/23] add book note --- book/installation-and-setup/copyright/considerations.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/book/installation-and-setup/copyright/considerations.md b/book/installation-and-setup/copyright/considerations.md index 8cb0dd8..f071caf 100644 --- a/book/installation-and-setup/copyright/considerations.md +++ b/book/installation-and-setup/copyright/considerations.md @@ -49,6 +49,12 @@ In case that wasn't clear enough, _TU Delft owns the copyright,_ not you! In oth We recognize that this may make you angry, and we can relate: as teachers we put a lot of effort into the material we create. However, we have come to see that this is _not_ a horrible situation; in fact, it is a good one. As the creator of the material you still retain moral rights to be named as the author, and there are other benefits as well. For example, the ability of other teachers that may take your place after you are gone to legally use and build upon your work in the future. +```{tip} +One reason copyright lies with TU Delft is because educational material must remain available for students when the author leaves. Additional justification can be found in the Open Educational Resources (OER) Policy Document, [here](https://repository.tudelft.nl/record/uuid:68a07efc-fc4d-4a57-8e93-88a3af37465a). + +The use of open licenses actually does not prohibit the author from using the material in the future, even if not employed at TU Delft. For example, if you publish a TeachBook at TU OPEN, with a CC BY license, you are always entitled to "take" the book with you when leaving by simply changing the cover. +``` + **Still don't agree?** Sorry. Please take this up with your nearest library or copyright expert and let us know if you get a different response! In the meantime, we will simply list ourselves as authors, use CC BY licenses and remember that TU Delft holds the copyright for our work produced as teachers. ```{warning} From 72703af4bf0ed18b194024a09e97fc41f5af1511 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Sun, 29 Dec 2024 16:10:01 +0100 Subject: [PATCH 08/23] ND comment --- book/installation-and-setup/copyright/licenses.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/installation-and-setup/copyright/licenses.md b/book/installation-and-setup/copyright/licenses.md index e4569aa..b29aeb7 100644 --- a/book/installation-and-setup/copyright/licenses.md +++ b/book/installation-and-setup/copyright/licenses.md @@ -64,7 +64,7 @@ The "ND" license prohibits derivative works: in other words, the material cannot - What if you have a wonderful page describing Topic X, but there are a few contextual phrases that are undesired, for example: "this is required reading for Tuesday, December 17, 2024 in CIEM1000." That would be distracting for your own students, but you can't remove it. - What is the point of including a website together with another website? It's easier to just link to your material directly. - What if someone only wants a small part of your book? They can't use it. -- What if someone else makes similar material and releases it under CC BY and you include it in your own book? That does not seem fair to not also provide them an opportunity to benefit from your work. +- What if someone else makes similar material and releases it under CC BY and you include it in your own book under an ND license? It seems unfair not to also provide them an opportunity to benefit from your work. In addition, this is not allowed! You can’t put work under a more restrictive license (see also compatibility table below). - Often someone creates a copy of your work and makes improvements. The Git system (e.g., forks, commits, pull requests, etc) make it very straightforward to also include these improvements back into your original work. This would not be possible if you did not allow for reuse in the first place! ### Why is NC not preferred? From eaee4b29622caa46e72d4fc46901d8ae8c3f4be5 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Sun, 29 Dec 2024 16:10:12 +0100 Subject: [PATCH 09/23] add report link edu material --- book/installation-and-setup/copyright/considerations.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/book/installation-and-setup/copyright/considerations.md b/book/installation-and-setup/copyright/considerations.md index f071caf..b507d7f 100644 --- a/book/installation-and-setup/copyright/considerations.md +++ b/book/installation-and-setup/copyright/considerations.md @@ -24,12 +24,14 @@ It appears that copyright law distinguishes between two types of material (not i 1. Educational material 2. Articles, book (chapter), conference paper, etc. -We aren't really sure what the definition of _educational material_ is, but since pretty much everything we do is for teaching students or teachers about things, we are pretty sure it includes all of it. Perhaps it is easier to see what is _not_ included in this category, +We aren't really sure what the definition of _educational material_ is, but since pretty much everything we do is for teaching students or teachers about things, we are pretty sure it includes all of it. Perhaps it is easier to see a few examples of what is _not_ included: journal article, book (chapter), conference paper. ```{warning} The TeachBooks Team isn't really sure when the "line is crossed" from educational material to book. More specifically, when the copyright owner is you (the author) or the University (your employer). For now, we assume that all books made by employees of a university are considered educational material. Do you have a better answer than this? Let us know! + +If you can read Dutch, the report _Leermaterialen kiezen_ may shed some light on uncertainty about what is considered "educational material" ([download PDF here](https://www.versnellingsplan.nl/wp-content/uploads/2021/08/Digitale-leermaterialen-leermaterialen-kiezen.pdf)). ``` (copyright_considerations_copyright)= From c38a409b4b4f01fbe7d2b440f78c8b452b403372 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Mon, 30 Dec 2024 14:35:53 +0100 Subject: [PATCH 10/23] Update .gitmodules download link replacer --- .gitmodules | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitmodules b/.gitmodules index f76fc05..6dc0128 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,6 +19,7 @@ [submodule "book/external/Download-Link-Replacer"] path = book/external/Download-Link-Replacer url = https://github.com/TeachBooks/Download-Link-Replacer.git + branch = manual_docs [submodule "book/external/Sphinx-Grasple-public"] path = book/external/Sphinx-Grasple-public url = https://github.com/TeachBooks/Sphinx-Grasple-public.git From 17d5c7de34d92b45b3ad362e63326b87bc389f95 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Mon, 30 Dec 2024 14:39:35 +0100 Subject: [PATCH 11/23] Update .gitmodules --- .gitmodules | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitmodules b/.gitmodules index 6dc0128..6dd4808 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,6 +16,7 @@ [submodule "book/external/JupyterBook-Patches"] path = book/external/JupyterBook-Patches url = https://github.com/TeachBooks/JupyterBook-Patches.git + branch = manual_docs [submodule "book/external/Download-Link-Replacer"] path = book/external/Download-Link-Replacer url = https://github.com/TeachBooks/Download-Link-Replacer.git From 6f7b9ba06b0995496549cf7a07691c2b0930427d Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Mon, 30 Dec 2024 14:44:51 +0100 Subject: [PATCH 12/23] Update .gitmodules --- .gitmodules | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitmodules b/.gitmodules index 6dd4808..a0cbe0b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,18 +1,23 @@ [submodule "book/external/Nested-Books"] path = book/external/Nested-Books url = https://github.com/TeachBooks/Nested-Books.git + branch = manual-description [submodule "book/external/template"] path = book/external/template url = https://github.com/TeachBooks/template.git + branch = manual_description [submodule "book/external/deploy-book-workflow"] path = book/external/deploy-book-workflow url = https://github.com/TeachBooks/deploy-book-workflow.git + branch = manual_docs [submodule "book/external/Useful_python_code"] path = book/external/Useful_python_code url = https://github.com/TeachBooks/Useful_python_code.git + branch = manual [submodule "book/external/Sphinx-Image-Inverter"] path = book/external/Sphinx-Image-Inverter url = https://github.com/TeachBooks/Sphinx-Image-Inverter.git + branch = Manual [submodule "book/external/JupyterBook-Patches"] path = book/external/JupyterBook-Patches url = https://github.com/TeachBooks/JupyterBook-Patches.git @@ -24,12 +29,16 @@ [submodule "book/external/Sphinx-Grasple-public"] path = book/external/Sphinx-Grasple-public url = https://github.com/TeachBooks/Sphinx-Grasple-public.git + branch = manual_docs [submodule "book/external/Sphinx-TUDelft-theme"] path = book/external/Sphinx-TUDelft-theme url = https://github.com/TeachBooks/Sphinx-TUDelft-theme.git + branch = Manual [submodule "book/external/teachbooks-sphinx-tippy"] path = book/external/teachbooks-sphinx-tippy url = https://github.com/TeachBooks/teachbooks-sphinx-tippy.git + manual = Manual [submodule "book/external/annotater"] path = book/external/annotater url = https://github.com/TeachBooks/annotater + branch = manual \ No newline at end of file From c0ab37831c33f5f2c2c9d24c778abde90fa8f966 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Mon, 30 Dec 2024 14:45:39 +0100 Subject: [PATCH 13/23] Update .gitmodules --- .gitmodules | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitmodules b/.gitmodules index a0cbe0b..3b0e585 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,27 +1,27 @@ [submodule "book/external/Nested-Books"] path = book/external/Nested-Books url = https://github.com/TeachBooks/Nested-Books.git - branch = manual-description + branch = manual-description [submodule "book/external/template"] path = book/external/template url = https://github.com/TeachBooks/template.git - branch = manual_description + branch = manual_description [submodule "book/external/deploy-book-workflow"] path = book/external/deploy-book-workflow url = https://github.com/TeachBooks/deploy-book-workflow.git - branch = manual_docs + branch = manual_docs [submodule "book/external/Useful_python_code"] path = book/external/Useful_python_code url = https://github.com/TeachBooks/Useful_python_code.git - branch = manual + branch = manual [submodule "book/external/Sphinx-Image-Inverter"] path = book/external/Sphinx-Image-Inverter url = https://github.com/TeachBooks/Sphinx-Image-Inverter.git - branch = Manual + branch = Manual [submodule "book/external/JupyterBook-Patches"] path = book/external/JupyterBook-Patches url = https://github.com/TeachBooks/JupyterBook-Patches.git - branch = manual_docs + branch = manual_docs [submodule "book/external/Download-Link-Replacer"] path = book/external/Download-Link-Replacer url = https://github.com/TeachBooks/Download-Link-Replacer.git @@ -29,16 +29,16 @@ [submodule "book/external/Sphinx-Grasple-public"] path = book/external/Sphinx-Grasple-public url = https://github.com/TeachBooks/Sphinx-Grasple-public.git - branch = manual_docs + branch = manual_docs [submodule "book/external/Sphinx-TUDelft-theme"] path = book/external/Sphinx-TUDelft-theme url = https://github.com/TeachBooks/Sphinx-TUDelft-theme.git - branch = Manual + branch = Manual [submodule "book/external/teachbooks-sphinx-tippy"] path = book/external/teachbooks-sphinx-tippy url = https://github.com/TeachBooks/teachbooks-sphinx-tippy.git - manual = Manual + branch = Manual [submodule "book/external/annotater"] path = book/external/annotater url = https://github.com/TeachBooks/annotater - branch = manual \ No newline at end of file + branch = manual \ No newline at end of file From c64201b14f2d0a8da9339f4ddeaa4b86daf72a60 Mon Sep 17 00:00:00 2001 From: Dennis den Ouden-van der Horst <49307154+douden@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:45:07 +0100 Subject: [PATCH 14/23] Update call-deploy-book.yml Excluding dependabot branches --- .github/workflows/call-deploy-book.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/call-deploy-book.yml b/.github/workflows/call-deploy-book.yml index 63a17c0..a3e73fd 100644 --- a/.github/workflows/call-deploy-book.yml +++ b/.github/workflows/call-deploy-book.yml @@ -4,6 +4,7 @@ on: push: branches: - '**' + - '!dependabot**' # If your git repository has the Jupyter Book within some-subfolder next to # unrelated files, you can make this run only if a file within that specific # folder (or the workflow file itself) has been modified. From 0a5ce270f97f10138e1bd876d60cc85c4c755c54 Mon Sep 17 00:00:00 2001 From: Dennis den Ouden-van der Horst <49307154+douden@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:54:22 +0100 Subject: [PATCH 15/23] Create dependabot.yml --- .github/dependabot.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..01f93fb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "gitsubmodule" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + day: "sunday" + time: "22:59" From 4fb69baa2091f7e889c2e47cf11ec8be80c48a6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 14:55:09 +0000 Subject: [PATCH 16/23] Bump book/external/Sphinx-TUDelft-theme from `35ecbdd` to `71399c6` Bumps [book/external/Sphinx-TUDelft-theme](https://github.com/TeachBooks/Sphinx-TUDelft-theme) from `35ecbdd` to `71399c6`. - [Release notes](https://github.com/TeachBooks/Sphinx-TUDelft-theme/releases) - [Commits](https://github.com/TeachBooks/Sphinx-TUDelft-theme/compare/35ecbddad78b567a0b2d1d4bdb513d8b95181348...71399c659b037a550a253e38ddacfb33e03cc882) --- updated-dependencies: - dependency-name: book/external/Sphinx-TUDelft-theme dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- book/external/Sphinx-TUDelft-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/external/Sphinx-TUDelft-theme b/book/external/Sphinx-TUDelft-theme index 35ecbdd..71399c6 160000 --- a/book/external/Sphinx-TUDelft-theme +++ b/book/external/Sphinx-TUDelft-theme @@ -1 +1 @@ -Subproject commit 35ecbddad78b567a0b2d1d4bdb513d8b95181348 +Subproject commit 71399c659b037a550a253e38ddacfb33e03cc882 From 1ab13868b6979f14fa2665f5d5eae0f57f1a0fbd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:02:25 +0000 Subject: [PATCH 17/23] Bump book/external/deploy-book-workflow from `ed2cdc8` to `317a9cc` Bumps [book/external/deploy-book-workflow](https://github.com/TeachBooks/deploy-book-workflow) from `ed2cdc8` to `317a9cc`. - [Commits](https://github.com/TeachBooks/deploy-book-workflow/compare/ed2cdc81be5036deb8da244814a946d17ece7708...317a9cc8607f74f29957b28a86450eccba6a4e2c) --- updated-dependencies: - dependency-name: book/external/deploy-book-workflow dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- book/external/deploy-book-workflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/external/deploy-book-workflow b/book/external/deploy-book-workflow index ed2cdc8..317a9cc 160000 --- a/book/external/deploy-book-workflow +++ b/book/external/deploy-book-workflow @@ -1 +1 @@ -Subproject commit ed2cdc81be5036deb8da244814a946d17ece7708 +Subproject commit 317a9cc8607f74f29957b28a86450eccba6a4e2c From e9d736fe0868fc153dce4908a6ca029dbdcd508d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:18:32 +0000 Subject: [PATCH 18/23] Bump book/external/Nested-Books from `3cf6152` to `63b9a9e` Bumps [book/external/Nested-Books](https://github.com/TeachBooks/Nested-Books) from `3cf6152` to `63b9a9e`. - [Commits](https://github.com/TeachBooks/Nested-Books/compare/3cf61525f3985916805a59361935764d78e460df...63b9a9e747e3fb7511e7e98514648f5d8ee9d010) --- updated-dependencies: - dependency-name: book/external/Nested-Books dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- book/external/Nested-Books | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/external/Nested-Books b/book/external/Nested-Books index 3cf6152..63b9a9e 160000 --- a/book/external/Nested-Books +++ b/book/external/Nested-Books @@ -1 +1 @@ -Subproject commit 3cf61525f3985916805a59361935764d78e460df +Subproject commit 63b9a9e747e3fb7511e7e98514648f5d8ee9d010 From 696e60af9abdd7a80e6acd2cb7b10aa0c525fd38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 09:29:39 +0000 Subject: [PATCH 19/23] Bump book/external/Nested-Books from `63b9a9e` to `587accb` Bumps [book/external/Nested-Books](https://github.com/TeachBooks/Nested-Books) from `63b9a9e` to `587accb`. - [Commits](https://github.com/TeachBooks/Nested-Books/compare/63b9a9e747e3fb7511e7e98514648f5d8ee9d010...587accb350eae83cf7521a2fad5d18d6cb127698) --- updated-dependencies: - dependency-name: book/external/Nested-Books dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- book/external/Nested-Books | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/external/Nested-Books b/book/external/Nested-Books index 63b9a9e..587accb 160000 --- a/book/external/Nested-Books +++ b/book/external/Nested-Books @@ -1 +1 @@ -Subproject commit 63b9a9e747e3fb7511e7e98514648f5d8ee9d010 +Subproject commit 587accb350eae83cf7521a2fad5d18d6cb127698 From 08bdd566e6e85e6348856c56d8b8af3884e546b3 Mon Sep 17 00:00:00 2001 From: douden <49307154+douden@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:43:44 +0100 Subject: [PATCH 20/23] typo in README.md --- .github/workflows/call-deploy-book.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/call-deploy-book.yml b/.github/workflows/call-deploy-book.yml index a3e73fd..43745e9 100644 --- a/.github/workflows/call-deploy-book.yml +++ b/.github/workflows/call-deploy-book.yml @@ -4,7 +4,7 @@ on: push: branches: - '**' - - '!dependabot**' + # - '!dependabot**' # If your git repository has the Jupyter Book within some-subfolder next to # unrelated files, you can make this run only if a file within that specific # folder (or the workflow file itself) has been modified. diff --git a/README.md b/README.md index 92cb94d..5f8fe45 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,6 @@ This book will continue to develop, so feel free to contribute https://github.co The released book can be found on on https://teachbooks.io/manual. This page shows the built book of the `release` branch All branches will also be visible as seen in the action's summaries: https://github.com/TeachBooks/mirror_teachbook_manual/actions -Some parts of this book are taken from other sources in the form of submodules (linked in the folder [book/external](book/external)). To contribute to those pages, contribute to the source repository directly with a fork and merge/pull request. If you intent to clone this boko including its submodules, clone using: `git clone --recurse-submodules git@github.com:TeachBooks/manual.git` +Some parts of this book are taken from other sources in the form of submodules (linked in the folder [book/external](book/external)). To contribute to those pages, contribute to the source repository directly with a fork and merge/pull request. If you intent to clone this book including its submodules, clone using: `git clone --recurse-submodules git@github.com:TeachBooks/manual.git` Happy book building! From bd7ea060f2f62387c8a1ba2b5c73f86ce10a5631 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 09:46:42 +0000 Subject: [PATCH 21/23] Bump book/external/Nested-Books from `587accb` to `51f0ba6` Bumps [book/external/Nested-Books](https://github.com/TeachBooks/Nested-Books) from `587accb` to `51f0ba6`. - [Commits](https://github.com/TeachBooks/Nested-Books/compare/587accb350eae83cf7521a2fad5d18d6cb127698...51f0ba6754f0a5f95032e09482a7a28145687624) --- updated-dependencies: - dependency-name: book/external/Nested-Books dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- book/external/Nested-Books | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/external/Nested-Books b/book/external/Nested-Books index 587accb..51f0ba6 160000 --- a/book/external/Nested-Books +++ b/book/external/Nested-Books @@ -1 +1 @@ -Subproject commit 587accb350eae83cf7521a2fad5d18d6cb127698 +Subproject commit 51f0ba6754f0a5f95032e09482a7a28145687624 From 50dcfa15c4afcf29c64a18d3bee90fe07a9bdbd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 13:12:46 +0000 Subject: [PATCH 22/23] Bump book/external/teachbooks-sphinx-tippy from `a80e764` to `3f9a5c2` Bumps [book/external/teachbooks-sphinx-tippy](https://github.com/TeachBooks/teachbooks-sphinx-tippy) from `a80e764` to `3f9a5c2`. - [Release notes](https://github.com/TeachBooks/teachbooks-sphinx-tippy/releases) - [Commits](https://github.com/TeachBooks/teachbooks-sphinx-tippy/compare/a80e7645bc5a377b3c75befdf29eb67934bb9ab7...3f9a5c2a72607d5e32c3a99649f37a5e6548e92a) --- updated-dependencies: - dependency-name: book/external/teachbooks-sphinx-tippy dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- book/external/teachbooks-sphinx-tippy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/external/teachbooks-sphinx-tippy b/book/external/teachbooks-sphinx-tippy index a80e764..3f9a5c2 160000 --- a/book/external/teachbooks-sphinx-tippy +++ b/book/external/teachbooks-sphinx-tippy @@ -1 +1 @@ -Subproject commit a80e7645bc5a377b3c75befdf29eb67934bb9ab7 +Subproject commit 3f9a5c2a72607d5e32c3a99649f37a5e6548e92a From 0b70a21a6a0368173758365d8c1afc3013a05f7c Mon Sep 17 00:00:00 2001 From: douden <49307154+douden@users.noreply.github.com> Date: Thu, 2 Jan 2025 10:28:58 +0100 Subject: [PATCH 23/23] Added custom color section --- book/_config.yml | 4 + book/_static/color.css | 19 ++++ book/_toc.yml | 1 + book/features/custom_colors.md | 169 +++++++++++++++++++++++++++++++++ 4 files changed, 193 insertions(+) create mode 100644 book/_static/color.css create mode 100644 book/features/custom_colors.md diff --git a/book/_config.yml b/book/_config.yml index 8c6fa4e..e1f3110 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -43,6 +43,10 @@ sphinx: html_static_path: ["images"] bibtex_default_style: myapastyle bibtex_reference_style: author_year_round + mathjax3_config: + tex: + macros: + "newcolor": ['\definecolor{newcolor}{RGB}{111, 29, 119}{\color{newcolor}#1}',1] local_extensions: apastyle: _ext/ bracket_citation_style: _ext/ diff --git a/book/_static/color.css b/book/_static/color.css new file mode 100644 index 0000000..8717fb4 --- /dev/null +++ b/book/_static/color.css @@ -0,0 +1,19 @@ +:root { + --newcolor-light: rgb(111, 29, 119); + --newcolor-dark: rgb(255, 167, 255); + --newcolor: var(--newcolor-light); +} + +html[data-theme="dark"] { + --newcolor: var(--newcolor-dark); +} + +.newcolor {color: var(--newcolor);} + +.newcolor-same {color: var(--newcolor-light);} + +.newcolor-filter {color: var(--newcolor-light);} + +html[data-theme="dark"] .newcolor-filter { + filter: invert(1) hue-rotate(180deg) saturate(1.5); +} \ No newline at end of file diff --git a/book/_toc.yml b/book/_toc.yml index 79151fd..790c6d2 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -78,6 +78,7 @@ parts: - file: external/Sphinx-TUDelft-theme/README.md - file: external/teachbooks-sphinx-tippy/README.md - file: features/apa + - file: features/custom_colors.md - file: features/students sections: - file: external/annotater/README.md diff --git a/book/features/custom_colors.md b/book/features/custom_colors.md new file mode 100644 index 0000000..e004f9b --- /dev/null +++ b/book/features/custom_colors.md @@ -0,0 +1,169 @@ +# Custom colors + +```{admonition} User types +:class: tip +This page is useful for user type 4 and 5. +``` + +Within these online books sometimes extra/new colors are wished for. In this page is shown how this can be achieved. + +## Using `definecolor` + +::::{warning} +This method only works for $\LaTeX$ colors. +:::: + +::::{warning} +In this case the color remains the same in ligt and dark mode. +:::: + +### Code in `_config.yml` + +```yaml +sphinx: + config: + mathjax3_config: + tex: + macros: + "newcolor": ['\definecolor{newcolor}{RGB}{111, 29, 119}{\color{newcolor}#1}',1] +``` + +### Code in content + +```latex +:::{math} +\newcolor{\LaTeX} +::: +``` + +### Result + +:::{math} +\newcolor{\LaTeX} +::: + +## Using CSS + +In this case one has three options: + +1. Light and dark mode the same color +1. Light and dark mode different colors using two color definitions +1. Light and dark mode different colors using a color filter + +### Light and dark mode the same color + +::::{note} +This method has the benefit that the custom color can be used also within html and css elements. +:::: + +#### Code in `_static/color.css` + +```css +:root { + --newcolor: rgb(111, 29, 119); +} + +.newcolor {color: var(--newcolor);} +``` + +#### Code in content + +```latex +:::{math} +\class{newcolor}{\LaTeX} +::: +``` + +```html +
HTML text
+``` + +#### Result + +:::{math} +\class{newcolor-same}{\LaTeX} +::: + +
HTML text
+ +### Light and dark mode different colors using two color definitions + +::::{note} +This method has the benefit that the custom colors can be used also within html and css elements with automatic changes when the mode changes from Light to dark or vice versa. +:::: + + +#### Code in `_static/color.css` + +```css +:root { + --newcolor: rgb(111, 29, 119); +} + +html[data-theme="dark"] { + --newcolor: rgb(255, 167, 255) +} + +.newcolor {color: var(--newcolor);} +``` + +#### Code in content + +```latex +:::{math} +\class{newcolor}{\LaTeX} +::: +``` + +```html +
HTML text
+``` + +#### Result + +:::{math} +\class{newcolor}{\LaTeX} +::: + +
HTML text
+ +### Light and dark mode different colors using a color filter + +::::{warning} +This method has the drawback that the custom colors can only be used as a class. +:::: + +#### Code in `_static/color.css` + +```css +:root { + --newcolor: rgb(111, 29, 119); +} + +.newcolor {color: var(--newcolor);} + +html[data-theme="dark"] .newcolor { + filter: invert(1) hue-rotate(180deg) saturate(1.5); +} + +``` + +#### Code in content + +```latex +:::{math} +\class{newcolor}{\LaTeX} +::: +``` + +```html +
HTML text
+``` + +#### Result + +:::{math} +\class{newcolor-filter}{\LaTeX} +::: + +
HTML text