changeset 22571:83f106bfcb37 stable

Make "pdflatex" an alias of "pdfcairolatex" for gnuplot toolkit print (bug #49223). * print.m: Add carriage returns to Xfig documentation string. * __gnuplot_print__.m: Add "pdflatexstandalone" and "pdflatex" to case where cairolatex gnuplot terminal is used. Add "pdf" option if terminal contains "pdflatex". Replace "pdflatex" in term string with "cairolatex". (font_spec): Add "pdflatexstandalone" and "pdflatex" to case where cairolatex terminal font specs are processed. * __print_parse_opts__.m: Add "epscairo", "cairolatex", "pdfcairolatex", "pdfcairolatexstandalone", "epscairolatex", and "epscairolatexstandalone" along with associated extension strings to the dev_list and suffixes cell arrays, respectively.
author Daniel J Sebald <daniel.sebald@ieee.org>
date Fri, 30 Sep 2016 20:46:25 -0500
parents d3adf6999939
children d65ed83dfd13
files scripts/plot/util/print.m scripts/plot/util/private/__gnuplot_print__.m scripts/plot/util/private/__print_parse_opts__.m
diffstat 3 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/print.m	Fri Sep 30 17:23:39 2016 -0700
+++ b/scripts/plot/util/print.m	Fri Sep 30 20:46:25 2016 -0500
@@ -160,7 +160,9 @@
 ##
 ##   @item fig
 ##     XFig.  For the Gnuplot graphics toolkit, the additional options
-## @option{-textspecial} or @option{-textnormal} can be used to control whether the special flag should be set for the text in the figure.  (default is @option{-textnormal})
+## @option{-textspecial} or @option{-textnormal} can be used to control
+## whether the special flag should be set for the text in the figure.
+## (default is @option{-textnormal})
 ##
 ##   @item gif
 ##     GIF image (only available for the Gnuplot graphics toolkit)
--- a/scripts/plot/util/private/__gnuplot_print__.m	Fri Sep 30 17:23:39 2016 -0700
+++ b/scripts/plot/util/private/__gnuplot_print__.m	Fri Sep 30 20:46:25 2016 -0500
@@ -115,7 +115,8 @@
       local_drawnow ([opts.devopt " " gp_opts], opts.name, opts);
     case {"cairolatex", "epscairo", "epscairolatex", ...
           "epscairolatexstandalone", "pdfcairo", "pdfcairolatex", ...
-          "pdfcairolatexstandalone", "pngcairo"}
+          "pdfcairolatexstandalone", "pngcairo", ...
+          "pdflatexstandalone", "pdflatex"}
       term = opts.devopt;
       if (strfind (term, "standalone"))
         gp_opts = sprintf ("standalone %s", gp_opts);
@@ -124,9 +125,10 @@
       if (strfind (term, "epscairolatex"))
         gp_opts = sprintf ("eps %s", gp_opts);
         term = strrep (term, "epscairolatex", "cairolatex");
-      elseif (strfind (term, "pdfcairolatex"))
+      elseif (strfind (term, "pdfcairolatex") || strfind (term, "pdflatex"))
         gp_opts = sprintf ("pdf %s", gp_opts);
         term = strrep (term, "pdfcairolatex", "cairolatex");
+        term = strrep (term, "pdflatex", "cairolatex");
       endif
       if (__gnuplot_has_terminal__ (term))
         local_drawnow ([term " " gp_opts], opts.name, opts);
@@ -273,7 +275,8 @@
       endif
     case {"cairolatex", "epscairo", "epscairolatex", ...
           "epscairolatexstandalone", "pdfcairo", "pdfcairolatex", ...
-          "pdfcairolatexstandalone", "pngcairo"}
+          "pdfcairolatexstandalone", "pngcairo", ...
+          "pdflatexstandalone", "pdflatex"}
       if (! isempty (opts.font) && ! isempty (opts.fontsize))
         f = sprintf ('font "%s,%d"', opts.font, opts.fontsize);
       elseif (! isempty (opts.font))
--- a/scripts/plot/util/private/__print_parse_opts__.m	Fri Sep 30 17:23:39 2016 -0700
+++ b/scripts/plot/util/private/__print_parse_opts__.m	Fri Sep 30 20:46:25 2016 -0500
@@ -228,7 +228,9 @@
               "pstex", "tiff", "tiffn" "tikz", "pcxmono", ...
               "pcx24b", "pcx256", "pcx16", "pgm", "pgmraw", ...
               "ppm", "ppmraw", "pdflatex", "texdraw", ...
-              "pdfcairo", "pngcairo", "pstricks", ...
+              "epscairo", "pdfcairo", "pngcairo", "cairolatex", ...
+              "pdfcairolatex", "pdfcairolatexstandalone", ...
+              "epscairolatex", "epscairolatexstandalone", "pstricks", ...
               "epswrite", "eps2write", "pswrite", "ps2write", "pdfwrite"};
 
   suffixes = {"ai", "cdr", "fig", "png", "jpg", ...
@@ -240,7 +242,9 @@
               "ps", "tiff", "tiff", "tikz", "pcx", ...
               "pcx", "pcx", "pcx", "pgm", "pgm", ...
               "ppm", "ppm", "tex", "tex", ...
-              "pdf", "png", "tex", ...
+              "eps", "pdf", "png", "tex", ...
+              "tex", "tex", ...
+              "tex", "tex", "tex", ...
               "eps", "eps", "ps", "ps", "pdf"};
 
   if (isfigure (arg_st.figure))