summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-05-20 22:27:23 +0000
committerwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-05-20 22:27:23 +0000
commit20d6b644e18b41c52fed910b78217b53e8bd4afb (patch)
tree5af6a68a2dfe7e7115532e8261cf52f931de42b8
parentfc54ecf0d5ca832d71cfd37e1434ac183367c2b4 (diff)
downloaddocutils-20d6b644e18b41c52fed910b78217b53e8bd4afb.tar.gz
more thorough figure testing
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3354 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
-rw-r--r--docutils/test/functional/expected/standalone_rst_html4css1.html25
-rw-r--r--docutils/test/functional/expected/standalone_rst_latex.tex28
-rw-r--r--docutils/test/functional/expected/standalone_rst_pseudoxml.txt32
-rw-r--r--docutils/test/functional/input/data/standard.txt35
4 files changed, 113 insertions, 7 deletions
diff --git a/docutils/test/functional/expected/standalone_rst_html4css1.html b/docutils/test/functional/expected/standalone_rst_html4css1.html
index 13f8c02c6..dcbe16a80 100644
--- a/docutils/test/functional/expected/standalone_rst_html4css1.html
+++ b/docutils/test/functional/expected/standalone_rst_html4css1.html
@@ -546,8 +546,8 @@ document (a document-wide <a class="reference" href="#table-of-contents">table o
<p>An image directive (also clickable -- a hyperlink reference):</p>
<div class="image class1 class2 image-reference"><a class="reference" href="#directives"><img alt="../../../docs/user/rst/images/title.png" class="class1 class2" src="../../../docs/user/rst/images/title.png" /></a></div>
<p>A figure directive:</p>
-<div align="left" class="figclass1 figclass2 figure">
-<div class="image class1 class2"><img alt="reStructuredText, the markup syntax" class="class1 class2" src="../../../docs/user/rst/images/title.png" /></div>
+<div align="right" class="figclass1 figclass2 figure">
+<div class="image class1 class2"><img alt="reStructuredText, the markup syntax" class="class1 class2" src="../../../docs/user/rst/images/biohazard.png" width="50" /></div>
<p class="caption">A figure is an image with a caption and/or a legend:</p>
<div class="legend">
<table border="1" class="docutils">
@@ -570,6 +570,27 @@ document (a document-wide <a class="reference" href="#table-of-contents">table o
<p>This paragraph is also part of the legend.</p>
</div>
</div>
+<p>This paragraph might flow around the figure...</p>
+<p>A centered figure:</p>
+<div align="center" class="figure">
+<div class="image"><img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" width="50" /></div>
+<p class="caption">This is the caption.</p>
+<div class="legend">
+<p>This is the legend.</p>
+<p>The legend may consist of several paragraphs.</p>
+</div>
+</div>
+<p>This paragraph might flow around the figure...</p>
+<p>A left-aligned figure:</p>
+<div align="left" class="figure">
+<div class="image"><img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" width="50" /></div>
+<p class="caption">This is the caption.</p>
+<div class="legend">
+<p>This is the legend.</p>
+<p>The legend may consist of several paragraphs.</p>
+</div>
+</div>
+<p>This paragraph might flow around the figure...</p>
</div>
<div class="section" id="admonitions">
<h3><a class="toc-backref" href="#id64" name="admonitions">2.14.3&nbsp;&nbsp;&nbsp;Admonitions</a></h3>
diff --git a/docutils/test/functional/expected/standalone_rst_latex.tex b/docutils/test/functional/expected/standalone_rst_latex.tex
index 5e937878c..368146eb0 100644
--- a/docutils/test/functional/expected/standalone_rst_latex.tex
+++ b/docutils/test/functional/expected/standalone_rst_latex.tex
@@ -864,7 +864,7 @@ An image directive (also clickable -{}- a hyperlink reference):
A figure directive:
\begin{figure}[htbp]\begin{center}
-\includegraphics{../../../docs/user/rst/images/title.png}
+\includegraphics{../../../docs/user/rst/images/biohazard.png}
\caption{A figure is an image with a caption and/or a legend:}{\small
\begin{longtable}[c]{|p{0.16\locallinewidth}|p{0.56\locallinewidth}|}
\hline
@@ -891,6 +891,32 @@ Well it is, isn't it?
This paragraph is also part of the legend.
}\end{center}\end{figure}
+This paragraph might flow around the figure...
+
+A centered figure:
+\begin{figure}[htbp]\begin{center}
+
+\includegraphics{../../../docs/user/rst/images/biohazard.png}
+\caption{This is the caption.}{\small
+This is the legend.
+
+The legend may consist of several paragraphs.
+}\end{center}\end{figure}
+
+This paragraph might flow around the figure...
+
+A left-aligned figure:
+\begin{figure}[htbp]\begin{center}
+
+\includegraphics{../../../docs/user/rst/images/biohazard.png}
+\caption{This is the caption.}{\small
+This is the legend.
+
+The legend may consist of several paragraphs.
+}\end{center}\end{figure}
+
+This paragraph might flow around the figure...
+
%___________________________________________________________________________
diff --git a/docutils/test/functional/expected/standalone_rst_pseudoxml.txt b/docutils/test/functional/expected/standalone_rst_pseudoxml.txt
index 597408d23..92c7eccfe 100644
--- a/docutils/test/functional/expected/standalone_rst_pseudoxml.txt
+++ b/docutils/test/functional/expected/standalone_rst_pseudoxml.txt
@@ -1122,8 +1122,8 @@
<image classes="class1 class2" uri="../../../docs/user/rst/images/title.png">
<paragraph>
A figure directive:
- <figure align="left" classes="figclass1 figclass2">
- <image alt="reStructuredText, the markup syntax" classes="class1 class2" uri="../../../docs/user/rst/images/title.png">
+ <figure align="right" classes="figclass1 figclass2">
+ <image alt="reStructuredText, the markup syntax" classes="class1 class2" uri="../../../docs/user/rst/images/biohazard.png" width="50">
<caption>
A figure is an image with a caption and/or a legend:
<legend>
@@ -1155,6 +1155,34 @@
Well it is, isn't it?
<paragraph>
This paragraph is also part of the legend.
+ <paragraph>
+ This paragraph might flow around the figure...
+ <paragraph>
+ A centered figure:
+ <figure align="center">
+ <image uri="../../../docs/user/rst/images/biohazard.png" width="50">
+ <caption>
+ This is the caption.
+ <legend>
+ <paragraph>
+ This is the legend.
+ <paragraph>
+ The legend may consist of several paragraphs.
+ <paragraph>
+ This paragraph might flow around the figure...
+ <paragraph>
+ A left-aligned figure:
+ <figure align="left">
+ <image uri="../../../docs/user/rst/images/biohazard.png" width="50">
+ <caption>
+ This is the caption.
+ <legend>
+ <paragraph>
+ This is the legend.
+ <paragraph>
+ The legend may consist of several paragraphs.
+ <paragraph>
+ This paragraph might flow around the figure...
<section ids="admonitions" names="admonitions">
<title auto="1" refid="id64">
<generated classes="sectnum">
diff --git a/docutils/test/functional/input/data/standard.txt b/docutils/test/functional/input/data/standard.txt
index b06a158d4..2759d88e0 100644
--- a/docutils/test/functional/input/data/standard.txt
+++ b/docutils/test/functional/input/data/standard.txt
@@ -427,11 +427,12 @@ An image directive (also clickable -- a hyperlink reference):
A figure directive:
-.. figure:: ../../../docs/user/rst/images/title.png
+.. figure:: ../../../docs/user/rst/images/biohazard.png
:figclass: figclass1 figclass2
:class: class1 class2
:alt: reStructuredText, the markup syntax
- :align: left
+ :align: right
+ :width: 50
A figure is an image with a caption and/or a legend:
@@ -445,6 +446,36 @@ A figure directive:
This paragraph is also part of the legend.
+This paragraph might flow around the figure...
+
+A centered figure:
+
+.. figure:: ../../../docs/user/rst/images/biohazard.png
+ :align: center
+ :width: 50
+
+ This is the caption.
+
+ This is the legend.
+
+ The legend may consist of several paragraphs.
+
+This paragraph might flow around the figure...
+
+A left-aligned figure:
+
+.. figure:: ../../../docs/user/rst/images/biohazard.png
+ :align: left
+ :width: 50
+
+ This is the caption.
+
+ This is the legend.
+
+ The legend may consist of several paragraphs.
+
+This paragraph might flow around the figure...
+
Admonitions
```````````