octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58374] print function creates path not readab


From: Rik
Subject: [Octave-bug-tracker] [bug #58374] print function creates path not readable by latex
Date: Sat, 16 May 2020 12:28:16 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #7, bug #58374 (project octave):

This fix is simple and should have worked.  I think it may have been placed in
the wrong location.  I was working with the development branch of Octave and
there have been changes to print.m which means the line numbers where the code
insertion should go are different.  In version 5.2 the line number for
insertion is 952.  Here is the code as it should appear


function latex_standalone (opts)

  n = find (opts.name == ".", 1, "last");
  if (! isempty (n))
    opts.name = opts.name(1:n-1);
  endif
  latexfile = [opts.name ".tex"];

  switch (opts.devopt)
    case {"pdflatexstandalone"}
      packages = "\\usepackage{graphicx,color}";
      graphicsfile = [opts.name "-inc.pdf"];
    case {"pslatexstandalone"}
      packages = "\\usepackage{epsfig,color}";
      graphicsfile = [opts.name "-inc.ps"];
    otherwise
      packages = "\\usepackage{epsfig,color}";
      graphicsfile = [opts.name "-inc.eps"];
  endswitch
  if (ispc ())
    ## Note: Necessary because filesep '\' on Windows is escape char in
Latex.
    graphicsfile = strrep (graphicsfile, '\', '/');
  endif

  papersize = sprintf
("\\usepackage[papersize={%.2fbp,%.2fbp},text={%.2fbp,%.2fbp}]{geometry}",
                       fix (opts.canvas_size), fix (opts.canvas_size));


Could you try this?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58374>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]