Dear all, first of all, thanks for an awesome project! I am Heiko, one of the developers of the Shogun Machine Learning toolbox http://www.shogun-toolbox.org/
I am currently playing with sphinx to see whether we can use it for our example documentation. We currently use doxygen. http://shogun-toolbox.org/doc/en/latest/ I have a question regarding sphinx internals: Shogun supports different interfacing languages (python, java, otave, R, lua, c#, c++, etc). We would like to reflect this in the example API documentation, i.e. users can choose the target language in a header tab, and then the showed listings change language. See here for a screenshot how it should look like: https://cloud.githubusercontent.com/assets/699071/6765769/aef734f2-cfe5-11e4-9107-eec3b5f6f463.png https://cloud.githubusercontent.com/assets/699071/6765770/aefb73be-cfe5-11e4-8860-c5d733be95ba.png This can be done using bootstrap and some simple templating of the "body" block of sphinx, as shown here: https://github.com/karlnapf/shogun_manual/commit/518a5204f687472156e12bca3628b2bd55f97c4c Here is the html source of the screenshot. https://github.com/karlnapf/shogun_manual/blob/7a74f76fd67eadb99c8afea1323aaa3aff10a522/final/index.html As you see there, the body is included multiple times, one copy for each language, with different code listings. In the screenshot html file, I copied things together by hand. That is very messy and we would like to generate this with sphinx. Assume I have .rst files for each of those pages (generated by jinja2 templating). Each of those have the same content, but include different code snippets in different languages. These .rst files can either be located in different source directories (i.e. source_python/knn.rst, source_octave/knn.rst, etc), or all in the same source directory (i.e. source/knn_python.rst, source/knn_octave.rst, etc) Question: What would be the best way to generate the above html source with sphinx? Is there a way to overload the code that generates the {{body}} block so that we can use {{body_python}}, {{body_octave}}, etc in our templates? Such that block then generates the body of the corresponding .rst file? I spent some time with your docs, but could not work it out. Any help would be appreciated! Thanks! Best Heiko -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/d/optout.
