gr: no longer handle '_' and '^' in text

This commit is contained in:
Josef Heinen 2017-08-09 10:46:23 +02:00
parent bc36749f6d
commit a937fa0ef8

View File

@ -179,7 +179,7 @@ gr_inqtext(x, y, s::Symbol) = gr_inqtext(x, y, string(s))
function gr_inqtext(x, y, s) function gr_inqtext(x, y, s)
if length(s) >= 2 && s[1] == '$' && s[end] == '$' if length(s) >= 2 && s[1] == '$' && s[end] == '$'
GR.inqtextext(x, y, s[2:end-1]) GR.inqtextext(x, y, s[2:end-1])
elseif search(s, '\\') != 0 || search(s, '_') != 0 || search(s, '^') != 0 elseif search(s, '\\') != 0
GR.inqtextext(x, y, s) GR.inqtextext(x, y, s)
else else
GR.inqtext(x, y, s) GR.inqtext(x, y, s)
@ -191,7 +191,7 @@ gr_text(x, y, s::Symbol) = gr_text(x, y, string(s))
function gr_text(x, y, s) function gr_text(x, y, s)
if length(s) >= 2 && s[1] == '$' && s[end] == '$' if length(s) >= 2 && s[1] == '$' && s[end] == '$'
GR.mathtex(x, y, s[2:end-1]) GR.mathtex(x, y, s[2:end-1])
elseif search(s, '\\') != 0 || search(s, '_') != 0 || search(s, '^') != 0 elseif search(s, '\\') != 0
GR.textext(x, y, s) GR.textext(x, y, s)
else else
GR.text(x, y, s) GR.text(x, y, s)