mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2526: LaTeX writer crashes if the section having only images
This commit is contained in:
parent
885653a35d
commit
7c0b7e1ff1
1
CHANGES
1
CHANGES
@ -51,6 +51,7 @@ Bugs fixed
|
||||
* #2501: Unicode subscript numbers are normalized in LaTeX
|
||||
* #2492: Figure directive with :figwidth: generates incorrect Latex-code
|
||||
* The caption of figure is always put on center even if ``:align:`` was specified
|
||||
* #2526: LaTeX writer crashes if the section having only images
|
||||
|
||||
|
||||
Release 1.4.1 (released Apr 12, 2016)
|
||||
|
@ -782,7 +782,8 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
elif isinstance(parent, nodes.section):
|
||||
short = ''
|
||||
if node.traverse(nodes.image):
|
||||
short = '[%s]' % ' '.join(clean_astext(node).split()).translate(tex_escape_map)
|
||||
short = ('[%s]' %
|
||||
u' '.join(clean_astext(node).split()).translate(tex_escape_map))
|
||||
|
||||
try:
|
||||
self.body.append(r'\%s%s{' % (self.sectionnames[self.sectionlevel], short))
|
||||
|
@ -16,3 +16,7 @@ another blah
|
||||
Other [blah] |picture| section
|
||||
------------------------------
|
||||
other blah
|
||||
|
||||
|picture|
|
||||
---------
|
||||
blah blah blah
|
||||
|
Loading…
Reference in New Issue
Block a user