Testing the Sphinx-Tabs Sphinx extension¶
Avertissement
Javascript is required!
This web page embeds some small programs written in javascript. This should work in any recent web browser, supporting javascript (and it should not be disabled).
This page tests a Sphinx extension,
sphinx-tabs
, to include tabs in a web-page
generated with Sphinx.
Details¶
What are tabs? See the examples below, and the ones on the Semantic UI project and its documentation.
How to install it? Use pip it’s easy:
$ pip install sphinx-tabs
How to use it and configure it?
To configure it, add this line to your conf.py
file
(see here for an example my conf.py file, as changed in :bbchangeset:`0740414aa24c`):
extensions.append('sphinx_tabs.tabs')
Then, in a reStructuredText file, include something like this:
.. tabs::
.. tab:: Apples
Apples are green, or sometimes red.
.. tab:: Pears
Pears are green.
.. tab:: Oranges
Oranges are orange.
Fruits¶
Apples are green, or sometimes red.
Pears are green.
Oranges are orange.
Luminaries¶
The sun is a star.
The moon is not a star.
Code Tabs¶
C Main Function
C++ Main Function
Python Main Function
Java Main Function
Julia Main Function
OCaml Main Function
Fortran Main Function
int main(const int argc, const char **argv) {
return 0;
}
int main(const int argc, const char **argv) {
return 0;
}
def main():
return
class Main {
public static void main(String[] args) {
}
}
function main()
end
let main () =
()
;;
PROGRAM main
END PROGRAM main
Group Tabs¶
Linux Line 1
Mac OSX Line 1
Windows Line 1
Linux Line 2
Mac OSX Line 2
Windows Line 2