mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #7092 from tk0miya/7059_latex_infinite_loop
Fix #7059: latex: LaTeX compilation fails into infinite loop
This commit is contained in:
commit
18860d0806
1
CHANGES
1
CHANGES
@ -70,6 +70,7 @@ Bugs fixed
|
||||
* #6925: html: Remove redundant type="text/javascript" from <script> elements
|
||||
* #6906, #6907: autodoc: failed to read the source codes encoeded in cp1251
|
||||
* #6961: latex: warning for babel shown twice
|
||||
* #7059: latex: LaTeX compilation falls into infinite loop (wrapfig issue)
|
||||
* #6559: Wrong node-ids are generated in glossary directive
|
||||
* #6986: apidoc: misdetects module name for .so file inside module
|
||||
* #6899: apidoc: private members are not shown even if ``--private`` given
|
||||
|
@ -1363,6 +1363,8 @@ class LaTeXTranslator(SphinxTranslator):
|
||||
length = self.latex_image_length(node['width'])
|
||||
elif isinstance(node[0], nodes.image) and 'width' in node[0]:
|
||||
length = self.latex_image_length(node[0]['width'])
|
||||
self.body.append('\n\n') # Insert a blank line to prevent infinite loop
|
||||
# https://github.com/sphinx-doc/sphinx/issues/7059
|
||||
self.body.append('\\begin{wrapfigure}{%s}{%s}\n\\centering' %
|
||||
('r' if node['align'] == 'right' else 'l', length or '0pt'))
|
||||
self.context.append('\\end{wrapfigure}\n')
|
||||
|
Loading…
Reference in New Issue
Block a user