diff doc/interpreter/interpimages.m @ 7262:16e61aecddc1

[project @ 2007-12-05 20:50:47 by jwe]
author jwe
date Wed, 05 Dec 2007 20:50:47 +0000
parents e8a3e3e33490
children 3422f39573b1
line wrap: on
line diff
--- a/doc/interpreter/interpimages.m	Wed Dec 05 19:00:22 2007 +0000
+++ b/doc/interpreter/interpimages.m	Wed Dec 05 20:50:47 2007 +0000
@@ -21,7 +21,9 @@
   if (strcmp (typ, "png"))
     set (0, "defaulttextfontname", "*");
   endif
-  if (strcmp (nm, "interpft"))
+  if (strcmp (typ, "txt"))
+    image_as_txt (nm);
+  elseif (strcmp (nm, "interpft"))
     t = 0 : 0.3 : pi; dt = t(2)-t(1);
     n = length (t); k = 100;
     ti = t(1) + [0 : k-1]*dt*n/k;
@@ -74,3 +76,13 @@
   f = figure (1);
   set (f, "visible", "off");
 endfunction
+
+## generate something for the texinfo @image command to process
+function image_as_txt(nm)
+  fid = fopen (sprintf ("%s.txt", nm), "wt");
+  fputs (fid, "\n");
+  fputs (fid, "+---------------------------------+\n");
+  fputs (fid, "| Image unavailable in text mode. |\n");
+  fputs (fid, "+---------------------------------+\n");
+  fclose (fid);
+endfunction