A Sphinx extension for producing exercise and solution directives.
Repo executablebooks/sphinx-exercise, read from GitHub 17 h ago. executablebooks has not joined Take My Repo.
LaTeX Error: Not in outer par mode when building LaTeX/PDF output with a captioned figure inside an exercise or solution, including gated exercise-start / solution-start blocks (#94, #95)
\begin{figure}[H], as Sphinx already does for figures inside its own admonitionscode-cell outputs with mystnb: figure: caption: metadata inside a solutionpydata-sphinx-theme, by switching the gated directive test root to alabaster (#88)pip install sphinx-exercise==1.2.2
See v1.2.2 release notes for full details.
std-ref class is not present during LaTeX/PDF builds (#82)
std-ref from CSS classesstd-ref classpip install sphinx-exercise==1.2.1
See v1.2.1 release notes for full details.
This release introduces new configuration options for styling solutions that follow exercises, along with order validation to help maintain document structure consistency.
A new exercise_style configuration option allows you to customize how solution titles are displayed when solutions follow their exercises.
Configuration:
# In conf.py exercise_style = "solution_follow_exercise"
Behavior:
When exercise_style = "solution_follow_exercise" is enabled, sphinx-exercise validates that:
pip install --upgrade sphinx-exercise
exercise_style configuration and order validationSee Configuration Options for complete documentation.
Python 3.10 support has been re-added to the project. Python 3.10 remains actively supported until October 2026, making it an important version to maintain compatibility with.
Key details:
Version-Specific Sphinx Constraints:
The test infrastructure automatically handles these version-specific requirements, ensuring correct behavior across all combinations.
Supported Combinations:
Total: 11 test environments (excludes Python 3.13 + Sphinx 6)
Install or upgrade via pip:
pip install --upgrade sphinx-exercise
If you're upgrading from v1.1.0:
If you're on Python 3.10:
Full Changelog: https://github.com/executablebooks/sphinx-exercise/blob/main/CHANGELOG.md
This release brings comprehensive internationalization support and modernizes the test infrastructure to support the latest Python and Sphinx versions.
docs/releases/pip install --upgrade sphinx-exercise
Special thanks to @douden
Thank you to all contributors who made this release possible!
Full Changelog: v1.0.1...v1.1.0
Full Changelog: v1.0.0...v1.0.1