# HG changeset patch # User Rik # Date 1285726921 25200 # Node ID 4cbb08163a1fb9ca7f4c42bf199cc3e50721d8bb # Parent 35416c9baf76cada668f4470cc9ef3c3554efd96 Use Octave to create pdf versions of plots for documentation. diff --git a/doc/ChangeLog b/doc/ChangeLog --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,11 @@ +2010-09-28 Rik + + * 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 * doc/interpreter/geometryimages.m, doc/interpreter/interpimages.m, diff --git a/doc/interpreter/Makefile.am b/doc/interpreter/Makefile.am --- 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) \ diff --git a/doc/interpreter/geometryimages.m b/doc/interpreter/geometryimages.m --- a/doc/interpreter/geometryimages.m +++ b/doc/interpreter/geometryimages.m @@ -17,6 +17,7 @@ ## . function geometryimages (nm, typ) + backend ("gnuplot"); set_print_size (); hide_output (); if (strcmp (typ, "png")) diff --git a/doc/interpreter/images.awk b/doc/interpreter/images.awk --- 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++) diff --git a/doc/interpreter/interpimages.m b/doc/interpreter/interpimages.m --- a/doc/interpreter/interpimages.m +++ b/doc/interpreter/interpimages.m @@ -17,6 +17,7 @@ ## . function interpimages (nm, typ) + backend ("gnuplot"); set_print_size (); hide_output (); if (strcmp (typ, "png")) diff --git a/doc/interpreter/plotimages.m b/doc/interpreter/plotimages.m --- a/doc/interpreter/plotimages.m +++ b/doc/interpreter/plotimages.m @@ -17,6 +17,7 @@ ## . function plotimages (nm, typ) + backend ("gnuplot"); set_print_size (); hide_output (); if (strcmp (typ, "png")) diff --git a/doc/interpreter/sparseimages.m b/doc/interpreter/sparseimages.m --- a/doc/interpreter/sparseimages.m +++ b/doc/interpreter/sparseimages.m @@ -17,6 +17,7 @@ ## . 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 ();