Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-23 Thread Ihor Radchenko
Max Nikulin writes: >> If we talk about image attributes defined in the affiliated keywords, we >> should better resort to #+ATTR_HTML. Introducing extra affiliated >> keyword would be a breaking change. > > I am sorry that I was not clear enough. It may be 3 boolean attributes > that may be spe

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-22 Thread Max Nikulin
On 21/06/2023 23:38, Ihor Radchenko wrote: Max Nikulin writes: Besides the HTML related question how to mate all SVG options with all Org features (figures, etc.) there is a purely Org design choice: whether there should be multiple Org boolean variables and attributes describing strategy for p

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-21 Thread Ihor Radchenko
Max Nikulin writes: > Besides the HTML related question how to mate all SVG options with all > Org features (figures, etc.) there is a purely Org design choice: > whether there should be multiple Org boolean variables and attributes > describing strategy for particular image or it is single va

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-21 Thread Max Nikulin
On 21/06/2023 23:02, Ihor Radchenko wrote: Max Nikulin writes: I think you missed `org-html-inline-image-rules' where users can include/exclude svg images from inlining. Ihor, I am not sure that I get your point. If I understand it correctly, `org-html-inline-image-rules' specifies whether li

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-21 Thread Ihor Radchenko
Max Nikulin writes: >> I think you missed `org-html-inline-image-rules' where users can >> include/exclude svg images from inlining. > > Ihor, I am not sure that I get your point. If I understand it correctly, > `org-html-inline-image-rules' specifies whether links to svg files > should be kept

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-21 Thread Max Nikulin
On 16/06/2023 03:51, Ihor Radchenko wrote: gerard.vermeu...@posteo.net writes: ;; 1. It checks `svg-as-object' and "image in-lining" whether to ;;embed the SVG image in an tag. ... I think you missed `org-html-inline-image-rules' where users can include/exclude svg images from inlining.

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-17 Thread gerard . vermeulen
On 17.06.2023 14:38, Ihor Radchenko wrote: gerard.vermeu...@posteo.net writes: The term "image in-lining" is a very terse description of what my code does. ... Before going ahead with a patch to in-line images in tags, there remains the question of how to make those tags behave as much as pos

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-17 Thread Ihor Radchenko
gerard.vermeu...@posteo.net writes: > The term "image in-lining" is a very terse description of what my code > does. > ... > > Before going ahead with a patch to in-line images in tags, > there remains the question of how to make those tags behave as > much as possible as tags. My knowledge of

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-16 Thread gerard . vermeulen
On 15.06.2023 22:51, Ihor Radchenko wrote: gerard.vermeu...@posteo.net writes: On 07.06.2023 19:57, Ihor Radchenko wrote: I am not expert in html. Maybe someone else (Timothy?) can chime in. That said, I do not see why we cannot offer strategy as an option regardless whether is can solve

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-15 Thread Ihor Radchenko
gerard.vermeu...@posteo.net writes: > On 07.06.2023 19:57, Ihor Radchenko wrote: > [...] > I understand why you prefer the tag over the tag. > >> Finally, I can see that there are ways to use CSS on img+svg: >> https://blog.union.io/code/2017/08/10/img-svg-fill/ > > I failed to make the flower e

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-15 Thread Ihor Radchenko
Max Nikulin writes: > Has anybody compared memory footprint of a document with multiple SVG > images rendered by a browser with vs strategies? It seems > at least Firefox may create frames for each so the page may be > rather heavy. I do not think it matters. At least, it should not stop u

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-15 Thread Max Nikulin
On 15/06/2023 20:09, gerard.vermeu...@posteo.net wrote: ;;    - For each SVG link by means of "#+ATTR_HTML: :svg-as-object t" ;;  or "#+ATTR_HTML: :svg-inclusion t". Is there any advantages of using separate boolean attributes instead of multiple values? - :svg object - :svg img - :svg d

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-15 Thread gerard . vermeulen
On 07.06.2023 19:57, Ihor Radchenko wrote: [...] I understand why you prefer the tag over the tag. Finally, I can see that there are ways to use CSS on img+svg: https://blog.union.io/code/2017/08/10/img-svg-fill/ I failed to make the flower example work with the information on this site.

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-09 Thread Max Nikulin
On 06/06/2023 23:08, gerard.vermeu...@posteo.net wrote: Is it also possible to do #+EXCLUDE_TAGS: not "no" "skip" or something similar in an Org file? It is a feature of `org-export-with-drawers'. Variants of its value: - t, - nil, - ("drawer1" "drawer2"), - (not "drawer1" "drawer2") As to tag

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-07 Thread Ihor Radchenko
Christian Moe writes: >> Reading the linked threads, it seems that has its own >> downsides. Why is it strictly better then? > > I'm not sure it's strictly better. > > The problem in the linked threads was with scaling, and I don't think it > applies anymore. As I just tested in Firefox, at leas

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-07 Thread Christian Moe
Ihor Radchenko writes: > Christian Moe writes: > >> I think there's a better approach. Tl;dr: >> >> - A better way to have active CSS in SVG images is to link to the >> external SVG file with the rather than tag, as we used >> to. > > Reading the linked threads, it seems that has its own

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-07 Thread Ihor Radchenko
gerard.vermeu...@posteo.net writes: > I had been think about names like > :with-svgs-to-embed (...) > :sans-svgs-to-embed (...) > while preparing the patch. I decided to err towards verbosity. I think that the idea with putting explicit file names is not good. It will force extra work for users.

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-07 Thread Ihor Radchenko
gerard.vermeu...@posteo.net writes: >> This is awkward. To do per-image export adjustments, we usually use >> export attributes (#+ATTR_HTML: ...). And why "split"? > > I do not think that #+ATTR_HTML allows to embed (= copy) the contents > of an SVG file directly into the HTML page. As far as I

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-07 Thread Ihor Radchenko
Christian Moe writes: > That said, I still think the better solution to the issue you raised is > for Orgmode to go back to exporting SVG links as not , not > to extract SVG file contents and embed them as SVG islands. > > (Though I may be a breaking change for some users. In particular, > becau

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-07 Thread Ihor Radchenko
Christian Moe writes: > I think there's a better approach. Tl;dr: > > - A better way to have active CSS in SVG images is to link to the > external SVG file with the rather than tag, as we used > to. Reading the linked threads, it seems that has its own downsides. Why is it strictly better

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread Christian Moe
gerard.vermeu...@posteo.net writes: > On 06.06.2023 11:57, Christian Moe wrote: [...] >> 1) Embedded SVG is not the only way to have active CSS etc. in SVG >> images. Linking to an external SVG file with an OBJECT element instead >> of IMG should work fine (tested in Firefox). You can test this

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread gerard . vermeulen
On 06.06.2023 16:14, Max Nikulin wrote: On 05/06/2023 20:23, gerard.vermeulen wrote: # The next line overrules html-embed-svg:t #+HTML_EMBED_SVG_EXCLUDES: ./doc8.svg # The next line overrules html-embed-svg:nil #+HTML_EMBED_SVG_INCLUDES: ./doc8.svg I agree with Ihor's idea concerning #+attr

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread Max Nikulin
On 05/06/2023 20:23, gerard.vermeulen wrote: # The next line overrules html-embed-svg:t #+HTML_EMBED_SVG_EXCLUDES: ./doc8.svg # The next line overrules html-embed-svg:nil #+HTML_EMBED_SVG_INCLUDES: ./doc8.svg I agree with Ihor's idea concerning #+attr_html (multiple inline images in a paragrap

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread gerard . vermeulen
On 06.06.2023 11:57, Christian Moe wrote: Hi, I think there's a better approach. Tl;dr: - A better way to have active CSS in SVG images is to link to the external SVG file with the rather than tag, as we used to. - Without patching Org, you can embed an external SVG file as an SVG i

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread gerard . vermeulen
On 06.06.2023 09:49, Ihor Radchenko wrote: gerard.vermeu...@posteo.net writes: I have been trying to export SVG images having links to CSS from Org to HTML and I have found that the this CSS is not active in Firefox (only browser I tried). I have found that the CCS is only active under two

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread Christian Moe
Hi, I think there's a better approach. Tl;dr: - A better way to have active CSS in SVG images is to link to the external SVG file with the rather than tag, as we used to. - Without patching Org, you can embed an external SVG file as an SVG island in Org HTML export simply by using #+IN

Re: [PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-06 Thread Ihor Radchenko
gerard.vermeu...@posteo.net writes: > I have been trying to export SVG images having links to CSS from Org to > HTML > and I have found that the this CSS is not active in Firefox (only > browser I tried). > > I have found that the CCS is only active under two conditions: > 1. The HTML page shoul

[PATCH] ox-html.el: add option to embed SVG for CSS support in SVG

2023-06-05 Thread gerard . vermeulen
Hi, I have been trying to export SVG images having links to CSS from Org to HTML and I have found that the this CSS is not active in Firefox (only browser I tried). I have found that the CCS is only active under two conditions: 1. The HTML page should manage the CSS that the SVG image links t