[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50130] 'print -dpdflatex' forgets putting sup
From: |
Pantxo Diribarne |
Subject: |
[Octave-bug-tracker] [bug #50130] 'print -dpdflatex' forgets putting superscripts inside math-environment. |
Date: |
Tue, 24 Jan 2017 09:54:14 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 |
Update of bug #50130 (project octave):
Status: None => Confirmed
Operating System: GNU/Linux => Any
_______________________________________________________
Follow-up Comment #2:
Hi,
Thanks for your report. I think you are right that labels that are generated
by Octave itself could be handled by Octave. Changing text provided by the
user is another story:
* Octave has a "tex" interpreter, which means it can handle a *subset* of
latex formatting, in line (without the need for $). So far so good.
* Octave doesn't have a "latex" interpreter (in the background, it is the same
as "tex"). But if it had, "function of e^x." would not be a valid expression
for the "latex" interpreter. The user would have to enclose the inline math
expression between $ himself.
So I think someone who wants to print using latex output formats should take
care of having valid text strings himself (as will be necessary when a proper
latex interpreter is implemented), except for those generated by Octave
itself.
For those, a workaround is to use something like :
function fixlabels (hax)
for s = ['x' 'y' 'z']
if (strcmp (get (hax, [s "scale"]), "log") &&
strcmp (get (hax, [s "ticklabelmode"]), "auto"))
labs = get (hax, [s "ticklabel"]);
labs = cellfun (@(ss) ["$" ss "$"], labs, "uniformoutput", 0);
set (hax, [s "ticklabel"], labs)
endif
endfor
endfunction
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50130>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/