Hello,
I would like to write an extension. (if that matters, I would like a directive for elaborate quotations so you can specify the book, page, chapter and the quotation and as a result, everything is formatted in a nice and easily customizable way.)
Anyway, I have found the extension tutorial:
http://sphinx-doc.org/extdev/tutorial.htmland although it has some nice points, it can be worked on:
1. In the directive class implementation (
http://sphinx-doc.org/extdev/tutorial.html#the-directive-classes), there is the make_admonition function used. Not only is this function absolutely undocumented, it is also the only function of this kind in its package, and there is not any description of what it does in the tutorial. Therefore, it is very difficult to learn anything from it. i.e. if I want something different than a todo-list, what should I do?
2. The visit_todo_node(self, node) looks like a function that is used later to monkey-patch a class. I would love to read more about its purpose, but it seems to me that the best option is to take a look at the source, which is a pity.
What confuses me most is that both the Directive class and visit_* and depart_* functions influence what happens to the document when a particular directive is encountered in the source. The run method of the class is able to do a lot of advanced stuff at the background at the high level, whereas the functions are more subtle and they work on lower level (they can be i.e. html- and tex- specific, if I am right).
But what is the big idea behind this?
Could you please provide me with some information? I believe that together, we can greatly expand and improve the tutorial.