Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Chemistry LibreTexts

5.2: Jupyter Notebooks (Executable Programming Code and Figures)

( \newcommand{\kernel}{\mathrm{null}\,}\)

Alert

We are currently in the process of migrating from our prototypical alpha Jupyter system to our production-ready beta Jupyter backend. Please note that we cannot provide technical support for this feature until after our official feature launch shortly after August 25 as we are still in the process of making significant changes behind the scenes. Thank you for your patience as we upgrade this feature for general usage!

Alert

This feature is currently in alpha and for now is only available on the chemistry library.

The Jupyter notebook system is a powerful aspect to the LibreTexts platform. The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.

clipboard_e7894eef8fe792997185ce256cb13ae45.png
Figure 5.2.1: Python code used for making an interactive figure in the LibreTexts platform (https://libretexts.org/advanced.html).

Jupyter code can be embedded in four steps:

Step 1: Set Meta-Tag

Flip the "Embed Jupyter" meta tag on the page under page settings. You need to select which code you want active on this page. Only one language per page for now.

Jupyter.png
Figure 5.2.2:

Step 2: Insert Jupyter Template

You need to add the Jupyter template. You do this by selecting the Template section under "Elements" on the editing toolbar

Slide2.PNG
Figure 5.2.3:

Then select "EmbedJupyter" template.

Slide3.PNG
Figure 5.2.4:

The template box will be added.

Slide4.PNG
Figure 5.2.5:

Step 3: Write Code

Click on the "+" in upper left corner of the red DekiScriipt box to be able to insert python (or any other language) code.

Slide5.PNG
Figure 5.2.6:

Step 4: Save and Execute

You can execute the code. Via the green "run" button

Slide6.PNG
Figure 5.2.7:

5.2: Jupyter Notebooks (Executable Programming Code and Figures) is shared under a CC BY license and was authored, remixed, and/or curated by LibreTexts.

  • Was this article helpful?

Support Center

How can we help?