Merge branch 'stable'

This commit is contained in:
Takeshi KOMIYA 2016-06-10 20:55:05 +09:00
commit a35399a0aa
7 changed files with 22 additions and 11 deletions

View File

@ -40,6 +40,9 @@ Bugs fixed
* #2622: Latex produces empty pages after title and table of contents
* #2640: 1.4.2 LaTeX crashes if code-block inside warning directive
* Let LaTeX use straight quotes also in inline code (ref #2627)
* #2351: latex crashes if enumerated lists are placed on footnotes
* #2646: latex crashes if math contains twice empty lines
* #2480: `sphinx.ext.autodoc`: memory addresses were shown
Release 1.4.3 (released Jun 5, 2016)

View File

@ -56,7 +56,7 @@ General configuration
.. confval:: extensions
A list of strings that are module names of Sphinx extensions. These can be
A list of strings that are module names of :ref:`extensions`. These can be
extensions coming with Sphinx (named ``sphinx.ext.*``) or custom ones.
Note that you can extend :data:`sys.path` within the conf file if your

View File

@ -300,12 +300,17 @@ features of intersphinx.
More topics to be covered
-------------------------
- Other extensions (math, viewcode, doctest)
- :doc:`Other extensions <extensions>`:
* :doc:`ext/math`,
* :doc:`ext/viewcode`,
* :doc:`ext/doctest`,
* ...
- Static files
- Selecting a theme
- Templating
- :doc:`Selecting a theme <theming>`
- :ref:`Templating <templating>`
- Using extensions
- Writing extensions
- :ref:`Writing extensions <dev-extensions>`
.. rubric:: Footnotes

View File

@ -76,7 +76,7 @@ default_settings = {
# or changed to properly invalidate pickle files.
#
# NOTE: increase base version by 2 to have distinct numbers for Py2 and 3
ENV_VERSION = 48 + (sys.version_info[0] - 2)
ENV_VERSION = 49 + (sys.version_info[0] - 2)
dummy_reporter = Reporter('', 4, 4)

View File

@ -58,7 +58,7 @@ def wrap_displaymath(math, label, numbering):
begin = r'\begin{align*}%s\!\begin{aligned}' % labeldef
end = r'\end{aligned}\end{align*}'
for part in parts:
equations.append('%s\\\\\n' % part)
equations.append('%s\\\\\n' % part.strip())
return '%s\n%s%s' % (begin, ''.join(equations), end)

View File

@ -20,7 +20,7 @@ from sphinx.util import force_decode
# relatively import this module
inspect = __import__('inspect')
memory_address_re = re.compile(r' at 0x[0-9a-f]{8,16}(?=>$)')
memory_address_re = re.compile(r' at 0x[0-9a-f]{8,16}(?=>)')
if PY3:

View File

@ -979,9 +979,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
def visit_collected_footnote(self, node):
self.in_footnote += 1
if 'footnotetext' in node:
self.body.append('\\footnotetext[%s]{\sphinxAtStartFootnote%%' % node['number'])
self.body.append('\\footnotetext[%s]{\sphinxAtStartFootnote%%\n' % node['number'])
else:
self.body.append('\\footnote[%s]{\sphinxAtStartFootnote%%' % node['number'])
self.body.append('\\footnote[%s]{\sphinxAtStartFootnote%%\n' % node['number'])
def depart_collected_footnote(self, node):
self.body.append('}')
@ -1321,12 +1321,15 @@ class LaTeXTranslator(nodes.NodeVisitor):
depart_field_body = depart_definition
def visit_paragraph(self, node):
# insert blank line, if the paragraph follows a non-paragraph node in a compound
index = node.parent.index(node)
if (index > 0 and isinstance(node.parent, nodes.compound) and
not isinstance(node.parent[index - 1], nodes.paragraph) and
not isinstance(node.parent[index - 1], nodes.compound)):
# insert blank line, if the paragraph follows a non-paragraph node in a compound
self.body.append('\\noindent\n')
elif index == 0 and isinstance(node.parent, nodes.footnote):
# don't insert blank line, if the paragraph is first child of a footnote
pass
else:
self.body.append('\n')