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:
Georg Brandl 2008-08-06 14:46:11 +00:00
parent 2bc9b72bfd
commit 26d724cb6d
9 changed files with 115 additions and 35 deletions

View File

@ -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,
Sphinx abstracts them: all "document names" are relative to the :term:`source
directory`, the extension is stripped, and path separators are converted to
slashes :eq:`abc`. All values, parameters and suchlike referring to "documents" expect
such a document :math:`name\sqrt{3}`.
.. 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`.
slashes. All values, parameters and suchlike referring to "documents" expect
such a document name.
The TOC tree

View File

@ -21,9 +21,7 @@ import sys, os, re
# 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.pngmath']
#pngmath_use_preview = True
jsmath_path = '/home/gbr/jsMath/easy/load.js'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

View File

@ -88,11 +88,9 @@ units as well as normal text:
.. 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::
Paragraph contents.
.. centered:: LICENSE AGREEMENT
Table-of-contents markup

View File

@ -604,7 +604,8 @@ class StandaloneHTMLBuilder(Builder):
if path.isfile(fullname):
shutil.copyfile(fullname, targetname)
elif path.isdir(fullname):
shutil.rmtree(targetname)
if path.exists(targetname):
shutil.rmtree(targetname)
shutil.copytree(fullname, targetname)
# copy logo file (handled differently)
if self.config.html_logo:

View File

@ -221,10 +221,9 @@ class HTMLTranslator(BaseTranslator):
maxlen = max(len(name) for name in names)
for production in node:
if production['tokenname']:
lastname = production['tokenname'].ljust(maxlen)
self.body.append(self.starttag(production, 'strong', ''))
self.body.append(production['tokenname'].ljust(maxlen) +
'</strong> ::= ')
lastname = production['tokenname']
self.body.append(lastname + '</strong> ::= ')
else:
self.body.append('%s ' % (' '*len(lastname)))
production.walkabout(self)

View File

@ -243,6 +243,7 @@ var Search = {
var dots = $('<span></span>').appendTo(title);
var status = $('<p style="display: none"></p>').appendTo(out);
var output = $('<ul class="search"/>').appendTo(out);
$('#search-progress').text('Getting search index...')
// spawn a background runner for updating the dots
// until the search has finished
@ -300,6 +301,8 @@ var Search = {
var fileMap = {};
var files = null;
$('#search-progress').empty()
// perform the search on the required words
for (var i = 0; i < searchwords.length; i++) {
var word = searchwords[i];

View File

@ -12,6 +12,7 @@
<form action="" method="get">
<input type="text" name="q" value="" />
<input type="submit" value="search" />
<span id="search-progress" style="padding-left: 10px"></span>
</form>
{% if search_performed %}
<h2>Search Results</h2>

View File

@ -12,6 +12,7 @@ Contents:
images
includes
markup
Indices and tables
==================

101
tests/root/markup.txt Normal file
View 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.