changeset 6727:3d1e0a056e6e

[project @ 2007-06-14 20:45:10 by jwe]
author jwe
date Thu, 14 Jun 2007 20:47:47 +0000
parents 6b7ba4a31876
children a25173d58101
files scripts/ChangeLog scripts/plot/print.m src/ChangeLog src/graphics.cc
diffstat 4 files changed, 49 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Thu Jun 14 20:16:45 2007 +0000
+++ b/scripts/ChangeLog	Thu Jun 14 20:47:47 2007 +0000
@@ -2,6 +2,11 @@
 
 	* plot/__go_draw_axes__.m: Handle text rotation property.
 
+2007-06-14  Sebastian Schubert  <sebastian-schubert@gmx.de>
+
+	* plot/print.m: Handle pstex, pslatex, epslatex, and
+	epslatexstandalone terminals.
+
 2007-06-14  David Bateman  <dbateman@free.fr>
 
 	* general/__splinen__.m: Check also for ND vectors. Fix for N > 2,
--- a/scripts/plot/print.m	Thu Jun 14 20:16:45 2007 +0000
+++ b/scripts/plot/print.m	Thu Jun 14 20:47:47 2007 +0000
@@ -168,15 +168,23 @@
     dev = devopt;
   endif
 
-  if (strcmp (dev, "ill"))
+  if (strcmp (dev, "tex"))
+    dev = "epslatex";
+    ## gnuplot 4.0 wants ".eps" in the output name    
+    if (compare_versions (__gnuplot_version__, "4.2", "<"))
+      name = strcat (name(1:dot), "eps");
+    endif
+  elseif (strcmp (dev, "ill"))
     dev = "aifm";
   elseif (strcmp (dev, "cdr"))
     dev = "corel";
   endif
 
   ## check if we have to use convert
-  dev_list = {"aifm" "corel" "fig" "png" "pbm" "dxf" "mf" "hpgl", ...
-	      "ps" "ps2" "psc" "psc2" "eps" "eps2" "epsc" "epsc2" "emf"};
+  dev_list = {"aifm", "corel", "fig", "png", "pbm", "dxf", "mf", ...
+	      "hpgl", "ps", "ps2", "psc", "psc2", "eps", "eps2", ...
+	      "epsc", "epsc2", "emf", "pstex", "pslatex", ...
+	      "epslatex", "epslatexstandalone"};
   convertname = "";
   [idx, errmsg] = cellidx (dev_list, dev);
   if (! idx)
@@ -192,15 +200,32 @@
   if (strcmp (dev, "ps") || strcmp (dev, "ps2") ...
       || strcmp (dev, "psc")  || strcmp (dev, "psc2")
       || strcmp (dev, "epsc") || strcmp (dev, "epsc2")
-      || strcmp (dev, "eps")  || strcmp (dev, "eps2"))
+      || strcmp (dev, "eps")  || strcmp (dev, "eps2")
+      || strcmp (dev, "pstex")|| strcmp (dev, "pslatex")
+      || strcmp (dev, "epslatex") || strcmp (dev, "epslatexstandalone"))
+
     ## Various postscript options
-    if (dev(1) == "e")
-      options = "eps ";
+    if (strcmp (dev, "pstex")|| strcmp (dev, "pslatex")
+	|| strcmp (dev, "epslatex"))
+      termn = dev;
+      options = "";
+    elseif (strcmp (dev, "epslatexstandalone"))
+      if (compare_versions (__gnuplot_version__, "4.2", ">="))
+	termn = "epslatex";
+	options = "standalone ";
+      else
+	error ("print: epslatexstandalone needs gnuplot 4.2 or higher");
+      endif
     else
-      options = strcat (orientation, " ");
+      if (dev(1) == "e")
+	options = "eps ";
+      else
+	options = strcat (orientation, " ");
+      endif
+      options = strcat (options, "enhanced ");
+      termn = "postscript";
     endif
-    options = strcat (options, "enhanced ");
-
+    
     if (any (dev == "c") || use_color > 0)
       if (force_solid < 0)
 	options = strcat (options, "color dashed ");
@@ -221,9 +246,9 @@
     if (! isempty (fontsize))
       options = strcat (options, " ", fontsize);
     endif
-
-    new_terminal = strcat ("postscript ", options);
-
+    
+    new_terminal = strcat (termn, " ", options);
+    
   elseif (strcmp (dev, "aifm") || strcmp (dev, "corel"))
     ## Adobe Illustrator, CorelDraw
     if (use_color >= 0)
--- a/src/ChangeLog	Thu Jun 14 20:16:45 2007 +0000
+++ b/src/ChangeLog	Thu Jun 14 20:47:47 2007 +0000
@@ -13,6 +13,10 @@
 	text::text_properties::set, text::text_properties::get, 
 	text::text_properties::factory_defaults): Handle rotation property.
 
+2007-06-14  Kai Habel <kai.habel@gmx.de>
+
+	* graphics.cc (color_values::c2rgb): Also accept 'k' for black.
+
 2007-06-14  David Bateman  <dbateman@free.fr>
 
 	* ov-ch-mat.h (idx_vector index_vector (void) const): Remove
--- a/src/graphics.cc	Thu Jun 14 20:16:45 2007 +0000
+++ b/src/graphics.cc	Thu Jun 14 20:47:47 2007 +0000
@@ -103,6 +103,9 @@
 
   switch(c) 
     {
+    case 'k':
+      break;
+
     case 'r':
       tmp_rgb[0] = 1;	
       break;