mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merged revisions 65532,65546-65547,65550-65551 via svnmerge from
svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x ........ r65532 | georg.brandl | 2008-08-04 22:35:07 +0000 (Mon, 04 Aug 2008) | 2 lines Add a test file for misc. markup and fix a doc bug. ........ r65546 | georg.brandl | 2008-08-05 09:55:20 +0000 (Tue, 05 Aug 2008) | 2 lines Show an indication while downloading the search index. ........ r65547 | georg.brandl | 2008-08-05 10:07:50 +0000 (Tue, 05 Aug 2008) | 2 lines Fix an indentation problem in production lists. #3477. ........ r65550 | georg.brandl | 2008-08-05 16:21:34 +0000 (Tue, 05 Aug 2008) | 2 lines Remove unused interface.js. ........ r65551 | georg.brandl | 2008-08-06 08:48:21 +0000 (Wed, 06 Aug 2008) | 2 lines Don't try to remove a nonexisting static dir. ........
This commit is contained in:
@@ -13,30 +13,8 @@ Since the reST source files can have different extensions (some people like
|
|||||||
:confval:`source_suffix`) and different OSes have different path separators,
|
:confval:`source_suffix`) and different OSes have different path separators,
|
||||||
Sphinx abstracts them: all "document names" are relative to the :term:`source
|
Sphinx abstracts them: all "document names" are relative to the :term:`source
|
||||||
directory`, the extension is stripped, and path separators are converted to
|
directory`, the extension is stripped, and path separators are converted to
|
||||||
slashes :eq:`abc`. All values, parameters and suchlike referring to "documents" expect
|
slashes. All values, parameters and suchlike referring to "documents" expect
|
||||||
such a document :math:`name\sqrt{3}`.
|
such a document name.
|
||||||
|
|
||||||
.. math::
|
|
||||||
:label: abc
|
|
||||||
|
|
||||||
3x+4y \sqrt{4}
|
|
||||||
|
|
||||||
x+y \\
|
|
||||||
z+z
|
|
||||||
|
|
||||||
.. math:: a+b
|
|
||||||
|
|
||||||
c + d & = 5 \\
|
|
||||||
& = 6
|
|
||||||
|
|
||||||
.. math:: 5x + 6
|
|
||||||
|
|
||||||
.. math::
|
|
||||||
:label: def
|
|
||||||
|
|
||||||
test
|
|
||||||
|
|
||||||
See :eq:`def`.
|
|
||||||
|
|
||||||
|
|
||||||
The TOC tree
|
The TOC tree
|
||||||
|
|||||||
@@ -21,9 +21,7 @@ import sys, os, re
|
|||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||||
# coming with Sphinx (named 'sphinx.addons.*') or your custom ones.
|
# coming with Sphinx (named 'sphinx.addons.*') or your custom ones.
|
||||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.pngmath']
|
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
|
||||||
#pngmath_use_preview = True
|
|
||||||
jsmath_path = '/home/gbr/jsMath/easy/load.js'
|
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -88,11 +88,9 @@ units as well as normal text:
|
|||||||
|
|
||||||
.. directive:: centered
|
.. directive:: centered
|
||||||
|
|
||||||
This directive creates a centered boldfaced paragraph. Use it as follows::
|
This directive creates a centered boldfaced line of text. Use it as follows::
|
||||||
|
|
||||||
.. centered::
|
.. centered:: LICENSE AGREEMENT
|
||||||
|
|
||||||
Paragraph contents.
|
|
||||||
|
|
||||||
|
|
||||||
Table-of-contents markup
|
Table-of-contents markup
|
||||||
|
|||||||
@@ -604,7 +604,8 @@ class StandaloneHTMLBuilder(Builder):
|
|||||||
if path.isfile(fullname):
|
if path.isfile(fullname):
|
||||||
shutil.copyfile(fullname, targetname)
|
shutil.copyfile(fullname, targetname)
|
||||||
elif path.isdir(fullname):
|
elif path.isdir(fullname):
|
||||||
shutil.rmtree(targetname)
|
if path.exists(targetname):
|
||||||
|
shutil.rmtree(targetname)
|
||||||
shutil.copytree(fullname, targetname)
|
shutil.copytree(fullname, targetname)
|
||||||
# copy logo file (handled differently)
|
# copy logo file (handled differently)
|
||||||
if self.config.html_logo:
|
if self.config.html_logo:
|
||||||
|
|||||||
@@ -221,10 +221,9 @@ class HTMLTranslator(BaseTranslator):
|
|||||||
maxlen = max(len(name) for name in names)
|
maxlen = max(len(name) for name in names)
|
||||||
for production in node:
|
for production in node:
|
||||||
if production['tokenname']:
|
if production['tokenname']:
|
||||||
|
lastname = production['tokenname'].ljust(maxlen)
|
||||||
self.body.append(self.starttag(production, 'strong', ''))
|
self.body.append(self.starttag(production, 'strong', ''))
|
||||||
self.body.append(production['tokenname'].ljust(maxlen) +
|
self.body.append(lastname + '</strong> ::= ')
|
||||||
'</strong> ::= ')
|
|
||||||
lastname = production['tokenname']
|
|
||||||
else:
|
else:
|
||||||
self.body.append('%s ' % (' '*len(lastname)))
|
self.body.append('%s ' % (' '*len(lastname)))
|
||||||
production.walkabout(self)
|
production.walkabout(self)
|
||||||
|
|||||||
@@ -243,6 +243,7 @@ var Search = {
|
|||||||
var dots = $('<span></span>').appendTo(title);
|
var dots = $('<span></span>').appendTo(title);
|
||||||
var status = $('<p style="display: none"></p>').appendTo(out);
|
var status = $('<p style="display: none"></p>').appendTo(out);
|
||||||
var output = $('<ul class="search"/>').appendTo(out);
|
var output = $('<ul class="search"/>').appendTo(out);
|
||||||
|
$('#search-progress').text('Getting search index...')
|
||||||
|
|
||||||
// spawn a background runner for updating the dots
|
// spawn a background runner for updating the dots
|
||||||
// until the search has finished
|
// until the search has finished
|
||||||
@@ -300,6 +301,8 @@ var Search = {
|
|||||||
var fileMap = {};
|
var fileMap = {};
|
||||||
var files = null;
|
var files = null;
|
||||||
|
|
||||||
|
$('#search-progress').empty()
|
||||||
|
|
||||||
// perform the search on the required words
|
// perform the search on the required words
|
||||||
for (var i = 0; i < searchwords.length; i++) {
|
for (var i = 0; i < searchwords.length; i++) {
|
||||||
var word = searchwords[i];
|
var word = searchwords[i];
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<form action="" method="get">
|
<form action="" method="get">
|
||||||
<input type="text" name="q" value="" />
|
<input type="text" name="q" value="" />
|
||||||
<input type="submit" value="search" />
|
<input type="submit" value="search" />
|
||||||
|
<span id="search-progress" style="padding-left: 10px"></span>
|
||||||
</form>
|
</form>
|
||||||
{% if search_performed %}
|
{% if search_performed %}
|
||||||
<h2>Search Results</h2>
|
<h2>Search Results</h2>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Contents:
|
|||||||
|
|
||||||
images
|
images
|
||||||
includes
|
includes
|
||||||
|
markup
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
==================
|
==================
|
||||||
|
|||||||
101
tests/root/markup.txt
Normal file
101
tests/root/markup.txt
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
:tocdepth: 2
|
||||||
|
|
||||||
|
Testing various markup
|
||||||
|
======================
|
||||||
|
|
||||||
|
.. sectionauthor:: Georg Brandl
|
||||||
|
|
||||||
|
.. contents:: TOC
|
||||||
|
|
||||||
|
|
||||||
|
Admonitions
|
||||||
|
-----------
|
||||||
|
|
||||||
|
.. note:: Note
|
||||||
|
Note text.
|
||||||
|
|
||||||
|
.. warning:: Warning
|
||||||
|
|
||||||
|
Warning text.
|
||||||
|
|
||||||
|
.. tip:
|
||||||
|
Tip text.
|
||||||
|
|
||||||
|
|
||||||
|
Tables
|
||||||
|
------
|
||||||
|
|
||||||
|
.. tabularcolumns:: |L|L|R|
|
||||||
|
|
||||||
|
+----+----------------+----+
|
||||||
|
| 1 | * Block elems | x |
|
||||||
|
| | * In table | |
|
||||||
|
+----+----------------+----+
|
||||||
|
| 2 | Empty cells: | |
|
||||||
|
+----+----------------+----+
|
||||||
|
|
||||||
|
|
||||||
|
Version markup
|
||||||
|
--------------
|
||||||
|
|
||||||
|
.. versionadded:: 0.5
|
||||||
|
Some funny **stuff**.
|
||||||
|
|
||||||
|
.. versionchanged:: 0.5
|
||||||
|
Even more funny stuff. [#]_
|
||||||
|
|
||||||
|
.. deprecated:: 0.4
|
||||||
|
Boring stuff.
|
||||||
|
|
||||||
|
|
||||||
|
Misc stuff
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
|
||||||
|
`Google <http://www.google.com>`_
|
||||||
|
For everything.
|
||||||
|
|
||||||
|
.. rubric:: Side note
|
||||||
|
|
||||||
|
This is a side note.
|
||||||
|
|
||||||
|
.. centered:: LICENSE AGREEMENT
|
||||||
|
|
||||||
|
.. acks::
|
||||||
|
|
||||||
|
* Terry Pratchett
|
||||||
|
* J. R. R. Tolkien
|
||||||
|
* Monty Python
|
||||||
|
|
||||||
|
.. glossary::
|
||||||
|
|
||||||
|
boson
|
||||||
|
Particle with integer spin.
|
||||||
|
|
||||||
|
fermion
|
||||||
|
Particle with half-integer spin.
|
||||||
|
|
||||||
|
.. productionlist::
|
||||||
|
try_stmt: try1_stmt | try2_stmt
|
||||||
|
try1_stmt: "try" ":" `suite`
|
||||||
|
: ("except" [`expression` ["," `target`]] ":" `suite`)+
|
||||||
|
: ["else" ":" `suite`]
|
||||||
|
: ["finally" ":" `suite`]
|
||||||
|
try2_stmt: "try" ":" `suite`
|
||||||
|
: "finally" ":" `suite`
|
||||||
|
|
||||||
|
|
||||||
|
Index markup
|
||||||
|
------------
|
||||||
|
|
||||||
|
.. index::
|
||||||
|
single: entry
|
||||||
|
pair: entry; pair
|
||||||
|
triple: index; entry; triple
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.. rubric:: Footnotes
|
||||||
|
|
||||||
|
.. [#] Like footnotes.
|
||||||
Reference in New Issue
Block a user