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

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

[Octave-bug-tracker] [bug #45488] Manual currently is not correct about


From: Michael Godfrey
Subject: [Octave-bug-tracker] [bug #45488] Manual currently is not correct about graphics_toolkits and plots
Date: Sat, 11 Jul 2015 12:20:40 +0000
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0

Follow-up Comment #25, bug #45488 (project octave):

Rik and Mike,

plotimages.m is getting a lot better, I think, but there are
a few items left from my initial version:

First, starting at line 93 there is clumsy code which I 
cleaned up in my last version: there are 2  
if (strcmp (typ, "pdf"))
....
else
...
endif
sequences.
Obviously there should just be one. Specifically:


At line 93 of plotimages.m:


    if (strcmp (typ, "pdf"))
      text (0.65, 0.6175, ['$leftarrow x = {2oversqrt{pi}}' ...
            '{int_{0}^{x}}e^{-t^2} dt = 0.6175$']);
    else
      text (0.65, 0.6175, ['leftarrow x = {2/surdpi {fontsize{16}' ...
            'int_{fontsize{8}0}^{fontsize{8}x}} e^{-t^2} dt} = 0.6175']);
    endif
    xlabel ("x");
    ylabel ("erf (x)");
    title ("erf (x) with text annotation");
    if (strcmp (typ, "pdf"))
      print (outfile, "-dpdflatexstandalone");
      system (["pdflatex " nm]);
      delete ([nm ".aux"], [nm "-inc.pdf"], [nm ".log"], [nm ".tex"]);
    else
      print (outfile, d_typ);
    endif

is better replaced by:

    axis ([0, 3, 0, 1]);
    xlabel ("x");
    ylabel ("erf (x)");
    title ("erf (x) with text annotation");
    if (strcmp (typ, "pdf"))
      text (0.65, 0.6175, ['$leftarrow x = {2oversqrt{pi}}' ...
            '{int_{0}^{x}}e^{-t^2} dt = 0.6175$']);
      print (outfile, "-dpdflatexstandalone");
      system (["pdflatex " nm]);
      delete ([nm ".aux"], [nm "-inc.pdf"], [nm ".log"], [nm ".tex"]);
    else
      text (0.65, 0.6175, ['leftarrow x = {2/surdpi {fontsize{16}' ...
            'int_{fontsize{8}0}^{fontsize{8}x}} e^{-t^2} dt} = 0.6175']);
      print (outfile, d_typ);
    endif

I am putting this here since you are currently working on the code and a diff
would likely be based on code that is no longer current. You may have fixed
this
already anyhow.

also, would it work to replace the system(["pdflatex " nm]);
by: [status, output] = system(["pdflatex " nm]); ?
This would get rid of the direct output and "output" could be scanned
for errors if needed.

You surely know that there is something wrong indicated by the warning
messages:
Output written on extended.pdf (1 page, 78935 bytes).
Transcript written on extended.log.
warning: delete: no such file: extended-inc.pdf
warning: called from
    delete at line 47 column 9
    plotimages at line 106 column 7
warning: delete: no such file: extended.tex
================
Right now I do not understand this. It does appear that there is
something wrong with the make logic that should check when plotimages needs
to
be run and with what arguments.

If I have any time, I will try to learn more about this.

Finally, I hope that you do not feel that I have caused unnecessary trouble
by making a start on this. With all your added work this not only enhances
the Manual build, but will make use of the -dpdflatexstandalone mode a lot
clearer.

Once this settles down I could write a description for the Manual that
explains how to edit additional LaTeX into the generated .tex file. What
probably makes sense is to use input (filename) but allowing the text
to appear anywhere on the plot will need more thought. Something like
text(x,y, "input xxx"); may be a start.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45488>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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