mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #1366: centered image not centered in latex
This commit is contained in:
parent
bef3025c3c
commit
eea055dfb2
1
CHANGES
1
CHANGES
@ -37,6 +37,7 @@ Bugs fixed
|
||||
Now sphinx use colorama>=0.3.5 to avoid this problem.
|
||||
* #2072: Fix footnotes in chapter-titles do not appear in PDF output
|
||||
* #1580: Fix paragraphs in longtable don't work in Latex output
|
||||
* #1366: Fix centered image not centered in latex
|
||||
|
||||
Release 1.3.3 (released Dec 2, 2015)
|
||||
====================================
|
||||
|
@ -1285,12 +1285,12 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
(1, 'top'): ('', ''),
|
||||
(1, 'middle'): ('\\raisebox{-0.5\\height}{', '}'),
|
||||
(1, 'bottom'): ('\\raisebox{-\\height}{', '}'),
|
||||
(0, 'center'): ('{\\hfill', '\\hfill}'),
|
||||
(0, 'center'): ('{\\hspace*{\\fill}', '\\hspace*{\\fill}}'),
|
||||
# These 2 don't exactly do the right thing. The image should
|
||||
# be floated alongside the paragraph. See
|
||||
# http://www.w3.org/TR/html4/struct/objects.html#adef-align-IMG
|
||||
(0, 'left'): ('{', '\\hfill}'),
|
||||
(0, 'right'): ('{\\hfill', '}'),
|
||||
(0, 'left'): ('{', '\\hspace*{\\fill}}'),
|
||||
(0, 'right'): ('{\\hspace*{\\fill}', '}'),
|
||||
}
|
||||
try:
|
||||
pre.append(align_prepost[is_inline, attrs['align']][0])
|
||||
|
Loading…
Reference in New Issue
Block a user