Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9c0b34

Browse files
committed
DOC: re-render sampledoc
- Actually remove Lena from published version - re-render with Matplotlib 2.0
1 parent 38074a6 commit e9c0b34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+12484
-1019
lines changed

sampledoc/_images/ellipses.png

-15.4 KB
Loading

sampledoc/_images/extensions-1.png

-8.35 KB
Loading
-25.5 KB
Loading

sampledoc/_images/hist_simple.png

-6.83 KB
Loading

sampledoc/_images/hist_with_text.png

-15.2 KB
Loading
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<map id="inheritance7e56675552" name="inheritance7e56675552">
2+
<area shape="rect" id="node1" title="This subclass of IncrementalDecoder can be used as the baseclass for an" alt="" coords="256,276,515,301"/>
3+
<area shape="rect" id="node2" title="An IncrementalDecoder decodes an input in multiple steps. The input can" alt="" coords="5,276,208,301"/>
4+
<area shape="rect" id="node3" title="This subclass of IncrementalEncoder can be used as the baseclass for an" alt="" coords="257,227,513,252"/>
5+
<area shape="rect" id="node4" title="An IncrementalEncoder encodes an input in multiple steps. The input can" alt="" coords="6,227,207,252"/>
6+
<area shape="rect" id="node5" title="Defines the interface for stateless encoders/decoders." alt="" coords="51,153,162,179"/>
7+
<area shape="rect" id="node6" title="Codec details when looking up the codec registry" alt="" coords="39,104,175,129"/>
8+
<area shape="rect" id="node8" title="StreamReaderWriter instances allow wrapping streams which" alt="" coords="5,55,208,80"/>
9+
<area shape="rect" id="node9" title="StreamRecoder instances translate data from one encoding to another." alt="" coords="21,5,192,31"/>
10+
</map>
-13.3 KB
Binary file not shown.
-4.17 KB
Binary file not shown.
-1.39 KB
Binary file not shown.

sampledoc/_images/plot_simple.png

3.32 KB
Loading

sampledoc/_sources/cheatsheet.txt renamed to sampledoc/_sources/cheatsheet.rst.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ Sphinx cheat sheet
66

77
Here is a quick and dirty cheat sheet for some common stuff you want
88
to do in sphinx and ReST. You can see the literal source for this
9-
file at :ref:`cheatsheet
10-
-literal`.
9+
file at :ref:`cheatsheet-literal`.
1110

1211

1312
.. _formatting-text:

sampledoc/_sources/custom_look.txt renamed to sampledoc/_sources/custom_look.rst.txt

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,31 @@ Customizing the look and feel of the site
66
******************************************
77

88
The `sphinx <http://sphinx.pocoo.org/>`_ site itself looks better than
9-
the sites created with the default css, so here we'll invoke T. S. Eliot's
10-
maxim "Talent imitates, but genius steals" and grab their css
11-
and part of their layout. As before, you can either get the required
12-
files :file:`_static/default.css`, :file:`_templates/layout.html` and
13-
:file:`_static/logo.png` from the website or git (see
9+
the sites created with the default css, so here we'll
10+
invoke T. S. Eliot's maxim "Talent imitates, but genius steals" and
11+
grab their css and part of their layout. As before, you can either
12+
get the required files :file:`_static/default.css` and
13+
:file:`_templates/layout.html` from the website or git (see
1414
:ref:`fetching-the-data`). Since I did a git clone before, I will
1515
just copy the stuff I need from there::
1616

1717
home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/default.css _static/
1818
home:~/tmp/sampledoc> cp ../sampledoc_tut/_templates/layout.html _templates/
19-
home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/logo.png _static/
2019
home:~/tmp/sampledoc> ls _static/ _templates/
2120
_static/:
22-
basic_screenshot.png default.css logo.png
21+
basic_screenshot.png default.css
2322

2423
_templates/:
2524
layout.html
2625

2726
Sphinx will automatically pick up the css and layout html files since
2827
we put them in the default places with the default names, but we have
29-
to manually include the logo in our :file:`layout.html`. Let's take a
30-
look at the layout file: the first part puts a horizontal navigation
31-
bar at the top of our page, like you see on the `sphinx
28+
to manually edit the top of :file:`layout.html` to style the title.
29+
Let's take a look at the layout file: the first part puts a horizontal
30+
navigation bar at the top of our page, like you see on the `sphinx
3231
<http://sphinx.pocoo.org>`_ and `matplotlib
3332
<http://matplotlib.sourceforge.net/>`_ sites, the second part includes
34-
a logo that when we click on it will take us `home` and the last part
33+
a title that when we click on it will take us `home` and the last part
3534
moves the vertical navigation panels to the right side of the page::
3635

3736
{% extends "!layout.html" %}
@@ -40,15 +39,13 @@ moves the vertical navigation panels to the right side of the page::
4039
{% block rootrellink %}
4140
<li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
4241
<li><a href="{{ pathto('search') }}">search</a>|&nbsp;</li>
43-
<li><a href="{{ pathto('contents') }}">documentation </a> &raquo;</li>
4442
{% endblock %}
4543

4644

4745
{% block relbar1 %}
4846

4947
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
50-
<a href="{{ pathto('index') }}"><img src="{{
51-
pathto("_static/logo.png", 1) }}" border="0" alt="sampledoc"/></a>
48+
<a href="{{ pathto('index') }}"><h1 style="font-size: 3em;">Sampledoc</h1></a>
5249
</div>
5350
{{ super() }}
5451
{% endblock %}

sampledoc/_sources/extensions.txt renamed to sampledoc/_sources/extensions.rst.txt

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ our :file:`sampledoc` project :file:`sphinxext` directory::
1818
home:~/tmp/sampledoc> mkdir sphinxext
1919
home:~/tmp/sampledoc> cp ../sampledoc_tut/sphinxext/*.py sphinxext/
2020
home:~/tmp/sampledoc> ls sphinxext/
21-
apigen.py docscrape_sphinx.py ipython_console_highlighting.py
22-
docscrape.py inheritance_diagram.py numpydoc.py
21+
apigen.py docscrape.py docscrape_sphinx.py numpydoc.py
2322

2423
In addition to the builtin matplotlib extensions for embedding pyplot
2524
plots and rendering math with matplotlib's native math engine, we also
@@ -36,19 +35,17 @@ file by adding the following. First we tell it where to find the extensions::
3635

3736
And then we tell it what extensions to load::
3837

39-
# Add any Sphinx extension module names here, as strings. They can
40-
# be extensions coming with Sphinx (named 'sphinx.ext.*') or your
41-
# custom ones.
42-
extensions = [
43-
'matplotlib.sphinxext.mathmpl',
44-
'matplotlib.sphinxext.only_directives',
45-
'matplotlib.sphinxext.plot_directive',
46-
'matplotlib.sphinxext.ipython_directive',
47-
'sphinx.ext.autodoc',
48-
'sphinx.ext.doctest',
49-
'ipython_console_highlighting',
50-
'inheritance_diagram',
51-
'numpydoc']
38+
# Add any Sphinx extension module names here, as strings. They can be extensions
39+
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
40+
extensions = ['matplotlib.sphinxext.only_directives',
41+
'matplotlib.sphinxext.plot_directive',
42+
'IPython.sphinxext.ipython_directive',
43+
'IPython.sphinxext.ipython_console_highlighting',
44+
'sphinx.ext.mathjax',
45+
'sphinx.ext.autodoc',
46+
'sphinx.ext.doctest',
47+
'sphinx.ext.inheritance_diagram',
48+
'numpydoc']
5249

5350
Now let's look at some of these in action. You can see the literal
5451
source for this file at :ref:`extensions-literal`.
@@ -115,25 +112,18 @@ which is rendered as
115112
116113
W^{3\beta}_{\delta_1 \rho_1 \sigma_2} \approx U^{3\beta}_{\delta_1 \rho_1}
117114
118-
This documentation framework includes a Sphinx extension,
119-
:file:`sphinxext/mathmpl.py`, that uses matplotlib to render math
120-
equations when generating HTML, and LaTeX itself when generating a
121-
PDF. This can be useful on systems that have matplotlib, but not
122-
LaTeX, installed. To use it, add ``mathmpl`` to the list of
123-
extensions in :file:`conf.py`.
115+
Recent versions of Sphinx include built-in support for math.
116+
There are three flavors:
124117

125-
Current SVN versions of Sphinx now include built-in support for math.
126-
There are two flavors:
118+
- sphinx.ext.pngmath: uses dvipng to render the equation
127119

128-
- pngmath: uses dvipng to render the equation
120+
- sphinx.ext.mathjax: renders the math in the browser using Javascript
129121

130-
- jsmath: renders the math in the browser using Javascript
122+
- sphinx.ext.jsmath: it's an older code, but it checks out
131123

132-
To use these extensions instead, add ``sphinx.ext.pngmath`` or
133-
``sphinx.ext.jsmath`` to the list of extensions in :file:`conf.py`.
124+
Additionally, matplotlib has its own math support:
134125

135-
All three of these options for math are designed to behave in the same
136-
way.
126+
- matplotlib.sphinxext.mathmpl
137127

138128
See the matplotlib `mathtext guide
139129
<http://matplotlib.sourceforge.net/users/mathtext.html>`_ for lots
File renamed without changes.

0 commit comments

Comments
 (0)