What I'm trying to do:
I'm working on creating online notes for a class. I'm using Spinx (reStructuredText). I really want to create some numbered admonitions with a custom coloring scheme (e.g. blue for definitions, green for theorems, orange for examples etc). I'd like to be able to compute something like this:
Chapter
=======
.. definition:: My name of choice
My definition here.
And it would render a numbered, custom colored admonition, something like:
Chapter 1
The numbering would take measure of the chapter/subchapter/subsubchapter the admonition is in and (preferably) continue numbering with respect to other kinds of custom admonitions. So if I were to have first a definition and then a theorem in in Chapter 3.2.1 I'd get "3.2.1.1 Definition: My name of choice" and then "3.2.1.2 Theorem: my name of choice".
Note:
I have googled everything I can think of, but no no avail. I tried the numbered blocks extension but it didn't really suit my needs. I've tried following instructions on custom admonitions (not numbered though) by creating a custom.css
add the def setup(app): app.add_stylesheet('custom.css')
into my conf.py
file (as described here) but I couldn't get it to work. I'm getting pretty desperate.