ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* SVG style ignored after double semicolon
@ 2022-05-08  8:33 Thangalin via ntg-context
  2022-05-08 19:06 ` Thangalin via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Thangalin via ntg-context @ 2022-05-08  8:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thangalin


[-- Attachment #1.1: Type: text/plain, Size: 814 bytes --]

Hey hey,

The following produces a filled square, rather than an empty one:

\startbuffer[svg]
<svg>
  <rect width="100" height="100"
        style="stroke:rgb(0,0,0);;fill:none" />
</svg>
\stopbuffer

\starttext
  \placefigure{}{\includesvgbuffer[svg][conversion=mp]}
\stoptext

Remove the extra semicolon to get the expected result:

<svg>
  <rect width="100" height="100"
        style="stroke:rgb(0,0,0);fill:none" />
</svg>

It appears that a style immediately following two semicolons is ignored.

The SVG was generated using the following R code:

svg("filename.svg");
plot(rnorm(200));
dev.off()

Arguably, R's SVG routines could be a bit tighter. Can the MP SVG parser
code be relaxed to skip "empty" semicolons?

$ context --version
mtx-context     | current version: 2022.05.02 16:19

Much appreciated.

[-- Attachment #1.2: Type: text/html, Size: 1295 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: SVG style ignored after double semicolon
  2022-05-08  8:33 SVG style ignored after double semicolon Thangalin via ntg-context
@ 2022-05-08 19:06 ` Thangalin via ntg-context
  2022-05-09  6:10   ` Thangalin via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Thangalin via ntg-context @ 2022-05-08 19:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thangalin


[-- Attachment #1.1: Type: text/plain, Size: 1659 bytes --]

Hi again,

In tex/texmf-context/tex/context/base/mkxl/mlib-svg.lmt the following regex
appears a few times (line 1502, 1556, and 1570):

gmatch(VAR,"%s*([^:]+):%s*([^;]+);?")

It may be helpful to first normalize the string by appending a semicolon to
the end, allowing for:

for w in (VAR .. ";"):gmatch("([^;]*);") do ...

Splitting 'w' afterwards on the colon within key:value pairs would still be
necessary, so maybe that approach is a wash.

Aside, when I made changes to the file, I couldn't get either a report() or
a print() statement to show up in the output, even when running with
--debug. Any hints on how to sprinkle debug info into the code? Or was I
barking up the wrong source file?

Cheers!

On Sun, May 8, 2022 at 1:33 AM Thangalin <thangalin@gmail.com> wrote:

> Hey hey,
>
> The following produces a filled square, rather than an empty one:
>
> \startbuffer[svg]
> <svg>
>   <rect width="100" height="100"
>         style="stroke:rgb(0,0,0);;fill:none" />
> </svg>
> \stopbuffer
>
> \starttext
>   \placefigure{}{\includesvgbuffer[svg][conversion=mp]}
> \stoptext
>
> Remove the extra semicolon to get the expected result:
>
> <svg>
>   <rect width="100" height="100"
>         style="stroke:rgb(0,0,0);fill:none" />
> </svg>
>
> It appears that a style immediately following two semicolons is ignored.
>
> The SVG was generated using the following R code:
>
> svg("filename.svg");
> plot(rnorm(200));
> dev.off()
>
> Arguably, R's SVG routines could be a bit tighter. Can the MP SVG parser
> code be relaxed to skip "empty" semicolons?
>
> $ context --version
> mtx-context     | current version: 2022.05.02 16:19
>
> Much appreciated.
>

[-- Attachment #1.2: Type: text/html, Size: 2616 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: SVG style ignored after double semicolon
  2022-05-08 19:06 ` Thangalin via ntg-context
@ 2022-05-09  6:10   ` Thangalin via ntg-context
  2022-05-09  8:55     ` Heinrich Paeßens via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Thangalin via ntg-context @ 2022-05-09  6:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thangalin


[-- Attachment #1.1: Type: text/plain, Size: 260 bytes --]

Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's
preview for the same SVG document:

https://i.ibb.co/68nqwrg/render-r-plot.png

I've filed a bug against Renjin's SVG exporter.

Any guidance on how to fix this is greatly appreciated.

[-- Attachment #1.2: Type: text/html, Size: 465 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: SVG style ignored after double semicolon
  2022-05-09  6:10   ` Thangalin via ntg-context
@ 2022-05-09  8:55     ` Heinrich Paeßens via ntg-context
  2022-05-09 15:42       ` Thangalin via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Heinrich Paeßens via ntg-context @ 2022-05-09  8:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Heinrich Paeßens


[-- Attachment #1.1: Type: text/plain, Size: 1529 bytes --]

Hi there

I can compile your example without any tweaks, hence could not reproduce any error.

cheers
Heinrich

———

R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)

[R.app GUI 1.78 (8075) x86_64-apple-darwin17.0]

> svg("/Users/hp/filename.svg");
> plot(rnorm(200));
> dev.off()
null device 
          1 
> 

———

% !TEX program = lmtx

\starttext
  \externalfigure[/Users/hp/filename.svg][conversion=mp]
\stoptext

———





> On 9. May 2022, at 08:10, Thangalin via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's preview for the same SVG document:
> 
> https://i.ibb.co/68nqwrg/render-r-plot.png <https://i.ibb.co/68nqwrg/render-r-plot.png>
> 
> I've filed a bug against Renjin's SVG exporter.
> 
> Any guidance on how to fix this is greatly appreciated.
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


[-- Attachment #1.2.1: Type: text/html, Size: 1895 bytes --]

[-- Attachment #1.2.2: tst-svg-mp.pdf --]
[-- Type: application/pdf, Size: 22316 bytes --]

[-- Attachment #1.2.3: Type: text/html, Size: 2132 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: SVG style ignored after double semicolon
  2022-05-09  8:55     ` Heinrich Paeßens via ntg-context
@ 2022-05-09 15:42       ` Thangalin via ntg-context
  2022-05-09 17:01         ` Heinrich Paeßens via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Thangalin via ntg-context @ 2022-05-09 15:42 UTC (permalink / raw)
  To: Heinrich Paeßens; +Cc: Thangalin, mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2277 bytes --]

Hi Heinrich,

Use the SVG I provided. R and Renjin use two different SVG generators.
Renjin uses JFreeSVG when exporting as SVG. As you pointed out, there are
no issues with R because it will export an SVG file without any double
semicolons.

In other words, try this:

\startbuffer[svg]
<svg>
  <rect width="100" height="100"
        style="stroke:rgb(0,0,0);;fill:none" />
</svg>
\stopbuffer

\starttext
  \placefigure{}{\includesvgbuffer[svg][conversion=mp]}
\stoptext

If you get a black square, that's the bug. If you get a white square, then
there's something different about our environment setups.

Cheers!


On Mon, May 9, 2022 at 1:55 AM Heinrich Paeßens <paessens@me.com> wrote:

> Hi there
>
> I can compile your example without any tweaks, hence could not reproduce
> any error.
>
> cheers
> Heinrich
>
> ———
>
> R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
> Copyright (C) 2022 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin17.0 (64-bit)
>
> [R.app GUI 1.78 (8075) x86_64-apple-darwin17.0]
>
> > svg("/Users/hp/filename.svg");
> > plot(rnorm(200));
> > dev.off()
> null device
>           1
> >
>
> ———
>
> % !TEX program = lmtx
>
> \starttext
>   \externalfigure[/Users/hp/filename.svg][conversion=mp]
> \stoptext
>
> ———
>
>
>
>
> On 9. May 2022, at 08:10, Thangalin via ntg-context <ntg-context@ntg.nl>
> wrote:
>
> Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's
> preview for the same SVG document:
>
> https://i.ibb.co/68nqwrg/render-r-plot.png
>
> I've filed a bug against Renjin's SVG exporter.
>
> Any guidance on how to fix this is greatly appreciated.
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 4154 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: SVG style ignored after double semicolon
  2022-05-09 15:42       ` Thangalin via ntg-context
@ 2022-05-09 17:01         ` Heinrich Paeßens via ntg-context
  2022-05-09 20:03           ` Thangalin via ntg-context
  2022-05-09 23:01           ` Heinrich Paeßens via ntg-context
  0 siblings, 2 replies; 9+ messages in thread
From: Heinrich Paeßens via ntg-context @ 2022-05-09 17:01 UTC (permalink / raw)
  To: Thangalin; +Cc: Heinrich Paeßens, mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2976 bytes --]

Yes, now I see, but isn’t there sth missing in the export from JFreeSVG, that were supposed to fill in between the semicolons? If not, why don’t you just post-process, if possible … 
… sth like 

> gsed ’s/;;/;/g' in.svg > out.svg

;-)



> On 9. May 2022, at 17:42, Thangalin <thangalin@gmail.com> wrote:
> 
> Hi Heinrich,
> 
> Use the SVG I provided. R and Renjin use two different SVG generators. Renjin uses JFreeSVG when exporting as SVG. As you pointed out, there are no issues with R because it will export an SVG file without any double semicolons.
> 
> In other words, try this:
> 
> \startbuffer[svg]
> <svg>
>   <rect width="100" height="100"
>         style="stroke:rgb(0,0,0);;fill:none" />
> </svg>
> \stopbuffer
> 
> \starttext
>   \placefigure{}{\includesvgbuffer[svg][conversion=mp]}
> \stoptext
> 
> If you get a black square, that's the bug. If you get a white square, then there's something different about our environment setups.
> 
> Cheers!
> 
> 
> On Mon, May 9, 2022 at 1:55 AM Heinrich Paeßens <paessens@me.com <mailto:paessens@me.com>> wrote:
> Hi there
> 
> I can compile your example without any tweaks, hence could not reproduce any error.
> 
> cheers
> Heinrich
> 
> ———
> 
> R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
> Copyright (C) 2022 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin17.0 (64-bit)
> 
> [R.app GUI 1.78 (8075) x86_64-apple-darwin17.0]
> 
> > svg("/Users/hp/filename.svg");
> > plot(rnorm(200));
> > dev.off()
> null device 
>           1 
> > 
> 
> ———
> 
> % !TEX program = lmtx
> 
> \starttext
>   \externalfigure[/Users/hp/filename.svg][conversion=mp]
> \stoptext
> 
> ———
> 
> 
> 
> 
>> On 9. May 2022, at 08:10, Thangalin via ntg-context <ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>> wrote:
>> 
>> Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's preview for the same SVG document:
>> 
>> https://i.ibb.co/68nqwrg/render-r-plot.png <https://i.ibb.co/68nqwrg/render-r-plot.png>
>> 
>> I've filed a bug against Renjin's SVG exporter.
>> 
>> Any guidance on how to fix this is greatly appreciated.
>> 
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>> 
>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki     : http://contextgarden.net <http://contextgarden.net/>
>> ___________________________________________________________________________________
> 


[-- Attachment #1.2: Type: text/html, Size: 6422 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: SVG style ignored after double semicolon
  2022-05-09 17:01         ` Heinrich Paeßens via ntg-context
@ 2022-05-09 20:03           ` Thangalin via ntg-context
  2022-05-09 23:01           ` Heinrich Paeßens via ntg-context
  1 sibling, 0 replies; 9+ messages in thread
From: Thangalin via ntg-context @ 2022-05-09 20:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thangalin


[-- Attachment #1.1: Type: text/plain, Size: 1335 bytes --]

> gsed ’s/;;/;/g' in.svg > out.svg

If a user has an SVG text element where ";;" goes into the document, then
that'd make for an awfully awkward user experience and obscure bug to fix.
For example: plot(rnorm(5), xlab=";;")

Meaning, the document must be loaded, parsed, and all style/class elements
sanitized. KeenWrite performs real-time rendering of documents. The code to
preview the document is shared by the code that exports to XHTML for
ConTeXt to render. Effectively, this would be parsing the SVG document
twice, which would bog down the previewer.

Changing the regexes in mlib-svg.lmt to forgive empty styles seems like the
most efficient and flexible approach, which follows the robustness
principle: "be conservative in what you send, be liberal in what you
accept."

The specs for CSS styles are ambiguous as to whether property declarations
are required:

https://www.w3.org/TR/2001/PR-SVG-20010719/styling.html#StyleAttribute

I've since learned that Renjin uses JFreeSVG to produce the SVG file. I've
logged a bug against JFreeSVG to avoid the double semicolon. However, this
means waiting for a fix from JFreeSVG and then waiting for that fix to be
integrated into Renjin. It'll probably be months before that'll happen.
(The last release of Renjin was like 10 months ago.)

Thoughts?

[-- Attachment #1.2: Type: text/html, Size: 1664 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: SVG style ignored after double semicolon
  2022-05-09 17:01         ` Heinrich Paeßens via ntg-context
  2022-05-09 20:03           ` Thangalin via ntg-context
@ 2022-05-09 23:01           ` Heinrich Paeßens via ntg-context
  2022-05-09 23:17             ` Thangalin via ntg-context
  1 sibling, 1 reply; 9+ messages in thread
From: Heinrich Paeßens via ntg-context @ 2022-05-09 23:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Heinrich Paeßens


[-- Attachment #1.1: Type: text/plain, Size: 4544 bytes --]

ok, let’s get smarter.
how about sanitizing the svg-file from JFreeSVG with svgo or svgcleaner or nano or else?
And as a side effect you’d have the file optimized, ie. a smaller size (lossless I suppose) …
and are you sure that the ;;-issue is the only bug? After sanitizing you’ll never know but that should be ok.

I’ve checked this. For your example it’s ok.

> svgo in.svg
> in.svg:
> Done in 24 ms!
> 0.091 KiB - 26.9% = 0.066 KiB

> svgcleaner /Users/hp/in2.svg /Users/hp/out2.svg
> Your image is 9.36% smaller now.

 ,__,
 {o,o}
./)_)
 -»-»-

> On 9. May 2022, at 19:01, Heinrich Paeßens via ntg-context <ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>> wrote:
> 
> Yes, now I see, but isn’t there sth missing in the export from JFreeSVG, that were supposed to fill in between the semicolons? If not, why don’t you just post-process, if possible … 
> … sth like 
> 
> > gsed ’s/;;/;/g' in.svg > out.svg
> 
> ;-)
> 
> 
> 
>> On 9. May 2022, at 17:42, Thangalin <thangalin@gmail.com <mailto:thangalin@gmail.com>> wrote:
>> 
>> Hi Heinrich,
>> 
>> Use the SVG I provided. R and Renjin use two different SVG generators. Renjin uses JFreeSVG when exporting as SVG. As you pointed out, there are no issues with R because it will export an SVG file without any double semicolons.
>> 
>> In other words, try this:
>> 
>> \startbuffer[svg]
>> <svg>
>>   <rect width="100" height="100"
>>         style="stroke:rgb(0,0,0);;fill:none" />
>> </svg>
>> \stopbuffer
>> 
>> \starttext
>>   \placefigure{}{\includesvgbuffer[svg][conversion=mp]}
>> \stoptext
>> 
>> If you get a black square, that's the bug. If you get a white square, then there's something different about our environment setups.
>> 
>> Cheers!
>> 
>> 
>> On Mon, May 9, 2022 at 1:55 AM Heinrich Paeßens <paessens@me.com <mailto:paessens@me.com>> wrote:
>> Hi there
>> 
>> I can compile your example without any tweaks, hence could not reproduce any error.
>> 
>> cheers
>> Heinrich
>> 
>> ———
>> 
>> R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
>> Copyright (C) 2022 The R Foundation for Statistical Computing
>> Platform: x86_64-apple-darwin17.0 (64-bit)
>> 
>> [R.app GUI 1.78 (8075) x86_64-apple-darwin17.0]
>> 
>> > svg("/Users/hp/filename.svg");
>> > plot(rnorm(200));
>> > dev.off()
>> null device 
>>           1 
>> > 
>> 
>> ———
>> 
>> % !TEX program = lmtx
>> 
>> \starttext
>>   \externalfigure[/Users/hp/filename.svg][conversion=mp]
>> \stoptext
>> 
>> ———
>> 
>> 
>> 
>> 
>>> On 9. May 2022, at 08:10, Thangalin via ntg-context <ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>> wrote:
>>> 
>>> Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's preview for the same SVG document:
>>> 
>>> https://i.ibb.co/68nqwrg/render-r-plot.png <https://i.ibb.co/68nqwrg/render-r-plot.png>
>>> 
>>> I've filed a bug against Renjin's SVG exporter.
>>> 
>>> Any guidance on how to fix this is greatly appreciated.
>>> 
>>> ___________________________________________________________________________________
>>> If your question is of interest to others as well, please add an entry to the Wiki!
>>> 
>>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context>
>>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / http://context.aanhet.net <http://context.aanhet.net/>
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/>
>>> wiki     : http://contextgarden.net <http://contextgarden.net/>
>>> ___________________________________________________________________________________
>> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/>
> wiki     : http://contextgarden.net <http://contextgarden.net/>
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 10735 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: SVG style ignored after double semicolon
  2022-05-09 23:01           ` Heinrich Paeßens via ntg-context
@ 2022-05-09 23:17             ` Thangalin via ntg-context
  0 siblings, 0 replies; 9+ messages in thread
From: Thangalin via ntg-context @ 2022-05-09 23:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thangalin


[-- Attachment #1.1: Type: text/plain, Size: 986 bytes --]

That's another good idea Heinrich.

I certainly could invoke another application to sanitize the SVG, but that
brings with it a number of additional problems: Does the user have it
installed properly? Is it cross-platform? Additionally, the typesetting
code (in Java) would have to be updated to call out to sanitize the file,
plus introducing more error handling for when sanitizing goes wrong.
Cleaning up the input document feels more like a band-aid than solving the
underlying problem, which is to relax the regex ConTeXt uses to parse the
style attribute.

I'm pretty sure I can provide a patch for the regex, I just need to know
how to get debugging information printed to the console when compiling the
document using the context command.

Any ideas about how to log strings after modifying mlib-svg.lmt? I tried
adding print/report statements, but none of them showed up. Does anyone
know if that's even the right file to change to start looking into the
issue?

Thanks again!

[-- Attachment #1.2: Type: text/html, Size: 1139 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-05-09 23:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-08  8:33 SVG style ignored after double semicolon Thangalin via ntg-context
2022-05-08 19:06 ` Thangalin via ntg-context
2022-05-09  6:10   ` Thangalin via ntg-context
2022-05-09  8:55     ` Heinrich Paeßens via ntg-context
2022-05-09 15:42       ` Thangalin via ntg-context
2022-05-09 17:01         ` Heinrich Paeßens via ntg-context
2022-05-09 20:03           ` Thangalin via ntg-context
2022-05-09 23:01           ` Heinrich Paeßens via ntg-context
2022-05-09 23:17             ` Thangalin via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).