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

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

[Octave-bug-tracker] [bug #51640] latex mode no longer works


From: Rik
Subject: [Octave-bug-tracker] [bug #51640] latex mode no longer works
Date: Sat, 12 Aug 2017 18:27:21 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Update of bug #51640 (project octave):

                  Status:                    None => Wont Fix               
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #4:

I found the issue which is that Octave no longer wraps text strings with '$'
in latex interpreter mode.  This was an architectural decision.  Only the
programmer knows which parts of a string should be set as regular text and
which should be set in Math mode.  Accordingly, Octave no makes no
modifications and it is up to the programmer to construct a valid LaTeX
string.

Here is an example:


ht = text (0.25, 0.5, 'This is LaTeX text with inline formula $e^{i \pi} =
-1$', 'interpreter', 'latex');

print -dpdflatexstandalone tst_latex2
system ("pdflatex tst_latex2.tex");
open tst_latex2.pdf


I re-coded the example you sent and it works if I wrap the strings with '$'. 
I also explicitly set the interpreter to 'latex'.  If the entire plot is going
to use the latex interpreter it might be easier to set it as the default with


set (0, 'DefaultTextInterpreter', 'latex');


Here is the new code for your example:


close all;
hf = figure;
cv = [58.125, 35.727];
ha = axes ('view', cv);
xlabel ('$\omega_2$');
ylabel ('$\omega_1$');
title ("MyFunction");
m = 10;
axis ([0 14 0 25 -2 2]);
text (m+3,-6.5,-1.6,'$\pi/2$', 'interpreter', 'latex');
text (m+4,24,-2,'$\pi$', 'interpreter', 'latex');
zlabel('$P(\omega_1, \omega_2, \omega_3)$','interpreter','latex');
print -dpdflatexstandalone fig_5_4_meshx
[r, status] = system ("pdflatex fig_5_4_meshx.tex")


I've attached both files as well.

I'm going to mark this as "Won't Fix" since we made the change for a good
reason to give programmers more flexibility in how they want the output
generated.




(file #41496, file #41497)
    _______________________________________________________

Additional Item Attachment:

File name: tst_latex.m                    Size:0 KB
File name: tst_latex2.m                   Size:0 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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