# HG changeset patch # User jwe # Date 1196887847 0 # Node ID 16e61aecddc1f938384a153ab69312cf2ace7b44 # Parent 42dc0f2acac19247d7bbc6a3f778fae9247c20d8 [project @ 2007-12-05 20:50:47 by jwe] diff --git a/doc/ChangeLog b/doc/ChangeLog --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,10 @@ +2007-12-05 John W. Eaton + + * interpreter/geometryimages.m (image_as_txt): New function. + Use it to generate "figures" for Info format. + * interpreter/interpimages.m: Likewise. + * interpreter/sparseimages.m: Likewise. + 2007-12-04 John W. Eaton * interpreter/sparseimages.m, interpreter/plotimages.m, diff --git a/doc/interpreter/geometryimages.m b/doc/interpreter/geometryimages.m --- a/doc/interpreter/geometryimages.m +++ b/doc/interpreter/geometryimages.m @@ -26,6 +26,8 @@ || strcmp (nm, "convhull") || strcmp (nm, "delaunay") || strcmp (nm, "triplot"))) sombreroimage (nm, typ); + elseif (strcmp (typ, "txt")) + image_as_txt (nm); elseif (strcmp (nm, "voronoi")) rand("state",9); x = rand(10,1); @@ -194,3 +196,13 @@ end_unwind_protect endif 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 diff --git a/doc/interpreter/interpimages.m b/doc/interpreter/interpimages.m --- a/doc/interpreter/interpimages.m +++ b/doc/interpreter/interpimages.m @@ -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 diff --git a/doc/interpreter/sparseimages.m b/doc/interpreter/sparseimages.m --- a/doc/interpreter/sparseimages.m +++ b/doc/interpreter/sparseimages.m @@ -262,3 +262,13 @@ end_unwind_protect endif 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