github executablebooks/sphinx-exercise v1.2.0

11 hours ago

This release introduces new configuration options for styling solutions that follow exercises, along with order validation to help maintain document structure consistency.

✨ New Features

Solution Title Styling Configuration

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 enabled: Solution titles show just "Solution" (simplified, no hyperlinks)
  • Default: Solution titles show "Solution to Exercise #.#" with clickable hyperlinks

Order Validation System

When exercise_style = "solution_follow_exercise" is enabled, sphinx-exercise validates that:

  • Solutions appear after their referenced exercises
  • Solutions are in the same document as their exercises
  • Provides helpful warnings with file paths and line numbers

👌 Improvements

  • Enhanced solution title styling for lecture-style content
  • Improved configuration naming for clarity
  • Cleaner code with removed redundant logic

📦 Installation

pip install --upgrade sphinx-exercise

🔗 Related

📚 Documentation

See Configuration Options for complete documentation.

Don't miss a new sphinx-exercise release

NewReleases is sending notifications on new releases.