diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py index b1db7863f..00e4307eb 100644 --- a/sphinx/ext/autosummary/__init__.py +++ b/sphinx/ext/autosummary/__init__.py @@ -259,8 +259,8 @@ class Autosummary(Directive): table = nodes.table('') group = nodes.tgroup('', cols=2) table.append(group) - group.append(nodes.colspec('', colwidth=30)) - group.append(nodes.colspec('', colwidth=70)) + group.append(nodes.colspec('', colwidth=10)) + group.append(nodes.colspec('', colwidth=90)) body = nodes.tbody('') group.append(body) @@ -319,7 +319,8 @@ def mangle_signature(sig, max_chars=30): else: sig = ", ".join(args) - return "(%s)" % sig + sig = unicode(sig).replace(u" ", u"\u00a0") + return u"(%s)" % sig # -- Importing items ----------------------------------------------------------- diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 37281fa9f..a0ea19614 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -30,6 +30,7 @@ from sphinx.util.smartypants import educateQuotesLatex HEADER = r'''%% Generated by Sphinx. \documentclass[%(papersize)s,%(pointsize)s%(classoptions)s]{%(docclass)s} %(inputenc)s +%(utf8extra)s %(fontenc)s %(babel)s %(fontpkg)s @@ -136,6 +137,7 @@ class LaTeXTranslator(nodes.NodeVisitor): 'pointsize': '10pt', 'classoptions': '', 'inputenc': '\\usepackage[utf8]{inputenc}', + 'utf8extra': '\\DeclareUnicodeCharacter{00A0}{\nobreakspace}', 'fontenc': '\\usepackage[T1]{fontenc}', 'babel': '\\usepackage{babel}', 'fontpkg': '\\usepackage{times}',