Re: [NTG-context] Convert SVG to MetaPost

2019-08-13 Thread Hans Hagen

On 8/12/2019 1:15 PM, Taco Hoekwater wrote:

Hi,


On 12 Aug 2019, at 12:10, Jon Wong  wrote:

Hi all,

Is it possible to convert SVG to MetaPost?

Currently, I have Bash scripts in my workflow to invoke Inkscape (converting 
SVG to PDF). I don’t like to allow shell access to TeX.

If I can convert SVG to MetaPost, I will gladly Git-track MetaPost files 
instead of SVG files. That will do away with having to convert SVG into PDF 
(via Inkscape).


SVG (and Inkscape) can do many graphical things that metapost can not do, so I 
think that would be a bad idea even if there was a tool that could do the 
conversion for some subset of SVG.

That said, SVG is just an XML format, so it should be possible to process 
simple SVG using ConTeXt’s built-in xml parser (with suitable processing 
environments, of course). How much work that would entail and whether it is
feasible depends on the actual SVG graphics.
indeed, and i actually did a partial converter a while ago just to see 
if it could be done but then decided to delay that till i really need it
(normally converting a svg to pdf is quite ok) .. i might pick it up on 
some cold winternight


Hans

--
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] Convert SVG to MetaPost

2019-08-13 Thread Hans Hagen

On 8/12/2019 1:33 PM, Jon Wong wrote:

Hi Taco!

Very enlightening!

I’ll just use both MetaPost and SVG for their intended purposes. (SVG 
will come from workflow involving GIMP/Inkscape; MetaPost for logical, 
rather than graphical, figures.)

if you have inkscape installed you can do

\externalfigure[test.svg][width=10cm]

and context will handle the conversion

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] radiobuttons

2019-08-13 Thread Henning Hraban Ramm
Regardless of my other mails, I’d appreciate to have this bug fixed.

Greetlings, Hraban

> Am 2019-08-05 um 10:03 schrieb Henning Hraban Ramm :
> 
> Hi, coming back to an old form project I find that something changed WRT to 
> form fields.
> 
> For one, some fields appear smaller and shifted upwards – I managed to fix 
> that with setups.
> 
> What I can’t change is behaviour of radiobuttons: if I click one, all rbs of 
> one group activate, and I can’t deactivate them any more.
> 
> In my project all of the fields are duplicated on other pages, and while all 
> other fields’ contents get copied, it doesn’t work for radiobuttons; my 
> minimal example unfortunately can’t show that.
> 
> 
> \setupinteraction[state=start]
> 
> \setupfield[MMradio][
>  option=printable,
>  frame=overlay, corner=round,
>  height=1em, width=1em,
>  align=bottom,
> ]
> 
> \definefield[chooseTeX][radio][MMradio][rbContext,rbLatex,rbOther][rbContext]
> \definesubfield[rbContext][][]
> \definesubfield[rbLatex][][]
> \definesubfield[rbOther][][]
> 
> \starttext
> 
> I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ 
> \field[rbOther] other.
> 
> \page
> 
> Just to confirm:
> I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ 
> \field[rbOther] other.
> 
> 
> \stoptext
> 
> 
> Greetlings, Hraban
> ___
> 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
___