Martin.Hepperle | 13 Aug 2012 16:01
Picon
Favicon

Ghostscript command line

Dear all,

while trying Octave on my new WIndows 7 installation I ran across a problem
with "unusual" path names.
My installation path contained special characters like "(", which broke the
"system()" call to execute ghostcript (the same happend with fltk as
backend, but I did not look into this as I prefer gnuplot for the moment).

I have fixed this in my installation by enclosing the gnuplot binary file
name in double quotes.
This occurs in the script file ".../plot/private/__ghostscript__.m" as
follows:

-----------------------------------------
  if (isempty (opts.binary))
    error ("print:no_ghostscript", "__ghostscript__.m: ghostscript is
required.");
  elseif (isempty (opts.output))
    cmd = sprintf ("\"%s\" %s", opts.binary, gs_opts);             % \"
added MH
  else
    cmd = sprintf ("\"%s\" %s -sOutputFile=%s", opts.binary, gs_opts,
opts.output);    % \" added MH
  endif
-----------------------------------------

While this works under Windows, I am not sure whether this will also work
under Linux.

Maybe one of the maintainers of the plot package can have a look at this.
(Continue reading)

Carnë Draug | 17 Aug 2012 02:03
Picon
Gravatar

Re: Ghostscript command line

On 13 August 2012 15:01, Martin.Hepperle <Martin.Hepperle <at> dlr.de> wrote:
> Dear all,
>
> while trying Octave on my new WIndows 7 installation I ran across a problem
> with "unusual" path names.
> My installation path contained special characters like "(", which broke the
> "system()" call to execute ghostcript (the same happend with fltk as
> backend, but I did not look into this as I prefer gnuplot for the moment).
>
> I have fixed this in my installation by enclosing the gnuplot binary file
> name in double quotes.
> This occurs in the script file ".../plot/private/__ghostscript__.m" as
> follows:
>
> -----------------------------------------
>   if (isempty (opts.binary))
>     error ("print:no_ghostscript", "__ghostscript__.m: ghostscript is
> required.");
>   elseif (isempty (opts.output))
>     cmd = sprintf ("\"%s\" %s", opts.binary, gs_opts);             % \"
> added MH
>   else
>     cmd = sprintf ("\"%s\" %s -sOutputFile=%s", opts.binary, gs_opts,
> opts.output);    % \" added MH
>   endif
> -----------------------------------------
>
> While this works under Windows, I am not sure whether this will also work
> under Linux.
>
(Continue reading)


Gmane