Skip to Content.
Sympa Menu

texmacs-users - [TeXmacs] rsvg pretty rotten

Subject: mailing-list for TeXmacs Users

List archive

[TeXmacs] rsvg pretty rotten


Chronological Thread 
  • From: "Sam Liddicott" <address@hidden>
  • To: address@hidden
  • Subject: [TeXmacs] rsvg pretty rotten
  • Date: Mon, 26 Jul 2010 15:33:28 +0100
  • Envelope-to: address@hidden
  • Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAADxQTFRF NTdQY2Z/i286eHFugnNXoJBwm5GCs5VeoqO0ua+fwLCQ4c2q19C81NDF4eLr/unQ/PTf/fXW+/rq /f/7XKo76wAAAAlwSFlzAAALEwAACxMBAJqcGAAAAi9JREFUSMetloGSqyAMRVsFNAQkxP//15cE 62rFdt/MZqbTVu/hBhLEx/qf8fgDIAN455wHyPk7wCIe9nA+fwGSH87hgD8AHPfRpy2GwdMtcBh+ mg4Ech9Ih+RNixJKDLEL0GF8VLkSojePHrDlryNijbFW8zBg8PUKbBOI6D1WCV5Rf2DzxCtgBlMs tRRVW5LyVW3ew1TfAZZ6RcQicpb4yZmaC74DJADK6BdATOrUAbJzsZie+K22ZnEBknNYysvhVH6u 1X8CqAe4DuANoPoOrAbsHXUARJ5knc5z4EyyTnHoAqj7xvkYIdk65AwhyEZKMusOIDV2QQQaCnDQ gBiDR3RdIEb5CBESt2wgQJI0Yx/Agphg1MgNsD+QkszM9wHVPx/PeQOW+fmcR9DF8+4CyCJhCuP8 fDzmBbLqs8JzMODqYNfDvKhoGYM2lDosy5jlRozccRAgrPM8iygQS3Mv87IugUgKlC7NZ6liuy4r uresVq5QuQAr09ZKEga8OkluyKXeQ6Bs3SrtqgC1pWLNqAfwDhBnB+sK8OrVL4D4h1B4zWPWhJhu gPUHKA5EwSMYUMsdQK+UKDhIOTSHeg+8HCoTOGtB/gwcl4mSdGybwXegPWhM/RHYKwchkckhUNMX 6j7ueQNScLbZZOPRxaADyO2UQCJpl7wbnE6gQ+ksWjpngxOwF1tF5ecP3R6KB+AQxPfHLncQ+nKw 06fhu68OTIfJ869eTtg22l+9zfwDK3mKl5BFHMYAAAAASUVORK5CYII=

The inkscape converter definition in ./TeXmacs/progs/convert/images/init-images.scm:

(converter svg-file postscript-file
  (:require (url-exists-in-path? "inkscape"))
  (:shell "inkscape" "-z" "-f" from "-P" to))

is pretty fine; in outputting postscript it is resolution neutral.

The rsvg definition (which is preferred by TeXmacs and used during postscript definition) is rotten:

(converter svg-file png-file
   (:require (url-exists-in-path? "rsvg"))
   (:shell "rsvg" "-f png" from to))

It allows rsvg to choose the generated output size regardless of the TeXmacs global dpi or graphics size.

And I find the resolution to be pretty rotten. I think that --dpi-x and --dpi-y should be specified to the global dpi (for the benefit of any px units in the svg) and also -w and -h should be specified as given in the <postscript|...> node.

I'm still trying to locate the implementation of the <postscript tag so I can hazard a patch. Best candidate so far is image->postscript in ./TeXmacs/progs/kernel/texmacs/tm-convert.scm but I'm not convinced.

In more exciting news I want to add mail-merge sort of stuff to SVG - so I can take a screen shot (maybe from a config screen), import into an SVG and add some named text fields - and then I can re-use the same screen-shot with different config values! Doing with graphics what texmacs makes so easy with text. But this also depends on being able to pass text arguments down to the converter as rsvg needs...

Any hints?

Sam

--
Sam's signature


  • [TeXmacs] rsvg pretty rotten, Sam Liddicott, 07/26/2010

Archive powered by MHonArc 2.6.19.

Top of Page