Show More
@@ -15,9 +15,11 and the IPython directive:: | |||||
15 | extensions = ['IPython.sphinxext.ipython_console_highlighting', |
|
15 | extensions = ['IPython.sphinxext.ipython_console_highlighting', | |
16 | 'IPython.sphinxext.ipython_directive'] |
|
16 | 'IPython.sphinxext.ipython_directive'] | |
17 |
|
17 | |||
18 | By default this directive assumes that your prompts are unchanged IPython ones, |
|
18 | The IPython directive outputs code-blocks with the language 'ipython'. So | |
19 | but this can be customized. The configurable options that can be placed in |
|
19 | if you do not have the syntax highlighting extension enabled as well, then | |
20 | conf.py are: |
|
20 | all rendered code-blocks will be uncolored. By default this directive assumes | |
|
21 | that your prompts are unchanged IPython ones, but this can be customized. | |||
|
22 | The configurable options that can be placed in conf.py are: | |||
21 |
|
23 | |||
22 | ipython_savefig_dir: |
|
24 | ipython_savefig_dir: | |
23 | The directory in which to save the figures. This is relative to the |
|
25 | The directory in which to save the figures. This is relative to the | |
@@ -55,6 +57,21 one sets the backend to `None`:: | |||||
55 |
|
57 | |||
56 | ipython_mplbacked = None |
|
58 | ipython_mplbacked = None | |
57 |
|
59 | |||
|
60 | An example usage of the directive is: | |||
|
61 | ||||
|
62 | .. code-block:: rst | |||
|
63 | ||||
|
64 | .. ipython:: | |||
|
65 | ||||
|
66 | In [1]: x = 1 | |||
|
67 | ||||
|
68 | In [2]: y = x**2 | |||
|
69 | ||||
|
70 | In [3]: print(y) | |||
|
71 | ||||
|
72 | ||||
|
73 | See http://matplotlib.org/sampledoc/ipython_directive.html for more additional | |||
|
74 | documentation. | |||
58 |
|
75 | |||
59 | ToDo |
|
76 | ToDo | |
60 | ---- |
|
77 | ---- |
General Comments 0
You need to be logged in to leave comments.
Login now