|
From: sfeam (E. Merritt) <eam...@gm...> - 2011-11-22 04:46:22
|
On Monday, 21 November 2011, pl...@pi... wrote: > Hi, > > I would like to have the possibility to make the active mouse features > be included in svg file rather than as an external reference. > > This is not always desirable but has significant advantages when sending > svg output to collaborators where it adds a whole load of complex > explanations if I have two separate files. > > AFAIR this was the format when I originally submitted a patch with this > kind of interactive behaviour for svg. So you're "forgery69"? I don't think I ever knew who submitted the original patch other than that pseudonym. You should get some kudos in the source file. > It would seem the best way to hook this into the existing structure > would be a special value of the jsdir dir option to svg terminal. > > eg. > set term svg jsdir="internal" My first thought is that this is more parallel to the "standalone" option in the various tex drivers and in the canvas terminal. > Before I dive in and start coding I would like to do something that fits > in with current philosophy and that could be submitted as a patch for > consideration. > Any comments or suggestions on how to go about this? My suggestion is to have it work like the postscript terminal does with its prologue files. If the user specifies "set term svg standalone", the instead of writing out <script type="text/javascript" xlink:href="JSDIR/gnuplot_svg.js"/> you would write out <script type="text/javascript"><![CDATA[" and then copy the contents of JSDIR:gnuplot_svg.js line by line into the output stream. Under this model the jsder="foo" option might still be useful in order to tell the program where to copy from, in the case that you want to include a locally customized version. Ethan > TIA, Peter. |