Mercurial > hg > octave-lyh
changeset 11039:4cbb08163a1f
Use Octave to create pdf versions of plots for documentation.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Tue, 28 Sep 2010 19:22:01 -0700 |
parents | 35416c9baf76 |
children | 9ac165a67747 |
files | doc/ChangeLog doc/interpreter/Makefile.am doc/interpreter/geometryimages.m doc/interpreter/images.awk doc/interpreter/interpimages.m doc/interpreter/plotimages.m doc/interpreter/sparseimages.m |
diffstat | 7 files changed, 17 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,11 @@ +2010-09-28 Rik <octave@nomad.inbox5.com> + + * doc/interpreter/Makefile.am, doc/interpreter/geometryimages.m, + doc/interpreter/images.awk, doc/interpreter/interpimages.m, + doc/interpreter/plotimages.m, doc/interpreter/sparseimages.m: Use + Octave to create pdf versions of plots for documentation rather than + Ghostscript via Makefile. + 2010-09-28 Rik <octave@nomad.inbox5.com> * doc/interpreter/geometryimages.m, doc/interpreter/interpimages.m,
--- a/doc/interpreter/Makefile.am +++ b/doc/interpreter/Makefile.am @@ -89,9 +89,6 @@ $(srcdir)/images.mk: $(srcdir)/config-images.sh $(srcdir)/images.awk $(srcdir)/images $(srcdir)/config-images.sh $(top_srcdir) -.eps.pdf: - if [ -f $< ] ; then $(GHOSTSCRIPT) -dBATCH -dEPSCrop -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$@ $< ; fi - IMAGES = \ $(IMAGES_EPS) \ $(IMAGES_PDF) \
--- a/doc/interpreter/geometryimages.m +++ b/doc/interpreter/geometryimages.m @@ -17,6 +17,7 @@ ## <http://www.gnu.org/licenses/>. function geometryimages (nm, typ) + backend ("gnuplot"); set_print_size (); hide_output (); if (strcmp (typ, "png"))
--- a/doc/interpreter/images.awk +++ b/doc/interpreter/images.awk @@ -25,12 +25,6 @@ printf ("IMAGES_%s += $(%s_%s)\n", uext, ubasename, uext); - # Skip building pdf images in Octave - # Use Makefile rule to transform .eps files to .pdf - if (ext == "pdf") { - continue; - } - if (ext == "png") { printf ("HTMLDIR_IMAGES += "); for (j = 2; j <= NF; j++)
--- a/doc/interpreter/interpimages.m +++ b/doc/interpreter/interpimages.m @@ -17,6 +17,7 @@ ## <http://www.gnu.org/licenses/>. function interpimages (nm, typ) + backend ("gnuplot"); set_print_size (); hide_output (); if (strcmp (typ, "png"))
--- a/doc/interpreter/plotimages.m +++ b/doc/interpreter/plotimages.m @@ -17,6 +17,7 @@ ## <http://www.gnu.org/licenses/>. function plotimages (nm, typ) + backend ("gnuplot"); set_print_size (); hide_output (); if (strcmp (typ, "png"))
--- a/doc/interpreter/sparseimages.m +++ b/doc/interpreter/sparseimages.m @@ -17,6 +17,7 @@ ## <http://www.gnu.org/licenses/>. function sparseimages (nm, typ) + backend ("gnuplot"); set_print_size (); if (strcmp (typ, "png")) set (0, "defaulttextfontname", "*"); @@ -72,7 +73,7 @@ hide_output (); endfunction -function txtimages(nm,n,typ) +function txtimages(nm, n, typ) a = 10*speye(n) + sparse(1:n,ceil([1:n]/2),1,n,n) + ... sparse(ceil([1:n]/2),1:n,1,n,n); if (strcmp (nm, "gplot") || strcmp (nm, "grid")) @@ -99,7 +100,7 @@ endif endfunction -function otherimages(nm,n,typ) +function otherimages(nm, n, typ) hide_output (); if (strcmp (typ, "eps")) d_typ = "-depsc2"; @@ -135,7 +136,7 @@ endif endfunction -function printsparse(a,nm) +function printsparse(a, nm) fid = fopen (nm,"wt"); fputs (fid, "\n"); for i = 1:size(a,1) @@ -173,7 +174,7 @@ fclose(fid); endfunction -function femimages (nm,typ) +function femimages (nm, typ) hide_output (); if (strcmp (typ, "eps")) d_typ = "-depsc2"; @@ -289,7 +290,7 @@ z = sin (r) ./ r; unwind_protect mesh (x, y, z); - title ("Sorry, graphics not available because octave was\\ncompiled without the sparse matrix implementation."); + title ("Sorry, graphics are unavailable because Octave was\ncompiled without a sparse matrix implementation."); unwind_protect_cleanup print (cstrcat (nm, ".", typ), d_typ); hide_output ();