From: Günter M. <mi...@us...> - 2023-10-31 21:28:32
|
- **status**: open --> closed-works-for-me - **Comment**: Closing as the main request (scaling) is satisfied (but see also [feature-requests:#57]) For the somewhat related topic of "interactivity", please open a new issue. I would like to support "directly embedded" SVG but the devil is in the detail (how to handle the various image directive options). This would need more testing and understanding to get it right. --- **[feature-requests:#99] Support scaleable images in html (along with other SVG features)** **Status:** closed-works-for-me **Group:** Default **Created:** Sat Oct 28, 2023 10:02 PM UTC by Karl O. Pinc **Last Updated:** Mon Oct 30, 2023 03:45 PM 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. |