[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
clean up for plot.txt used in texinfo
From: |
Joseph P. Skudlarek |
Subject: |
clean up for plot.txt used in texinfo |
Date: |
Sat, 17 Nov 2007 00:11:02 -0800 |
The info file generation would complain
makeinfo -I.. -I. -I./.. ./octave.texi
.//plot.texi:68: warning: @image file `plot.txt' (for text) unreadable: No such
file or directory.
.//plot.texi:311: warning: @image file `hist.txt' (for text) unreadable: No
such file or directory.
.//plot.texi:587: warning: @image file `errorbar.txt' (for text) unreadable: No
such file or directory.
.//plot.texi:749: warning: @image file `polar.txt' (for text) unreadable: No
such file or directory.
.//plot.texi:984: warning: @image file `mesh.txt' (for text) unreadable: No
such file or directory.
.//plot.texi:1007: warning: @image file `plot3.txt' (for text) unreadable: No
such file or directory.
To fix this, and to have improve the look of the plots in the info file,
please consider the following patch.
doc/ChangeLog Entry
2007-11-16 Joseph P. Skudlarek <address@hidden>
* interpreter/Makefile.in: Add <category>IMAGES_TXT macros, use
them uniformly, and populate PLOTIMAGES_TXT.
* interpreter/plotimages.m: Generate _plot_.txt file for the
texinfo @image command to process.
* interpreter/sparseimages.m: Add initial blank line to txt plots
so they reproduce better in info files.
Patch
--- ../octave-2.9.17/doc/interpreter/Makefile.in 2007-10-26
11:22:05.000000000 -0700
+++ doc/interpreter/Makefile.in 2007-11-16 23:32:40.000000000 -0800
@@ -60,16 +60,19 @@
GEOMETRYIMAGES_EPS = $(addsuffix .eps, $(GEOMETRYIMAGES))
GEOMETRYIMAGES_PDF = $(addsuffix .pdf, $(GEOMETRYIMAGES))
GEOMETRYIMAGES_PNG = $(addsuffix .png, $(GEOMETRYIMAGES))
+GEOMETRYIMAGES_TXT =
PLOTIMAGES = plot hist errorbar polar mesh plot3
PLOTIMAGES_EPS = $(addsuffix .eps, $(PLOTIMAGES))
PLOTIMAGES_PDF = $(addsuffix .pdf, $(PLOTIMAGES))
PLOTIMAGES_PNG = $(addsuffix .png, $(PLOTIMAGES))
+PLOTIMAGES_TXT = $(addsuffix .txt, $(PLOTIMAGES))
INTERPIMAGES = interpft interpn interpderiv1 interpderiv2
INTERPIMAGES_EPS = $(addsuffix .eps, $(INTERPIMAGES))
INTERPIMAGES_PDF = $(addsuffix .pdf, $(INTERPIMAGES))
INTERPIMAGES_PNG = $(addsuffix .png, $(INTERPIMAGES))
+INTERPIMAGES_TXT =
SPARSEIMAGES_1 = gplot grid spmatrix spchol spcholperm
SPARSEIMAGES_EPS = $(addsuffix .eps, $(SPARSEIMAGES_1))
@@ -83,7 +86,8 @@
$(GEOMETRYIMAGES_PDF) $(PLOTIMAGES_PDF)
IMAGES_PNG = $(SPARSEIMAGES_PNG) $(INTERPIMAGES_PNG) \
$(GEOMETRYIMAGES_PNG) $(PLOTIMAGES_PNG)
-IMAGES_TXT = $(SPARSEIMAGES_TXT)
+IMAGES_TXT = $(SPARSEIMAGES_TXT) $(INTERPIMAGES_TXT) \
+ $(GEOMETRYIMAGES_TXT) $(PLOTIMAGES_TXT)
HTML_IMAGES_PNG = $(addprefix HTML/, $(IMAGES_PNG))
--- ../octave-2.9.17/doc/interpreter/plotimages.m 2007-10-12
17:52:13.000000000 -0700
+++ doc/interpreter/plotimages.m 2007-11-17 00:09:57.000000000 -0800
@@ -18,7 +18,9 @@
function plotimages (nm, typ)
bury_output ();
- if (strcmp (nm, "plot"))
+ if (strcmp(typ , "txt"))
+ image_as_txt(nm);
+ elseif (strcmp (nm, "plot"))
x = -10:0.1:10;
plot (x, sin (x));
print (strcat (nm, ".", typ), strcat ("-d", typ))
@@ -61,3 +63,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
--- ../octave-2.9.17/doc/interpreter/sparseimages.m 2007-10-12
17:52:13.000000000 -0700
+++ doc/interpreter/sparseimages.m 2007-11-16 23:27:11.000000000 -0800
@@ -60,6 +60,7 @@
sparse(ceil([1:n]/2),1:n,1,n,n);
if (strcmp (nm, "gplot") || strcmp (nm, "grid"))
fid = fopen (sprintf ("%s.txt", nm), "wt");
+ fputs (fid, "\n");
fputs (fid, "+---------------------------------+\n");
fputs (fid, "| Image unavailable in text mode. |\n");
fputs (fid, "+---------------------------------+\n");
@@ -113,6 +114,7 @@
function printsparse(a,nm)
fid = fopen (nm,"wt");
+ fputs (fid, "\n");
for i = 1:size(a,1)
if (rem(i,5) == 0)
fprintf (fid," %2d - ", i);
@@ -236,6 +238,7 @@
function sombreroimage (nm, typ)
if (strcmp (typ, "txt"))
fid = fopen (sprintf ("%s.txt", nm), "wt");
+ fputs (fid, "\n");
fputs (fid, "+---------------------------------------+\n");
fputs (fid, "| Image unavailable because of a |\n");
fputs (fid, "| missing sparse matrix implementation. |\n");
[TheEnd]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- clean up for plot.txt used in texinfo,
Joseph P. Skudlarek <=