From 7a21ddf601e29a25e492ba97309d593e6eeff6b4 Mon Sep 17 00:00:00 2001 From: milde Date: Fri, 3 Apr 2020 16:57:36 +0000 Subject: html5 writer: wrap image elements in

unless inline or in figure. In HTML, is by default an inline element. The rST "image" directive generates block-level elements (unless used in a "substitution" directive). Wrapping in a container enables more advanced CSS styling. A paragraph as wrapper fits well with Docutils wrapping inline content in paragraphs by default. No change for the "html4css1" writer (ensure backwards compatibility). git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8510 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- .../functional/expected/standalone_rst_html5.html | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'docutils/test/functional/expected') diff --git a/docutils/test/functional/expected/standalone_rst_html5.html b/docutils/test/functional/expected/standalone_rst_html5.html index 86382bac3..3906cd610 100644 --- a/docutils/test/functional/expected/standalone_rst_html5.html +++ b/docutils/test/functional/expected/standalone_rst_html5.html @@ -567,31 +567,31 @@ document (a document-wide

2.14.2 Images and Figures

An image directive (also clickable -- a hyperlink reference):

-../../../docs/user/rst/images/title.png +

../../../docs/user/rst/images/title.png

Image with multiple IDs:

-../../../docs/user/rst/images/title.png +

../../../docs/user/rst/images/title.png

A centered image:

-../../../docs/user/rst/images/biohazard.png +

../../../docs/user/rst/images/biohazard.png

A left-aligned image:

-../../../docs/user/rst/images/biohazard.png +

../../../docs/user/rst/images/biohazard.png

This paragraph might flow around the image. The specific behavior depends upon the style sheet and the browser or rendering software used.

A right-aligned image:

-../../../docs/user/rst/images/biohazard.png +

../../../docs/user/rst/images/biohazard.png

This paragraph might flow around the image. The specific behavior depends upon the style sheet and the browser or rendering software used.

For inline images see Substitution Definitions.

Image size:

An image 2 em wide:

-../../../docs/user/rst/images/biohazard.png +

../../../docs/user/rst/images/biohazard.png

An image 2 em wide and 15 pixel high:

-../../../docs/user/rst/images/biohazard.png +

../../../docs/user/rst/images/biohazard.png

An image occupying 50% of the line width:

-../../../docs/user/rst/images/title.png +

../../../docs/user/rst/images/title.png

An image 2 cm high:

-../../../docs/user/rst/images/biohazard.png +

../../../docs/user/rst/images/biohazard.png

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.

@@ -1238,7 +1238,7 @@ crunchy, now would it?

3 HTML specific

3.1 SVG Images

-../../../docs/user/rst/images/biohazard.svg +

../../../docs/user/rst/images/biohazard.svg

Scalable vector graphics (SVG) images are the only standards-compliable way to include vector graphics in HTML documents. However, they are not supported by all backends/output formats. (E.g., LaTeX supports the @@ -1273,30 +1273,30 @@ deficiencies or require plug-ins (i.e. don't support the <img> are always scaled.

@@ -1304,12 +1304,12 @@ keeps the aspect ratio.)

konqueror) support the <img> tag but don't display contained bitmap images in this case.

@@ -1330,8 +1330,8 @@ support via a plugin. It is sometimes blocked due to privacy/security concerns.

Images with extension .swf are placed inside <object> elements. For complete control over display options use raw HTML.

- -[biohazard.swf] +

+[biohazard.swf]

An SWF image in a 4 cm x 2 em box, left aligned.

An inline SWF image inline-swf scaled to 0.8 em x 0.8 em.

-- cgit v1.2.1