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

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).