sphinx-exercise¶
An exercise extension for Sphinx.
This package contains a Sphinx extension for producing exercise and solution directives.
Warning
sphinx-exercise 0.1.1
is in a development stage and may change rapidly.
Features:
The exercise directive is
automatically numbered
supports options such as
class
,label
, andnonumber
can easily be referenced through
ref
andnumref
roles
The solution directive
supports options such as
class
andlabel
can be referenced through
ref
role
Getting Started¶
To get started with sphinx-exercise
, first install it through pip
:
pip install -e.
Jupyter-Book Project¶
Add sphinx_exercise
to your extra_extensions config in _config.yml
sphinx:
extra_extensions:
- sphinx_exercise
you may then use jb build <project>
and the extension will be used by your JupyterBook
project.
Sphinx Project¶
Add sphinx_exercise
to your sphinx extensions
in the conf.py
...
extensions = ["sphinx_exercise"]
...
you may then build using make html
and the extension will be used by your Sphinx
project.