summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docutils/docutils/writers/latex2e/__init__.py3
-rw-r--r--docutils/test/functional/expected/standalone_rst_latex.tex4
2 files changed, 4 insertions, 3 deletions
diff --git a/docutils/docutils/writers/latex2e/__init__.py b/docutils/docutils/writers/latex2e/__init__.py
index cf7af05fd..eca39798d 100644
--- a/docutils/docutils/writers/latex2e/__init__.py
+++ b/docutils/docutils/writers/latex2e/__init__.py
@@ -1382,7 +1382,8 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.body.append(':]')
def visit_figure(self, node):
- if not node.attributes.has_key('align'):
+ if (not node.attributes.has_key('align') or
+ node.attributes['align'] == 'center'):
align = 'center'
else:
align = 'flush'+node.attributes['align']
diff --git a/docutils/test/functional/expected/standalone_rst_latex.tex b/docutils/test/functional/expected/standalone_rst_latex.tex
index ba5b63bb0..49d33a277 100644
--- a/docutils/test/functional/expected/standalone_rst_latex.tex
+++ b/docutils/test/functional/expected/standalone_rst_latex.tex
@@ -925,14 +925,14 @@ This is the legend.
This paragraph might flow around the figure...
A centered figure:
-\begin{figure}[htbp]\begin{flushcenter}
+\begin{figure}[htbp]\begin{center}
\includegraphics[width=50]{../../../docs/user/rst/images/biohazard.png}
\caption{This is the caption.}{\small
This is the legend.
The legend may consist of several paragraphs.
-}\end{flushcenter}\end{figure}
+}\end{center}\end{figure}
This paragraph might flow around the figure...