From: Günter M. <mi...@us...> - 2023-10-30 15:45:12
|
> Scaleable images formats (i.e. SVG) should be scaleable in those output formats (i.e. HTML) where the page size is not fixed (i.e. a web browser). This is already possible, the :width: parameter allows a percentage value that is interpreted relative to the line length. For use cases where this is still too limiting, support for the CSS3 lenght units vh, vw, vmin, and vmax [feature-request:57] may be a better approach. --- **[feature-requests:#99] Support scaleable images in html (along with other SVG features)** **Status:** open **Group:** Default **Created:** Sat Oct 28, 2023 10:02 PM UTC by Karl O. Pinc **Last Updated:** Sun Oct 29, 2023 11:53 AM UTC **Owner:** nobody Scaleable images formats (i.e. SVG) should be scaleable in those output formats (i.e. HTML) where the page size is not fixed (i.e. a web browser). A major benefit of SVG is that it scales. Make the window bigger or smaller and the image adjusts accordingly. RST does not seem to support this. (See link at bottom for a work-around using "raw". But the work-around works only for images, not figures.) It would be nice if the image and figure directives allowed the "scale:" option to take the values "width" and "height". These would allow the image to scale to the width or height of the browser's window while maintaining the image's aspect ratio. These 2 new values can be ignored when generating output with fixed page sizes. Alternately, introduce a new option. (resize?) Doing so would side-step the issue of how to specify option values that vary depending on the chosen output format. It seems that the right way to implement this is by generating an inline HTML svg tag that contains an SVG image tag referencing the svg file which is to be part of the document. CSS can then control how the scaling is done. A related matter is the ability to have interactive SVG documents, which respond to keyboard, pointer, and document events. Apparently, these features are not realizable when embedding SVG with a HTML image tag. This is another argument for an inline HTML svg tag. Finally, SVG supports embedded hyperlinks. I'm unclear on whether this is "interactive" or not but wouldn't want to forgo the ability to click on a portion of a diagram and be taken to the relevant section in the documentation. (It seems hyperlinks are an SVG 2.0 feature. But the feature does seem to be supported for SVG v1.1 generaed by Inkscape and displayed in a browser.) See also the following Sphinx bug: https://github.com/sphinx-doc/sphinx/issues/2240 --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |