summaryrefslogtreecommitdiff
path: root/docutils/test/functional/input
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2009-05-11 14:41:43 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2009-05-11 14:41:43 +0000
commit15e8a66a802f698040b21c89ff30436d2880e188 (patch)
tree45de1d5eb6ceb39959d5f05215817981c26f952a /docutils/test/functional/input
parent9d0984147c9fd728036e70c96a946fce9feda873 (diff)
downloaddocutils-15e8a66a802f698040b21c89ff30436d2880e188.tar.gz
Clean up image directive test/demo
Separate test for image and figure directives, test right, left, and center alignment of figures, avoid too large images. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5940 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/functional/input')
-rw-r--r--docutils/test/functional/input/data/standard.txt90
1 files changed, 53 insertions, 37 deletions
diff --git a/docutils/test/functional/input/data/standard.txt b/docutils/test/functional/input/data/standard.txt
index 7e63afd69..1f71e0473 100644
--- a/docutils/test/functional/input/data/standard.txt
+++ b/docutils/test/functional/input/data/standard.txt
@@ -423,8 +423,8 @@ An example of the "contents" directive can be seen above this section
(a local, untitled table of contents_) and at the beginning of the
document (a document-wide `table of contents`_).
-Images
-``````
+Images and Figures
+``````````````````
An image directive (also clickable -- a hyperlink reference):
@@ -449,21 +449,53 @@ A left-aligned image:
.. image:: ../../../docs/user/rst/images/biohazard.png
:align: left
+This paragraph might flow around the image.
+If it does or not, depends on the output format and the viewer.
+
A right-aligned image:
.. image:: ../../../docs/user/rst/images/biohazard.png
:align: right
-A figure directive:
+This paragraph might flow around the image.
+If it does or not, depends on the output format and the viewer.
-.. figure:: ../../../docs/user/rst/images/biohazard.png
+For inline images see `Substitution Definitions`_.
+
+Image size:
+
+An image 2 em wide:
+
+.. image:: ../../../docs/user/rst/images/biohazard.png
+ :width: 2 em
+
+An image 2 em wide and 15 pixel high:
+
+.. image:: ../../../docs/user/rst/images/biohazard.png
+ :width: 2em
+ :height: 15 px
+
+An image occupying 50% of the line width:
+
+.. image:: ../../../docs/user/rst/images/title.png
+ :width: 50%
+
+An image 2 cm high:
+
+.. image:: ../../../docs/user/rst/images/biohazard.png
+ :height: 2 cm
+
+A *figure* is an image with a caption and/or a legend. With page-based output
+media, figures might float to a different position if this helps the page
+layout.
+
+.. figure:: ../../../docs/user/rst/images/title.png
:figclass: figclass1 figclass2
:class: class1 class2
:alt: reStructuredText, the markup syntax
- :align: right
- :width: 50
+ :width: 258
- A figure is an image with a caption and/or a legend:
+ Plaintext markup syntax and parser system.
+------------+-----------------------------------------------+
| re | Revised, revisited, based on 're' module. |
@@ -475,6 +507,8 @@ A figure directive:
This paragraph is also part of the legend.
+A left-aligned figure:
+
.. figure:: ../../../docs/user/rst/images/biohazard.png
:figclass: figclass1 figclass2
:class: class1 class2
@@ -482,11 +516,14 @@ A figure directive:
:align: left
:width: 50
- A left-aligned figure.
+ This is the caption.
This is the legend.
-This paragraph might flow around the figure...
+ The legend may consist of several paragraphs.
+
+This paragraph might flow around the figure if the ``figwidth``
+argument is set and smaller than the text width.
A centered figure:
@@ -500,12 +537,13 @@ A centered figure:
The legend may consist of several paragraphs.
-This paragraph might flow around the figure...
+This paragraph might flow around the figure if the ``figwidth``
+argument is set and smaller than the text width.
-A left-aligned figure:
+A right-aligned figure:
.. figure:: ../../../docs/user/rst/images/biohazard.png
- :align: left
+ :align: right
:width: 50
This is the caption.
@@ -514,30 +552,8 @@ A left-aligned figure:
The legend may consist of several paragraphs.
-This paragraph might flow around the figure...
-
-Now widths:
-
-An image 2 em wide:
-
-.. image:: ../../../docs/user/rst/images/biohazard.png
- :width: 2 em
-
-An image 2 em wide and 30 pixel high:
-
-.. image:: ../../../docs/user/rst/images/biohazard.png
- :width: 2em
- :height: 30 px
-
-An image occupying 70% of the line width:
-
-.. image:: ../../../docs/user/rst/images/biohazard.png
- :width: 70%
-
-An image 3 cm high:
-
-.. image:: ../../../docs/user/rst/images/biohazard.png
- :height: 3 cm
+This paragraph might flow around the figure if the ``figwidth``
+argument is set and smaller than the text width.
Admonitions
@@ -581,7 +597,7 @@ Topics, Sidebars, and Rubrics
:subtitle: Optional Subtitle
This is a sidebar. It is for text outside the flow of the main
- text.
+ text.
.. rubric:: This is a rubric inside a sidebar