From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/114901 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?q?Heinrich_Pae=C3=9Fens_via_ntg-context?= Newsgroups: gmane.comp.tex.context Subject: Re: SVG style ignored after double semicolon Date: Tue, 10 May 2022 01:01:08 +0200 Message-ID: References: <85A94842-FECF-454B-BFD0-B13EFF4C2786@me.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Content-Type: multipart/mixed; boundary="===============1081470917224918132==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37678"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Heinrich_Pae=C3=9Fens?= To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue May 10 01:01:53 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noCO0-0009dR-G0 for gctc-ntg-context-518@m.gmane-mx.org; Tue, 10 May 2022 01:01:52 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C469636074C; Tue, 10 May 2022 01:01:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yk2cQbhHpHT6; Tue, 10 May 2022 01:01:16 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B96ED360721; Tue, 10 May 2022 01:01:16 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EF796360721 for ; Tue, 10 May 2022 01:01:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id epwSC6z2ezRu for ; Tue, 10 May 2022 01:01:14 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=17.58.23.187; helo=mr85p00im-zteg06021601.me.com; envelope-from=paessens@me.com; receiver= Original-Received: from mr85p00im-zteg06021601.me.com (mr85p00im-zteg06021601.me.com [17.58.23.187]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 9C45E360675 for ; Tue, 10 May 2022 01:01:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1652137272; bh=NdJ13TOCApPgw5l9c5fj/5pNi3HqsfWeOt/dmSo7vw8=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=Guk0AoNK5gO9nJko3RKqGm/wdeQmz/JUt29eqG41Ya55mJ5homMuyJAeIwr9Zu9d9 jRMgp161y4bKErT6fjoytfOki/MVvP+IN0V3keCdHr47t8MNj5+puGKDZnaQnzFo36 jk4nP5uDN4sxCBG6Vs8ba9Ht+wINSp5E/cGu9Ny1vNUS7ObMctnAFiYpT0BQvZpTdi WnqgcETvqsuQ90XLrzeaKvzZVN9gTnnt54tEOj2wnXz1KY5HRoSekm4CkqME/jAgxN ox08RdWsCk8tyz7e5AdX43wu+9eaND5mvEzwHYHiIuK9pzwQIcuv6bHXcTDuCW5ZjQ KZiFuNUPBE2gA== Original-Received: from smtpclient.apple (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-zteg06021601.me.com (Postfix) with ESMTPSA id CF67B40551; Mon, 9 May 2022 23:01:10 +0000 (UTC) In-Reply-To: <85A94842-FECF-454B-BFD0-B13EFF4C2786@me.com> X-Mao-Original-Outgoing-Id: 673830068.2528-930f1063ba8777739f4b80fc8dff5081 X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Proofpoint-ORIG-GUID: j-3srSZDdwPtBwo1gChGJ0xh-uGhR-Aa X-Proofpoint-GUID: j-3srSZDdwPtBwo1gChGJ0xh-uGhR-Aa X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.138,18.0.572,17.11.62.513.0000000_definitions?= =?UTF-8?Q?=3D2020-02-14=5F11:2020-02-14=5F02,2020-02-14=5F11,2021-12-02?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=841 malwarescore=0 spamscore=0 suspectscore=0 clxscore=1015 bulkscore=0 mlxscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205090113 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:114901 Archived-At: --===============1081470917224918132== Content-Type: multipart/alternative; boundary="Apple-Mail=_5905CDC2-C31D-45D2-B0D0-39A564F03304" --Apple-Mail=_5905CDC2-C31D-45D2-B0D0-39A564F03304 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 ok, let=E2=80=99s get smarter. how about sanitizing the svg-file from JFreeSVG with svgo or svgcleaner = or nano or else? And as a side effect you=E2=80=99d have the file optimized, ie. a = smaller size (lossless I suppose) =E2=80=A6 and are you sure that the ;;-issue is the only bug? After sanitizing = you=E2=80=99ll never know but that should be ok. I=E2=80=99ve checked this. For your example it=E2=80=99s ok. > svgo in.svg > in.svg: > Done in 24 ms! > 0.091 KiB - 26.9% =3D 0.066 KiB > svgcleaner /Users/hp/in2.svg /Users/hp/out2.svg > Your image is 9.36% smaller now. ,__, {o,o} ./)_) -=C2=BB-=C2=BB- > On 9. May 2022, at 19:01, Heinrich Pae=C3=9Fens via ntg-context = > wrote: >=20 > Yes, now I see, but isn=E2=80=99t there sth missing in the export from = JFreeSVG, that were supposed to fill in between the semicolons? If not, = why don=E2=80=99t you just post-process, if possible =E2=80=A6=20 > =E2=80=A6 sth like=20 >=20 > > gsed =E2=80=99s/;;/;/g' in.svg > out.svg >=20 > ;-) >=20 >=20 >=20 >> On 9. May 2022, at 17:42, Thangalin > wrote: >>=20 >> Hi Heinrich, >>=20 >> 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. >>=20 >> In other words, try this: >>=20 >> \startbuffer[svg] >> >> > style=3D"stroke:rgb(0,0,0);;fill:none" /> >> >> \stopbuffer >>=20 >> \starttext >> \placefigure{}{\includesvgbuffer[svg][conversion=3Dmp]} >> \stoptext >>=20 >> 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. >>=20 >> Cheers! >>=20 >>=20 >> On Mon, May 9, 2022 at 1:55 AM Heinrich Pae=C3=9Fens > wrote: >> Hi there >>=20 >> I can compile your example without any tweaks, hence could not = reproduce any error. >>=20 >> cheers >> Heinrich >>=20 >> =E2=80=94=E2=80=94=E2=80=94 >>=20 >> 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) >>=20 >> [R.app GUI 1.78 (8075) x86_64-apple-darwin17.0] >>=20 >> > svg("/Users/hp/filename.svg"); >> > plot(rnorm(200)); >> > dev.off() >> null device=20 >> 1=20 >> >=20 >>=20 >> =E2=80=94=E2=80=94=E2=80=94 >>=20 >> % !TEX program =3D lmtx >>=20 >> \starttext >> \externalfigure[/Users/hp/filename.svg][conversion=3Dmp] >> \stoptext >>=20 >> =E2=80=94=E2=80=94=E2=80=94 >>=20 >>=20 >>=20 >>=20 >>> On 9. May 2022, at 08:10, Thangalin via ntg-context = > wrote: >>>=20 >>> Here's a screenshot comparing ConTeXt's PDF output (left) with = KeenWrite's preview for the same SVG document: >>>=20 >>> https://i.ibb.co/68nqwrg/render-r-plot.png = >>>=20 >>> I've filed a bug against Renjin's SVG exporter. >>>=20 >>> Any guidance on how to fix this is greatly appreciated. >>>=20 >>> = __________________________________________________________________________= _________ >>> If your question is of interest to others as well, please add an = entry to the Wiki! >>>=20 >>> 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 >>> = __________________________________________________________________________= _________ >>=20 >=20 > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > 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 > = __________________________________________________________________________= _________ --Apple-Mail=_5905CDC2-C31D-45D2-B0D0-39A564F03304 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
ok, let=E2=80=99s get = smarter.
how about sanitizing the svg-file from JFreeSVG = with svgo or svgcleaner or nano or else?
And as a = side effect you=E2=80=99d have the file optimized, ie. a smaller size = (lossless I suppose) =E2=80=A6
and are you sure = that the ;;-issue is the only bug? After sanitizing you=E2=80=99ll never = know but that should be ok.

I=E2=80=99ve checked this. For your example it=E2=80=99s = ok.

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

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

 ,__,
 {o,o}
./)_)
 -=C2=BB-=C2=BB-

On 9. May 2022, at 19:01, Heinrich Pae=C3=9Fens via = ntg-context <ntg-context@ntg.nl> wrote:

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

gsed =E2=80=99s/;;/;/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=3D"100" height=3D"100"
        = style=3D"stroke:rgb(0,0,0);;fill:none" />
</svg>\stopbuffer

\starttext
  = \placefigure{}{\includesvgbuffer[svg][conversion=3Dmp]}
\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=C3=9Fens <paessens@me.com> wrote:
Hi there

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

cheers
Heinrich

=E2=80=94=E2=80=94=E2=80=94

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 

=E2=80=94=E2=80=94=E2=80=94

% !TEX program =3D = lmtx

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

=E2=80=94=E2=80=94=E2=80=94




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:


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
_______________________________________________________________= ____________________


_____________________________________________= ______________________________________
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
_______________________________________________________________= ____________________

= --Apple-Mail=_5905CDC2-C31D-45D2-B0D0-39A564F03304-- --===============1081470917224918132== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============1081470917224918132==--