merge with trunk

This commit is contained in:
Georg Brandl 2010-04-17 13:00:19 +02:00
commit 722f9ac329
9 changed files with 28 additions and 10 deletions

10
CHANGES
View File

@ -123,6 +123,16 @@ Release 1.0 (in development)
Release 0.6.6 (in development)
==============================
* #387: Fix the display of search results in ``dirhtml`` output.
* #376: In autodoc, fix display of parameter defaults containing
backslashes.
* #370: Fix handling of complex list item labels in LaTeX output.
* #374: Make the ``doctest_path`` config value of the doctest
extension actually work.
* Fix the handling of multiple toctrees when creating the global
TOC for the ``toctree()`` template function.

View File

@ -151,7 +151,8 @@ General configuration
:confval:`language`), relative to the source directory. The directories on
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 must be in
settting, the message catalogs (compiled from ``.po`` format using
:program:`msgfmt`) must be in
:file:`./locale/{language}/LC_MESSAGES/sphinx.mo`.
The default is ``[]``.

View File

@ -201,7 +201,7 @@ The ``todo`` directive function looks like this::
def run(self):
env = self.state.document.settings.env
targetid = "todo-%s" % env.new_serialno('todo')
targetid = "todo-%d" % env.new_serialno('todo')
targetnode = nodes.target('', '', ids=[targetid])
ad = make_admonition(todo, self.name, [_('Todo')], self.options,

View File

@ -841,7 +841,10 @@ class FunctionDocumenter(ModuleLevelDocumenter):
argspec = inspect.getargspec(self.object.__init__)
if argspec[0]:
del argspec[0][0]
return inspect.formatargspec(*argspec)
args = inspect.formatargspec(*argspec)
# escape backslashes for reST
args = args.replace('\\', '\\\\')
return args
def document_members(self, all_members=False):
pass

View File

@ -196,6 +196,8 @@ class DocTestBuilder(Builder):
# that code nevertheless, we monkey-patch the "compile" it uses.
doctest.compile = self.compile
sys.path[0:0] = self.config.doctest_path
self.type = 'single'
self.total_failures = 0
@ -246,8 +248,6 @@ Doctest summary
if self.total_failures or self.setup_failures:
self.app.statuscode = 1
sys.path[0:0] = self.config.doctest_path
def write(self, build_docnames, updated_docnames, method='update'):
if build_docnames is None:
build_docnames = sorted(self.env.all_docs)

View File

@ -444,7 +444,8 @@
% Include hyperref last.
\RequirePackage[colorlinks,breaklinks,
linkcolor=InnerLinkColor,filecolor=OuterLinkColor,
menucolor=OuterLinkColor,urlcolor=OuterLinkColor]{hyperref}
menucolor=OuterLinkColor,urlcolor=OuterLinkColor,
citecolor=InnerLinkColor]{hyperref}
% From docutils.writers.latex2e
\providecommand{\DUspan}[2]{%

View File

@ -15,6 +15,8 @@
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
(not sidebars == []) %}
{%- set url_root = pathto('', 1) %}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- macro relbar() %}
<div class="related">
@ -96,7 +98,7 @@
{%- if not embedded %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '{{ pathto("", 1) }}',
URL_ROOT: '{{ url_root }}',
VERSION: '{{ release|e }}',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '{{ file_suffix }}',

View File

@ -465,7 +465,8 @@ var Search = {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.get('_sources/' + item[0] + '.txt', function(data) {
$.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' +
item[0] + '.txt', function(data) {
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
Search.output.append(listItem);
listItem.slideDown(5, function() {

View File

@ -740,10 +740,10 @@ class LaTeXTranslator(nodes.NodeVisitor):
pass
def visit_term(self, node):
ctx = '] \\leavevmode'
ctx = '}] \\leavevmode'
if node.has_key('ids') and node['ids']:
ctx += self.hypertarget(node['ids'][0])
self.body.append('\\item[')
self.body.append('\\item[{')
self.context.append(ctx)
def depart_term(self, node):
self.body.append(self.context.pop())