From: "Heinrich Paeßens via ntg-context" <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: "Heinrich Paeßens" <paessens@me.com>
Subject: Re: SVG style ignored after double semicolon
Date: Tue, 10 May 2022 01:01:08 +0200 [thread overview]
Message-ID: <F7EBA0A1-4AD0-4DFF-809A-7DE0A33F2BEC@me.com> (raw)
In-Reply-To: <85A94842-FECF-454B-BFD0-B13EFF4C2786@me.com>
[-- 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
___________________________________________________________________________________
next prev parent reply other threads:[~2022-05-09 23:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-08 8:33 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 [this message]
2022-05-09 23:17 ` Thangalin via ntg-context
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F7EBA0A1-4AD0-4DFF-809A-7DE0A33F2BEC@me.com \
--to=ntg-context@ntg.nl \
--cc=paessens@me.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).