octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #57143] print ('-tight', 'q.eps') produces no


From: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #57143] print ('-tight', 'q.eps') produces no file
Date: Sat, 11 Apr 2020 02:20:10 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36

Update of bug #57143 (project octave):

                  Status:               Confirmed => Patch Reviewed         

    _______________________________________________________

Follow-up Comment #19:

Rik, your patch works almost great.

Content of file #48807:


diff -r bc6dae9cbe73 scripts/plot/util/print.m
--- a/scripts/plot/util/print.m Thu Apr 09 15:35:57 2020 -0700
+++ b/scripts/plot/util/print.m Sat Apr 11 15:10:38 2020 +0900
@@ -890,8 +890,16 @@ function cmd = epstool (opts, filein, fi
       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)


I extended it by the lines


## ghostscript expects double, not single, quotes
fileout(fileout=="'") = '"';


as otherwise the output filename of comment #9 is surrounded by 'filename'
single quotation marks.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57143>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]