Skip to main content
Ctrl+K

Manual

Your First TeachBook!

  • What is a TeachBook?
  • How can you do it?
  • It only takes 10 clicks!
  • You Know the Basics: What Next?

Getting Going!

  • User types
  • Collaboration tool: Git
    • Which git provider to choose
  • Install & authenticate required software
    • Editing text: VS Code
    • Git: GitHub Desktop / Git in VS Code
    • Managing code-related software: Anaconda
    • Combining Git Bash, VS Code and Conda
    • Build your book: JupyterBook
  • Collaborative book-editing
    • Assign task to yourself (milestones, issues)
    • Create your own version (branching, cloning, pulling)
    • Edit (merge conflicts, staging, committing, pushing)
    • Check changes online
    • Reviewing and combine versions (merge/pull request, merging)
  • Organize editing team, collaboration and visibility
  • Versioning and URLs
    • Publish version on separate (fixed) URLs
    • TeachBooks versioning with changelog
    • Publishing your book with a publisher
  • Copyright and Licenses checklist
    • Copyright Considerations
    • Licenses
    • Recommendations

Features

  • Overview
  • Original Jupyter Book and Sphinx Features
    • Anatomy of a Jupyter Book
    • Figures
    • Equations
    • Videos
    • References
    • Code
    • Code blocks that produce figures
    • Badges, Buttons & Icons
    • Banner or Announcement
  • Easy Editing Process
    • TeachBooks template
    • Draft-Release Workflow
    • Releasing book online
    • Build pull requests from forks
    • Local Server to view interactive elements locally
    • Sharing content between books in table of contents
      • (Deprecated) Share content between books using submodules
    • Auto-updating packages
    • TeachBooks Versioning
  • Additional functionality
    • Download link replacer
    • Multilingual book
    • Discussions in your book: Utterances
    • H5p interactive elements
      • Examples of H5p Quizzes
    • Interactive plots: plotly
    • Grasple
    • Interactive HTML/JavaScript elements
      • Adding interactive HTML/JavaScript elements
      • Creating basic interactive HTML/JavaScript elements
    • Interactive content: Run Python inside your book
      • Ipywidgets
      • Exercise checking using check-answer button
    • JupyterQuiz
    • Iframes
    • Indexed Definitions
    • PRIME applets
    • Dropdown Toggle
  • Book styling
    • Image and iframe dark mode colour inverter
    • JupyterBook-Patches
    • TU Delft theme
    • Rich hover over tips
    • APA References
    • Custom named colors
    • Interactive graph of book content
  • TeachBooks Student-view Features
    • Local Annotator Extension
    • Making comments on the website: Hypothesis

Examples

  • TeachBooks Examples
  • Well-Structured Book
  • Live Code (Sphinx Thebe)
  • Programming assignment with checks
  • Combining theory & interactive quizzes
  • Theory, interactive quizzes & live code
  • Coding theory, interactive quizzes & live code
  • Parametric questions

Editing Tools

  • Figure syntax maker
  • Scripts for automating workflow
    • Convert LaTeX to Markdown
    • Move images to separate hosting
    • Snippit
    • Extensionchecker, filedownloader and figreturner
    • Figshrinker

Miscellaneous

  • References
  • Credits and License
  • Changelog
  • Contact
  • Repository
  • Suggest edit
  • Open issue
  • .md

Dropdown Toggle

Contents

  • Introduction
  • Installation
  • Contribute
  • Usage
  • Reference examples

Attribution

This page originates from TeachBooks/Sphinx-Dropdown-Toggle.git, version: main

User types

This section is useful for user type 3-5.

Sphinx Extension

Attribution

This page originates from TeachBooks/Sphinx-Dropdown-Toggle.git, version: main

Dropdown Toggle#

Introduction#

This Sphinx extension adds a button to open/close all dropdowns simultaneously, provided at least one dropdown is present.

Installation#

To install the Sphinx-Dropdown-Toggle, follow these steps:

Step 1: Install the Package

Install the Sphinx-Dropdown-Toggle package using pip:

pip install sphinx-dropdown-toggle

Step 2: Add to requirements.txt

Make sure that the package is included in your project’s requirements.txt to track the dependency:

sphinx-dropdown-toggle

Step 3: Enable in _config.yml

In your _config.yml file, add the extension to the list of Sphinx extra extensions:

sphinx: 
    extra_extensions:
        - sphinx_dropdown_toggle

Contribute#

This tool’s repository is stored on GitHub. The MANUAL.md of the branch main is also part of the TeachBooks manual as a submodule. If you’d like to contribute, you can create a fork and open a pull request on the GitHub repository. To update the MANUAL.md shown in the TeachBooks manual, create a fork and open a merge request for the GitHub repository of the manual.

Usage#

When dropdowns are included on a page, initially will be shown at the top of the page near the other symbols. Clicking this will toggle all dropdowns on the page, opening them all at once.

At this point the button wil change to and clicking it again will close all dropdowns, including initially open ones, and revert the button to its original state.

Reference examples#

A proof

First we consider \(x_-=-ai\) and take its square:

\[ x_-^2 = \left(-ai\right)^2 = a^2i^2 = -a^2. \]

This shows that \(x_-=-ai\) is indeed a solution to the equation \(x^2=-a^2\).

We repeat the same for \(x_+=ai\):

\[ x_+^2 = \left(ai\right)^2 = a^2i^2 = -a^2. \]

We also find that \(x_+=ai\) is a solution to the equation \(x^2=-a^2\).

Grasple Exercise 2

https://embed.grasple.com/exercises/c5058abb-3d5b-4e8c-b836-40aeff08a301?id=65634

Just to compute a cross product.

Show/Hide Content

previous

PRIME applets

next

Book styling

Contents
  • Introduction
  • Installation
  • Contribute
  • Usage
  • Reference examples

By TeachBooks Development Team and TeachBooks users, built with TeachBooks, CC BY 4.0

Last updated on July 2, 2025.