# HG changeset patch # User Rik # Date 1586647552 25200 # Node ID c3dd445fcc2f02e68a11f832119c60f91170bb7a # Parent 11d66485fc192dcac5960d215fec02e069606752 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. diff -r 11d66485fc19 -r c3dd445fcc2f scripts/plot/util/print.m --- 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)