Merge pull request #1003 from jheinen/master

gr: no longer handle '_' and '^' in text
This commit is contained in:
Josef Heinen 2017-08-09 11:03:55 +02:00 committed by GitHub
commit 2ab7f3c767

View File

@ -179,7 +179,7 @@ gr_inqtext(x, y, s::Symbol) = gr_inqtext(x, y, string(s))
function gr_inqtext(x, y, s)
if length(s) >= 2 && s[1] == '$' && s[end] == '$'
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)
else
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)
if length(s) >= 2 && s[1] == '$' && s[end] == '$'
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)
else
GR.text(x, y, s)