Mercurial > octave
changeset 28208:c3dd445fcc2f stable
print.m: Fix printing eps files with -tight option on Windows (bug #57143).
* print.m: When using epstool on Windows, pass the option '-gs
path_to_gs_executable' so that epstool succesfully finds the ghostscript that
we ship with Octave.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 11 Apr 2020 16:25:52 -0700 |
parents | 11d66485fc19 |
children | 63f5c721cfde 87554d9ac6f8 |
files | scripts/plot/util/print.m |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/print.m Sat Apr 11 15:57:36 2020 +0200 +++ b/scripts/plot/util/print.m Sat Apr 11 16:25:52 2020 -0700 @@ -890,8 +890,16 @@ cmd = ""; endif if (! isempty (cmd)) - cmd = sprintf ("%s --quiet %s %s %s ", opts.epstool_binary, - cmd, filein, fileout); + if (dos_shell) + ## ghostscript expects double, not single, quotes + fileout(fileout == "'") = '"'; + ## epstool implicitly uses ghostscript and it needs the command name + cmd = sprintf ("%s --gs %s --quiet %s %s %s ", opts.epstool_binary, + opts.ghostscript.binary, cmd, filein, fileout); + else + cmd = sprintf ("%s --quiet %s %s %s ", opts.epstool_binary, + cmd, filein, fileout); + endif endif if (pipein) if (dos_shell)