mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix `width
option of figure directive does not work if
align
` option also specified (ref: #2595)
This commit is contained in:
parent
58b4f046ab
commit
da3d368961
1
CHANGES
1
CHANGES
@ -5,6 +5,7 @@ Bugs fixed
|
|||||||
----------
|
----------
|
||||||
|
|
||||||
* #2530: got "Counter too large" error on building PDF if large numbered footnotes existed in admonitions
|
* #2530: got "Counter too large" error on building PDF if large numbered footnotes existed in admonitions
|
||||||
|
* ``width`` option of figure directive does not work if ``align`` option specified at same time (ref: #2595)
|
||||||
|
|
||||||
|
|
||||||
Release 1.4.2 (released May 29, 2016)
|
Release 1.4.2 (released May 29, 2016)
|
||||||
|
@ -1431,8 +1431,8 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
|||||||
node.children[0]['ids']):
|
node.children[0]['ids']):
|
||||||
ids += self.hypertarget(node.children[0]['ids'][0], anchor=False)
|
ids += self.hypertarget(node.children[0]['ids'][0], anchor=False)
|
||||||
if node.get('align', '') in ('left', 'right'):
|
if node.get('align', '') in ('left', 'right'):
|
||||||
if 'width' in node:
|
if 'width' in node[0]:
|
||||||
length = width_to_latex_length(node['width'])
|
length = width_to_latex_length(node[0]['width'])
|
||||||
else:
|
else:
|
||||||
length = '0pt'
|
length = '0pt'
|
||||||
self.body.append('\\begin{wrapfigure}{%s}{%s}\n\\centering' %
|
self.body.append('\\begin{wrapfigure}{%s}{%s}\n\\centering' %
|
||||||
|
Loading…
Reference in New Issue
Block a user