This repository has been archived by the owner on Dec 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
diff_between_06_10.txt
6189 lines (5629 loc) · 218 KB
/
diff_between_06_10.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff -r 4be5ab514177 doc/Makefile
--- a/doc/Makefile Tue Jun 16 23:45:41 2009 +0200
+++ b/doc/Makefile Sat Apr 24 15:13:23 2010 +0900
@@ -9,9 +9,9 @@
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) \
- $(SPHINXOPTS) .
+ $(SPHINXOPTS) $(O) .
-.PHONY: help clean html dirhtml pickle htmlhelp qthelp latex changes linkcheck doctest
+.PHONY: help clean html dirhtml pickle htmlhelp qthelp latex changes linkcheck doctest man
help:
@echo "Please use \`make <target>' where <target> is one of"
@@ -19,7 +19,9 @@
@echo " dirhtml to make HTML files called index.html in directories"
@echo " pickle to make pickle files"
@echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " epub to make an epub file"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " man to make manual pages"
@echo " changes to make an overview over all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@@ -27,36 +29,40 @@
-rm -rf _build/*
html:
- mkdir -p _build/html _build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
@echo
@echo "Build finished. The HTML pages are in _build/html."
dirhtml:
- mkdir -p _build/dirhtml _build/doctrees
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
@echo
@echo "Build finished. The HTML pages are in _build/dirhtml."
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) _build/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in _build/singlehtml."
+
text:
- mkdir -p _build/text _build/doctrees
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) _build/text
@echo
@echo "Build finished."
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) _build/man
+ @echo
+ @echo "Build finished."
+
pickle:
- mkdir -p _build/pickle _build/doctrees
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
htmlhelp:
- mkdir -p _build/htmlhelp _build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in _build/htmlhelp."
qthelp:
- mkdir -p _build/qthelp _build/doctrees
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
@echo
@echo "Build finished; now you can run qcollectiongenerator with the" \
@@ -65,8 +71,12 @@
@echo "To view the help collection:"
@echo "# assistant -collectionFile _build/qthelp/Sphinx.qhc"
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) _build/epub
+ @echo
+ @echo "Build finished. The epub file is in _build/epub."
+
latex:
- mkdir -p _build/latex _build/doctrees
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
@echo
@echo "Build finished; the LaTeX files are in _build/latex."
@@ -74,18 +84,15 @@
"run these through (pdf)latex."
changes:
- mkdir -p _build/changes _build/doctrees
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
@echo
@echo "The overview file is in _build/changes."
linkcheck:
- mkdir -p _build/linkcheck _build/doctrees
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in _build/linkcheck/output.txt."
doctest:
- mkdir -p _build/doctest _build/doctrees
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
diff -r 4be5ab514177 doc/_templates/index.html
--- a/doc/_templates/index.html Tue Jun 16 23:45:41 2009 +0200
+++ b/doc/_templates/index.html Sat Apr 24 15:13:23 2010 +0900
@@ -4,7 +4,7 @@
<h1>Welcome</h1>
<div class="quotebar">
- <p>What users say:</p>
+ <p><em>What users say:</em></p>
<p>“Cheers for a great tool that actually makes programmers <b>want</b>
to write documentation!”</p>
</div>
@@ -12,28 +12,30 @@
<p>
Sphinx is a tool that makes it easy to create intelligent and beautiful
documentation, written by Georg Brandl and licensed under the BSD license.</p>
- <p>It was originally created to translate <a href="http://docs.python.org/dev/">the
- new Python documentation</a>, and it has excellent support for the documentation
- of Python projects, but other documents can be written with it too. Of course,
- this site is also created from reStructuredText sources using Sphinx!
+ <p>It was originally created for <a href="http://docs.python.org/dev/">the
+ new Python documentation</a>, and it has excellent facilities for the
+ documentation of Python projects, but C/C++ is already supported as well,
+ and it is planned to add special support for other languages as well. Of
+ course, this site is also created from reStructuredText sources using
+ Sphinx!
</p>
<p>
- It is still under constant development, and the following features are
- already present, work fine and can be seen “in action” in the
- Python docs:
+ Sphinx is under constant development. The following features are present,
+ work fine and can be seen “in action” in the Python docs:
</p>
<ul>
- <li><b>Output formats:</b> HTML (including Windows HTML Help) and LaTeX, for
- printable PDF versions</li>
+ <li><b>Output formats:</b> HTML (including Windows HTML Help), LaTeX (for
+ printable PDF versions), manual pages, plain text</li>
<li><b>Extensive cross-references:</b> semantic markup and automatic links
- for functions, classes, glossary terms and similar pieces of information</li>
+ for functions, classes, citations, glossary terms and similar pieces of
+ information</li>
<li><b>Hierarchical structure:</b> easy definition of a document tree, with
- automatic links to siblings, parents and children</li>
+ automatic links to siblings, parents and children</li>
<li><b>Automatic indices:</b> general index as well as a module index</li>
<li><b>Code handling:</b> automatic highlighting using the <a
- href="http://pygments.org">Pygments</a> highlighter</li>
+ href="http://pygments.org">Pygments</a> highlighter</li>
<li><b>Extensions:</b> automatic testing of code snippets, inclusion of
- docstrings from Python modules, and more</li>
+ docstrings from Python modules (API docs), and more</li>
</ul>
<p>
Sphinx uses <a href="http://docutils.sf.net/rst.html">reStructuredText</a>
@@ -42,35 +44,47 @@
suite, the <a href="http://docutils.sf.net/">Docutils</a>.
</p>
+ <h2>Documentation</h2>
+
+ <table class="contentstable" align="center" style="margin-left: 30px"><tr>
+ <td width="50%">
+ <p class="biglink"><a class="biglink" href="{{ pathto("tutorial") }}">First steps with Sphinx</a><br/>
+ <span class="linkdescr">overview of basic tasks</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">Contents</a><br/>
+ <span class="linkdescr">for a complete overview</span></p>
+ </td><td width="50%">
+ <p class="biglink"><a class="biglink" href="{{ pathto("search") }}">Search page</a><br/>
+ <span class="linkdescr">search the documentation</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">General Index</a><br/>
+ <span class="linkdescr">all functions, classes, terms</span></p>
+ </td></tr>
+ </table>
+
+ <p>
+ You can also download PDF versions of the Sphinx documentation:
+ a <a href="http://sphinx.pocoo.org/sphinx.pdf">version</a> generated from
+ the LaTeX Sphinx produces, and
+ a <a href="http://sphinx.pocoo.org/sphinx-rst2pdf.pdf">version</a> generated
+ by rst2pdf.
+ </p>
+
<h2>Examples</h2>
- <p>
- The <a href="http://docs.python.org/dev/">Python documentation</a> and
- this page are different examples of Sphinx in use.
- You can also download a <a href="http://sphinx.pocoo.org/sphinx.pdf">PDF version</a>
- of the Sphinx documentation, generated from the LaTeX Sphinx produces.
+ <p>Links to documentation generated with Sphinx can be found on the
+ <a href="{{ pathto("examples") }}">Projects using Sphinx</a> page.
</p>
<p>
- For examples of how Sphinx source files look, use the “Show source”
- links on all pages of the documentation apart from this welcome page.
- </p>
- <p>Links to more documentation generated with Sphinx can be found on the
- <a href="{{ pathto("examples") }}">Projects using Sphinx</a> page.
+ For examples of how Sphinx source files look, use the “Show
+ source” links on all pages of the documentation apart from this
+ welcome page.
</p>
- <h2>Documentation</h2>
- <table class="contentstable" align="center" style="margin-left: 30px"><tr>
- <td width="50%">
- <p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">Contents</a><br/>
- <span class="linkdescr">for a complete overview</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("search") }}">Search page</a><br/>
- <span class="linkdescr">search the documentation</span></p>
- </td><td width="50%">
- <p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">General Index</a><br/>
- <span class="linkdescr">all functions, classes, terms</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("modindex") }}">Module Index</a><br/>
- <span class="linkdescr">quick access to all documented modules</span></p>
- </td></tr>
- </table>
+ <p>You may also be interested in the very nice
+ <a href="http://matplotlib.sourceforge.net/sampledoc/">tutorial</a> on how to
+ create a customized documentation using Sphinx written by the matplotlib
+ developers.</p>
+
+ <p>There is a <a href="http://sphinx.shibu.jp/">Japanese translation</a>
+ of this documentation, thanks to Yoshiki Shibukawa.</p>
<h2>Get Sphinx</h2>
<p>
diff -r 4be5ab514177 doc/_templates/indexsidebar.html
--- a/doc/_templates/indexsidebar.html Tue Jun 16 23:45:41 2009 +0200
+++ b/doc/_templates/indexsidebar.html Sat Apr 24 15:13:23 2010 +0900
@@ -11,6 +11,8 @@
<p>Get Sphinx from the <a href="http://pypi.python.org/pypi/Sphinx">Python Package
Index</a>, or install it with:</p>
<pre>easy_install -U Sphinx</pre>
+<p>Latest <a href="http://sphinx.pocoo.org/latest/">development version docs</a>
+are also available.</p>
{% endif %}
<h3>Questions? Suggestions?</h3>
diff -r 4be5ab514177 doc/_templates/layout.html
--- a/doc/_templates/layout.html Tue Jun 16 23:45:41 2009 +0200
+++ b/doc/_templates/layout.html Sat Apr 24 15:13:23 2010 +0900
@@ -1,8 +1,19 @@
{% extends "!layout.html" %}
+{% block extrahead %}
+{{ super() }}
+{%- if not embedded %}
+<style type="text/css">
+ table.right { float: right; margin-left: 20px; }
+ table.right td { border: 1px solid #ccc; }
+</style>
+{%- endif %}
+{% endblock %}
+
{% block rootrellink %}
<li><a href="{{ pathto('index') }}">Sphinx home</a> | </li>
- <li><a href="{{ pathto('contents') }}">Documentation</a>»</li>
+ <li><a href="{{ pathto('contents') }}">Documentation</a>
+ »</li>
{% endblock %}
{% block header %}
diff -r 4be5ab514177 doc/builders.rst
--- a/doc/builders.rst Tue Jun 16 23:45:41 2009 +0200
+++ b/doc/builders.rst Sat Apr 24 15:13:23 2010 +0900
@@ -36,6 +36,17 @@
.. versionadded:: 0.6
+.. class:: SingleFileHTMLBuilder
+
+ This is an HTML builder that combines the whole project in one output file.
+ (Obviously this only works with smaller projects.) The file is named like
+ the master document. No indices will be generated.
+
+ Its name is ``singlehtml``.
+
+ .. versionadded:: 1.0
+
+.. module:: sphinx.builders.htmlhelp
.. class:: HTMLHelpBuilder
This builder produces the same output as the standalone HTML builder, but
@@ -44,6 +55,41 @@
Its name is ``htmlhelp``.
+.. module:: sphinx.builders.qthelp
+.. class:: QtHelpBuilder
+
+ This builder produces the same output as the standalone HTML builder, but
+ also generates `Qt help`_ collection support files that allow
+ the Qt collection generator to compile them.
+
+ Its name is ``qthelp``.
+
+ .. _Qt help: http://doc.trolltech.com/4.6/qthelp-framework.html
+
+.. module:: sphinx.builders.devhelp
+.. class:: DevhelpBuilder
+
+ This builder produces the same output as the standalone HTML builder, but
+ also generates `GNOME Devhelp <http://live.gnome.org/devhelp>`__
+ support file that allows the GNOME Devhelp reader to view them.
+
+ Its name is ``devhelp``.
+
+.. module:: sphinx.builders.epub
+.. class:: EpubBuilder
+
+ This builder produces the same output as the standalone HTML builder, but
+ also generates an *epub* file for ebook readers. See :ref:`epub-faq` for
+ details about it. For definition of the epub format, have a look at
+ `<http://www.idpf.org/specs.htm>`_ or `<http://en.wikipedia.org/wiki/EPUB>`_.
+
+ Some ebook readers do not show the link targets of references. Therefore
+ this builder adds the targets after the link when necessary. The display
+ of the URLs can be customized by adding CSS rules for the class
+ ``link-target``.
+
+ Its name is ``epub``.
+
.. module:: sphinx.builders.latex
.. class:: LaTeXBuilder
@@ -65,6 +111,12 @@
Its name is ``latex``.
+Note that a direct PDF builder using ReportLab is available in `rst2pdf
+<http://rst2pdf.googlecode.com>`_ version 0.12 or greater. You need to add
+``'rst2pdf.pdfbuilder'`` to your :confval:`extensions` to enable it, its name is
+``pdf``. Refer to the `rst2pdf manual
+<http://lateral.netmanagers.com.ar/static/manual.pdf>`_ for details.
+
.. module:: sphinx.builders.text
.. class:: TextBuilder
@@ -76,6 +128,22 @@
.. versionadded:: 0.4
+.. module:: sphinx.builders.manpage
+.. class:: ManualPageBuilder
+
+ This builder produces manual pages in the groff format. You have to specify
+ which documents are to be included in which manual pages via the
+ :confval:`man_pages` configuration value.
+
+ Its name is ``man``.
+
+ .. note::
+
+ This builder requires the docutils manual page writer, which is only
+ available as of docutils 0.6.
+
+ .. versionadded:: 1.0
+
.. currentmodule:: sphinx.builders.html
.. class:: SerializingHTMLBuilder
@@ -83,7 +151,7 @@
(`pickle`, `simplejson`, `phpserialize`, and others) to dump the generated
HTML documentation. The pickle builder is a subclass of it.
- A concreate subclass of this builder serializing to the `PHP serialization`_
+ A concrete subclass of this builder serializing to the `PHP serialization`_
format could look like this::
import phpserialize
@@ -155,8 +223,8 @@
.. module:: sphinx.builders.changes
.. class:: ChangesBuilder
- This builder produces an HTML overview of all :dir:`versionadded`,
- :dir:`versionchanged` and :dir:`deprecated` directives for the current
+ This builder produces an HTML overview of all :rst:dir:`versionadded`,
+ :rst:dir:`versionchanged` and :rst:dir:`deprecated` directives for the current
:confval:`version`. This is useful to generate a ChangeLog file, for
example.
@@ -228,8 +296,8 @@
``project``, ``copyright``, ``release``, ``version``
The same values as given in the configuration file.
- ``style``, ``use_modindex``
- :confval:`html_style` and :confval:`html_use_modindex`, respectively.
+ ``style``
+ :confval:`html_style`.
``last_updated``
Date of last build.
@@ -254,7 +322,9 @@
``environment.pickle``
The build environment. This is always a pickle file, independent of the
builder and a copy of the environment that was used when the builder was
- started. (XXX: document common members)
+ started.
- Unlike the other pickle files this pickle file requires that the sphinx
- module is available on unpickling.
+ .. todo:: Document common members.
+
+ Unlike the other pickle files this pickle file requires that the ``sphinx``
+ package is available on unpickling.
diff -r 4be5ab514177 doc/concepts.rst
--- a/doc/concepts.rst Tue Jun 16 23:45:41 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-.. highlight:: rest
-
-.. _concepts:
-
-Sphinx concepts
-===============
-
-Document names
---------------
-
-Since the reST source files can have different extensions (some people like
-``.txt``, some like ``.rst`` -- the extension can be configured with
-:confval:`source_suffix`) and different OSes have different path separators,
-Sphinx abstracts them: all "document names" are relative to the :term:`source
-directory`, the extension is stripped, and path separators are converted to
-slashes. All values, parameters and suchlike referring to "documents" expect
-such a document name.
-
-Examples for document names are ``index``, ``library/zipfile``, or
-``reference/datamodel/types``. Note that there is no leading slash.
-
-
-The TOC tree
-------------
-
-.. index:: pair: table of; contents
-
-Since reST does not have facilities to interconnect several documents, or split
-documents into multiple output files, Sphinx uses a custom directive to add
-relations between the single files the documentation is made of, as well as
-tables of contents. The ``toctree`` directive is the central element.
-
-.. directive:: toctree
-
- This directive inserts a "TOC tree" at the current location, using the
- individual TOCs (including "sub-TOC trees") of the documents given in the
- directive body (whose path is relative to the document the directive occurs
- in). A numeric ``maxdepth`` option may be given to indicate the depth of the
- tree; by default, all levels are included. [#]_
-
- Consider this example (taken from the Python docs' library reference index)::
-
- .. toctree::
- :maxdepth: 2
-
- intro
- strings
- datatypes
- numeric
- (many more documents listed here)
-
- This accomplishes two things:
-
- * Tables of contents from all those documents are inserted, with a maximum
- depth of two, that means one nested heading. ``toctree`` directives in
- those documents are also taken into account.
- * Sphinx knows that the relative order of the documents ``intro``,
- ``strings`` and so forth, and it knows that they are children of the shown
- document, the library index. From this information it generates "next
- chapter", "previous chapter" and "parent chapter" links.
-
- Document titles in the :dir:`toctree` will be automatically read from the
- title of the referenced document. If that isn't what you want, you can
- specify an explicit title and target using a similar syntax to reST
- hyperlinks (and Sphinx's :ref:`cross-referencing syntax <xref-syntax>`). This
- looks like::
-
- .. toctree::
-
- intro
- All about strings <strings>
- datatypes
-
- The second line above will link to the ``strings`` document, but will use the
- title "All about strings" instead of the title of the ``strings`` document.
-
- You can also add external links, by giving an HTTP URL instead of a document
- name.
-
- If you want to have section numbers even in HTML output, give the toctree a
- ``numbered`` flag option. For example::
-
- .. toctree::
- :numbered:
-
- foo
- bar
-
- Numbering then starts at the heading of ``foo``. Sub-toctrees are
- automatically numbered (don't give the ``numbered`` flag to those).
-
- You can use "globbing" in toctree directives, by giving the ``glob`` flag
- option. All entries are then matched against the list of available
- documents, and matches are inserted into the list alphabetically. Example::
-
- .. toctree::
- :glob:
-
- intro*
- recipe/*
- *
-
- This includes first all documents whose names start with ``intro``, then all
- documents in the ``recipe`` folder, then all remaining documents (except the
- one containing the directive, of course.) [#]_
-
- The special entry name ``self`` stands for the document containing the
- toctree directive. This is useful if you want to generate a "sitemap" from
- the toctree.
-
- You can also give a "hidden" option to the directive, like this::
-
- .. toctree::
- :hidden:
-
- doc_1
- doc_2
-
- This will still notify Sphinx of the document hierarchy, but not insert links
- into the document at the location of the directive -- this makes sense if you
- intend to insert these links yourself, in a different style, or in the HTML
- sidebar.
-
- In the end, all documents in the :term:`source directory` (or subdirectories)
- must occur in some ``toctree`` directive; Sphinx will emit a warning if it
- finds a file that is not included, because that means that this file will not
- be reachable through standard navigation. Use :confval:`unused_documents` to
- explicitly exclude documents from building, and :confval:`exclude_dirs` to
- exclude whole directories.
-
- The "master document" (selected by :confval:`master_doc`) is the "root" of
- the TOC tree hierarchy. It can be used as the documentation's main page, or
- as a "full table of contents" if you don't give a ``maxdepth`` option.
-
- .. versionchanged:: 0.3
- Added "globbing" option.
-
- .. versionchanged:: 0.6
- Added "numbered" and "hidden" options as well as external links and
- support for "self" references.
-
-
-Special names
--------------
-
-Sphinx reserves some document names for its own use; you should not try to
-create documents with these names -- it will cause problems.
-
-The special document names (and pages generated for them) are:
-
-* ``genindex``, ``modindex``, ``search``
-
- These are used for the general index, the module index, and the search page,
- respectively.
-
- The general index is populated with entries from modules, all index-generating
- :ref:`description units <desc-units>`, and from :dir:`index` directives.
-
- The module index contains one entry per :dir:`module` directive.
-
- The search page contains a form that uses the generated JSON search index and
- JavaScript to full-text search the generated documents for search words; it
- should work on every major browser that supports modern JavaScript.
-
-* every name beginning with ``_``
-
- Though only few such names are currently used by Sphinx, you should not create
- documents or document-containing directories with such names. (Using ``_`` as
- a prefix for a custom template directory is fine.)
-
-
-.. rubric:: Footnotes
-
-.. [#] The ``maxdepth`` option does not apply to the LaTeX writer, where the
- whole table of contents will always be presented at the begin of the
- document, and its depth is controlled by the ``tocdepth`` counter, which
- you can reset in your :confval:`latex_preamble` config value using
- e.g. ``\setcounter{tocdepth}{2}``.
-
-.. [#] A note on available globbing syntax: you can use the standard shell
- constructs ``*``, ``?``, ``[...]`` and ``[!...]`` with the feature that
- these all don't match slashes. A double star ``**`` can be used to match
- any sequence of characters *including* slashes.
diff -r 4be5ab514177 doc/conf.py
--- a/doc/conf.py Tue Jun 16 23:45:41 2009 +0200
+++ b/doc/conf.py Sat Apr 24 15:13:23 2010 +0900
@@ -2,108 +2,73 @@
#
# Sphinx documentation build configuration file
-import sys, os, re
+import re
+import sphinx
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.addons.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo',
+ 'sphinx.ext.autosummary', 'sphinx.ext.extlinks']
-# Add any paths that contain templates here, relative to this directory.
+master_doc = 'contents'
templates_path = ['_templates']
+exclude_patterns = ['_build']
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The master toctree document.
-master_doc = 'contents'
-
-# General substitutions.
project = 'Sphinx'
-copyright = '2007-2009, Georg Brandl'
-
-# The default replacements for |version| and |release|, also used in various
-# other places throughout the built documents.
-import sphinx
+copyright = '2007-2010, Georg Brandl'
version = sphinx.__released__
release = version
-
-# Show author directives in the output.
show_authors = True
-# The HTML template theme.
html_theme = 'sphinxdoc'
-
-# A list of ignored prefixes names for module index sorting.
modindex_common_prefix = ['sphinx.']
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-html_last_updated_fmt = '%b %d, %Y'
-
-# Content template for the index page.
html_index = 'index.html'
-
-# Custom sidebar templates, maps page names to templates.
-html_sidebars = {'index': 'indexsidebar.html'}
-
-# Additional templates that should be rendered to pages, maps page names to
-# templates.
+html_sidebars = {'index': ['indexsidebar.html', 'searchbox.html']}
html_additional_pages = {'index': 'index.html'}
-
-# Generate an OpenSearch description with that URL as the base.
html_use_opensearch = 'http://sphinx.pocoo.org'
-# Output file base name for HTML help builder.
htmlhelp_basename = 'Sphinxdoc'
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
+epub_theme = 'epub'
+epub_basename = 'sphinx'
+epub_author = 'Georg Brandl'
+epub_publisher = 'http://sphinx.pocoo.org/'
+epub_scheme = 'url'
+epub_identifier = epub_publisher
+epub_pre_files = [('index', 'Welcome')]
+epub_exclude_files = ['_static/opensearch.xml', '_static/doctools.js',
+ '_static/jquery.js', '_static/searchtools.js',
+ '_static/basic.css', 'search.html']
+
latex_documents = [('contents', 'sphinx.tex', 'Sphinx Documentation',
'Georg Brandl', 'manual', 1)]
-
-# Add our logo to the LaTeX file.
latex_logo = '_static/sphinx.png'
-
-# Additional stuff for the LaTeX preamble.
latex_elements = {
- 'fontpkg': '\\usepackage{palatino}'
+ 'fontpkg': '\\usepackage{palatino}',
}
-# Put TODOs into the output.
+autodoc_member_order = 'groupwise'
todo_include_todos = True
+extlinks = {'rstref': ('http://docutils.sourceforge.net/docs/ref/rst/'
+ 'restructuredtext.html#%s', ''),
+ 'rstrole': ('http://docutils.sourceforge.net/docs/ref/rst/'
+ 'roles.html#%s', ''),
+ 'rstdir': ('http://docutils.sourceforge.net/docs/ref/rst/'
+ 'directives.html#%s', '')}
+
+man_pages = [
+ ('contents', 'sphinx-all', 'Sphinx documentation generator system manual',
+ 'Georg Brandl', 1),
+ ('man/sphinx-build', 'sphinx-build', 'Sphinx documentation generator tool',
+ '', 1),
+ ('man/sphinx-quickstart', 'sphinx-quickstart', 'Sphinx documentation '
+ 'template generator', '', 1),
+]
# -- Extension interface -------------------------------------------------------
from sphinx import addnodes
-dir_sig_re = re.compile(r'\.\. ([^:]+)::(.*)$')
-
-def parse_directive(env, sig, signode):
- if not sig.startswith('.'):
- dec_sig = '.. %s::' % sig
- signode += addnodes.desc_name(dec_sig, dec_sig)
- return sig
- m = dir_sig_re.match(sig)
- if not m:
- signode += addnodes.desc_name(sig, sig)
- return sig
- name, args = m.groups()
- dec_name = '.. %s::' % name
- signode += addnodes.desc_name(dec_name, dec_name)
- signode += addnodes.desc_addname(args, args)
- return name
-
-
-def parse_role(env, sig, signode):
- signode += addnodes.desc_name(':%s:' % sig, ':%s:' % sig)
- return sig
-
event_sig_re = re.compile(r'([a-zA-Z-]+)\s*\((.*)\)')
@@ -125,9 +90,7 @@
def setup(app):
from sphinx.ext.autodoc import cut_lines
app.connect('autodoc-process-docstring', cut_lines(4, what=['module']))
- app.add_description_unit('directive', 'dir', 'pair: %s; directive',
- parse_directive)
- app.add_description_unit('role', 'role', 'pair: %s; role', parse_role)
app.add_description_unit('confval', 'confval',
- 'pair: %s; configuration value')
+ objname='configuration value',
+ indextemplate='pair: %s; configuration value')
app.add_description_unit('event', 'event', 'pair: %s; event', parse_event)
diff -r 4be5ab514177 doc/config.rst
--- a/doc/config.rst Tue Jun 16 23:45:41 2009 +0200
+++ b/doc/config.rst Sat Apr 24 15:13:23 2010 +0900
@@ -1,5 +1,7 @@
.. highlightlang:: python
+.. _build-config:
+
The build configuration file
============================
@@ -85,7 +87,29 @@
.. confval:: master_doc
The document name of the "master" document, that is, the document that
- contains the root :dir:`toctree` directive. Default is ``'contents'``.
+ contains the root :rst:dir:`toctree` directive. Default is ``'contents'``.
+
+.. confval:: exclude_patterns
+
+ A list of glob-style patterns that should be excluded when looking for source
+ files. [1]_ They are matched against the source file names relative to the
+ source directory, using slashes as directory separators on all platforms.
+
+ Example patterns:
+
+ - ``'library/xml.rst'`` -- ignores the ``library/xml.rst`` file (replaces
+ entry in :confval:`unused_docs`
+ - ``'library/xml'`` -- ignores the ``library/xml`` directory (replaces entry
+ in :confval:`exclude_trees`)
+ - ``'library/xml*'`` -- ignores all files and directories starting with
+ ``library/xml``
+ - ``'**/.svn'`` -- ignores all ``.svn`` directories (replaces entry in
+ :confval:`exclude_dirnames`)
+
+ :confval:`exclude_patterns` is also consulted when looking for static files
+ in :confval:`html_static_path`.
+
+ .. versionadded:: 1.0
.. confval:: unused_docs
@@ -93,6 +117,9 @@
toctree. Use this setting to suppress the warning that is normally emitted
in that case.
+ .. deprecated:: 1.0
+ Use :confval:`exclude_patterns` instead.
+
.. confval:: exclude_trees
A list of directory paths, relative to the source directory, that are to be
@@ -101,6 +128,9 @@
.. versionadded:: 0.4
+ .. deprecated:: 1.0
+ Use :confval:`exclude_patterns` instead.
+
.. confval:: exclude_dirnames
A list of directory names that are to be excluded from any recursive
@@ -110,15 +140,8 @@
.. versionadded:: 0.5
-.. confval:: exclude_dirs
-
- A list of directory names, relative to the source directory, that are to be
- excluded from the search for source files.
-
- .. deprecated:: 0.5
- This does not take subdirs of the excluded directories into account. Use
- :confval:`exclude_trees` or :confval:`exclude_dirnames`, which match the
- expectations.
+ .. deprecated:: 1.0
+ Use :confval:`exclude_patterns` instead.
.. confval:: locale_dirs
@@ -126,9 +149,10 @@
Directories in which to search for additional Sphinx message catalogs (see
:confval:`language`), relative to the source directory. The directories on
- this path are searched by the standard :mod:`gettext` module for a domain of
- ``sphinx``; so if you add the directory :file:`./locale` to this settting,
- the message catalogs must be in
+ this path are searched by the standard :mod:`gettext` module for a text
+ domain of ``sphinx``; so if you add the directory :file:`./locale` to this
+ settting, the message catalogs (compiled from ``.po`` format using
+ :program:`msgfmt`) must be in
:file:`./locale/{language}/LC_MESSAGES/sphinx.mo`.
The default is ``[]``.
@@ -161,17 +185,33 @@
.. versionadded:: 0.6
+.. confval:: rst_prolog
+
+ A string of reStructuredText that will be included at the beginning of every
+ source file that is read.
+
+ .. versionadded:: 1.0
+
+.. confval:: default_domain
+
+ .. index:: default; domain
+
+ The name of the default :ref:`domain <domains>`. Can also be ``None`` to
+ disable a default domain. The default is ``'py'``.
+
+ .. versionadded:: 1.0
+
.. confval:: default_role
.. index:: default; role
The name of a reST role (builtin or Sphinx extension) to use as the default
role, that is, for text marked up ```like this```. This can be set to
- ``'obj'`` to make ```filter``` a cross-reference to the function "filter".
- The default is ``None``, which doesn't reassign the default role.
+ ``'py:obj'`` to make ```filter``` a cross-reference to the Python function
+ "filter". The default is ``None``, which doesn't reassign the default role.
The default role can always be set within individual documents using the
- standard reST :dir:`default-role` directive.
+ standard reST :rst:dir:`default-role` directive.
.. versionadded:: 0.4
@@ -185,15 +225,21 @@
.. versionadded:: 0.5
+.. confval:: needs_sphinx
-.. confval:: modindex_common_prefix
+ If set to a ``major.minor`` version string like ``'1.1'``, Sphinx will
+ compare it with its version and refuse to build if it is too old. Default is
+ no requirement.
- A list of prefixes that are ignored for sorting the module index (e.g.,
- if this is set to ``['foo.']``, then ``foo.bar`` is shown under ``B``, not
- ``F``). This can be handy if you document a project that consists of a single
- package. Works only for the HTML builder currently. Default is ``[]``.
+ .. versionadded:: 1.0
- .. versionadded:: 0.6
+.. confval:: nitpicky
+
+ If true, Sphinx will warn about *all* references where the target cannot be
+ found. Default is ``False``. You can activate this mode temporarily using
+ the :option:`-n` command-line switch.
+
+ .. versionadded:: 1.0
Project information
@@ -232,6 +278,7 @@
Currently supported languages are:
+ * ``ca`` -- Catalan
* ``cs`` -- Czech
* ``de`` -- German
* ``en`` -- English
@@ -244,7 +291,9 @@
* ``pt_BR`` -- Brazilian Portuguese
* ``ru`` -- Russian
* ``sl`` -- Slovenian
+ * ``tr`` -- Turkish
* ``uk_UA`` -- Ukrainian
+ * ``zh_CN`` -- Simplified Chinese
* ``zh_TW`` -- Traditional Chinese
.. confval:: today
@@ -271,9 +320,8 @@
.. confval:: pygments_style
- The style name to use for Pygments highlighting of source code. Default is
- ``'sphinx'``, which is a builtin style designed to match Sphinx' default
- style.
+ The style name to use for Pygments highlighting of source code. The default
+ style is selected by the theme for HTML output, and ``'sphinx'`` otherwise.
.. versionchanged:: 0.3
If the value is a fully-qualified name of a custom Pygments style class,
@@ -288,14 +336,24 @@
.. confval:: add_module_names
A boolean that decides whether module names are prepended to all
- :term:`description unit` titles, e.g. for :dir:`function` directives.
- Default is ``True``.
+ :term:`object` names (for object types where a "module" of some kind is
+ defined), e.g. for :rst:dir:`function` directives. Default is ``True``.
.. confval:: show_authors
- A boolean that decides whether :dir:`moduleauthor` and :dir:`sectionauthor`
+ A boolean that decides whether :rst:dir:`moduleauthor` and :rst:dir:`sectionauthor`
directives produce any output in the built files.
+.. confval:: modindex_common_prefix
+
+ A list of prefixes that are ignored for sorting the Python module index
+ (e.g., if this is set to ``['foo.']``, then ``foo.bar`` is shown under ``B``,
+ not ``F``). This can be handy if you document a project that consists of a
+ single package. Works only for the HTML builder currently. Default is
+ ``[]``.
+
+ .. versionadded:: 0.6
+
.. confval:: trim_footnote_reference_space
Trim spaces before footnote references that are necessary for the reST parser
@@ -303,6 +361,15 @@
.. versionadded:: 0.6
+.. confval:: trim_doctest_flags
+
+ If true, doctest flags (comments looking like ``# doctest: FLAG, ...``) at
+ the ends of lines are removed for all code blocks showing interactive Python
+ sessions (i.e. doctests). Default is true. See the extension
+ :mod:`~sphinx.ext.doctest` for more possibilities of including doctests.
+
+ .. versionadded:: 1.0
+
.. _html-options:
@@ -389,6 +456,9 @@
.. versionchanged:: 0.4
The paths in :confval:`html_static_path` can now contain subdirectories.
+ .. versionchanged:: 1.0
+ The entries in :confval:`html_static_path` can now be single files.
+
.. confval:: html_last_updated_fmt