Syntax highlighting for package documentation

asked 2025-11-16 22:40:35 +0100

MarcusS gravatar image

When generating the documentation of my package, the syntax of code examples has only Python highlighting (words like and, not, is and numbers have colors).

Additionally, I want all occurring sage: statements to be highlighted (similar as in the official SageMath documentation).

Currently, I use make html (or sphinx-build . build/html) in my docs folder. Do I need a different command? Or am I missing a setting in my conf.py file?

Thank you in advance!

edit retag flag offensive close merge delete