diff options
Diffstat (limited to 'docutils/test/functional')
4 files changed, 68 insertions, 3 deletions
diff --git a/docutils/test/functional/expected/standalone_rst_html4css1.html b/docutils/test/functional/expected/standalone_rst_html4css1.html index ba5d7784d..e624dacb0 100644 --- a/docutils/test/functional/expected/standalone_rst_html4css1.html +++ b/docutils/test/functional/expected/standalone_rst_html4css1.html @@ -550,7 +550,7 @@ document (a document-wide <a class="reference" href="#table-of-contents">table o <span id="image-target-2"></span><span id="image-target-1"></span><img alt="../../../docs/user/rst/images/title.png" id="image-target-3" name="image-target-3" src="../../../docs/user/rst/images/title.png" /> <p>A figure directive:</p> <div align="right" class="figclass1 figclass2 figure"> -<img alt="reStructuredText, the markup syntax" class="class1 class2" src="../../../docs/user/rst/images/biohazard.png" width="50" /> +<img alt="reStructuredText, the markup syntax" class="class1 class2" src="../../../docs/user/rst/images/biohazard.png" style="width: 50px;" /> <p class="caption">A figure is an image with a caption and/or a legend:</p> <div class="legend"> <table border="1" class="docutils"> @@ -576,7 +576,7 @@ document (a document-wide <a class="reference" href="#table-of-contents">table o <p>This paragraph might flow around the figure...</p> <p>A centered figure:</p> <div align="center" class="figure"> -<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" width="50" /> +<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 50px;" /> <p class="caption">This is the caption.</p> <div class="legend"> <p>This is the legend.</p> @@ -586,7 +586,7 @@ document (a document-wide <a class="reference" href="#table-of-contents">table o <p>This paragraph might flow around the figure...</p> <p>A left-aligned figure:</p> <div align="left" class="figure"> -<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" width="50" /> +<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 50px;" /> <p class="caption">This is the caption.</p> <div class="legend"> <p>This is the legend.</p> @@ -594,6 +594,15 @@ document (a document-wide <a class="reference" href="#table-of-contents">table o </div> </div> <p>This paragraph might flow around the figure...</p> +<p>Now widths:</p> +<p>An image 2 em wide:</p> +<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2em;" /> +<p>An image 2 em wide and 30 pixel high:</p> +<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 2em; height: 30px;" /> +<p>An image occupying 70% of the line width:</p> +<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 70%;" /> +<p>An image 3 cm high:</p> +<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="height: 3cm;" /> </div> <div class="section" id="admonitions"> <h3><a class="toc-backref" href="#id64" name="admonitions">2.14.3 Admonitions</a></h3> diff --git a/docutils/test/functional/expected/standalone_rst_latex.tex b/docutils/test/functional/expected/standalone_rst_latex.tex index 3abaf8a9e..06e00ab67 100644 --- a/docutils/test/functional/expected/standalone_rst_latex.tex +++ b/docutils/test/functional/expected/standalone_rst_latex.tex @@ -925,6 +925,24 @@ The legend may consist of several paragraphs. This paragraph might flow around the figure... +Now widths: + +An image 2 em wide: + +\includegraphics{../../../docs/user/rst/images/biohazard.png} + +An image 2 em wide and 30 pixel high: + +\includegraphics{../../../docs/user/rst/images/biohazard.png} + +An image occupying 70{\%} of the line width: + +\includegraphics{../../../docs/user/rst/images/biohazard.png} + +An image 3 cm high: + +\includegraphics{../../../docs/user/rst/images/biohazard.png} + %___________________________________________________________________________ diff --git a/docutils/test/functional/expected/standalone_rst_pseudoxml.txt b/docutils/test/functional/expected/standalone_rst_pseudoxml.txt index 62f923a03..d7f4d0103 100644 --- a/docutils/test/functional/expected/standalone_rst_pseudoxml.txt +++ b/docutils/test/functional/expected/standalone_rst_pseudoxml.txt @@ -1191,6 +1191,20 @@ The legend may consist of several paragraphs. <paragraph> This paragraph might flow around the figure... + <paragraph> + Now widths: + <paragraph> + An image 2 em wide: + <image uri="../../../docs/user/rst/images/biohazard.png" width="2em"> + <paragraph> + An image 2 em wide and 30 pixel high: + <image height="30px" uri="../../../docs/user/rst/images/biohazard.png" width="2em"> + <paragraph> + An image occupying 70% of the line width: + <image uri="../../../docs/user/rst/images/biohazard.png" width="70%"> + <paragraph> + An image 3 cm high: + <image height="3cm" uri="../../../docs/user/rst/images/biohazard.png"> <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 cfcc6e7f7..140be35c7 100644 --- a/docutils/test/functional/input/data/standard.txt +++ b/docutils/test/functional/input/data/standard.txt @@ -485,6 +485,30 @@ A left-aligned figure: 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 + + Admonitions ``````````` |
