Jupyter-Book#

Why Jupyter-Book?#

A quote from the Jupyter-Book website:

Build beautiful, publication-quality books and documents from computational content.

Text content ✏️

Structure books with text files and Jupyter Notebooks with minimal configuration.

https://jupyterbook.org/en/stable/basics/organize.html

MyST Markdown ✨

Write MyST Markdown to create enriched documents with publication-quality features.

https://jupyterbook.org/en/stable/content/myst.html

Executable content 🔁

Execute notebook cells, store results, and insert outputs across pages.

https://jupyterbook.org/en/stable/content/executable/index.html

Live environments 🚀

Connect your book with Binder, JupyterHub, and other live environments

https://jupyterbook.org/en/stable/interactive/launchbuttons.html

Build and publish 🎁

Share your built books via web services and hosted websites.

https://jupyterbook.org/en/stable/publish/web.html

UI components ⚡

Create interactive and web-native components and services.

https://jupyterbook.org/en/stable/content/components.html

NGSolve in Jupyter-Book#

Provided that NGSolve is installed in the python environment, NGSolve can also be integrated in a Juptyter book.

In order to be able to use the webgui in a book, the webgui.js must be saved in the ./_static directory. This can be done with the following script:

from webgui_jupyter_widgets.js import widget_code 

fp = open("_static/webgui.js", "w")
fp.write(widget_code)
fp.close()