Hi there,
While trying to figure out how I could use TMathText as an alternative to TLatex
(which it is NOT, see [url=https://root-forum.cern.ch/t/latex-in-histogram-titles/16902/14 I found several limitations.
I first replaced all “#” by “\” in all $ROOTSYS/tutorials/graphics/latex*.C.
As the pictures attached below show (see here for the original pictures) :
- latex_.png : The 2-part “\sqrt” and the small “\int” symbols don’t look right
- latex2_.png: The \bar{} operator is not implemented (actually this is a known issue)
- latex3_.png: TMathText cannot be used in TPaveText
- latex4_.png: \varUpsilon is missing
- latex5_.png: many (non maths) symbols are missing
The basic piece of code below also makes Root crash!{
TLatex l;
l.DrawLatex(0.1,0.5,"x^{^{y}}"); /// ok
//l.DrawLatex(0.1,0.5,"\\varepsilon^{^{y}}"); /// seg. fault !!!
}
Other such issues have already been reported: sft.its.cern.ch/jira/browse/ROOT-5039
Voilà,
It would be nice all this to be fixed.
Cheers,
M
PS: On the way I also came across the PS & PDF issues:
- PS files generated with TMathText in the above examples are 1e3-2e3 times bigger than those with TLatex (10kB -> 20MB)! A workaround is given [url=https://root-forum.cern.ch/t/large-eps-files-when-mathscr-is-used/17856/2 Another one is: [code]ps2ps output.ps output_.ps[/code]- PDF is not supported for TMathText, see [url=https://root-forum.cern.ch/t/latex-sqrt-problem/17442/12 A workaround is to use ps: [code]ps2ps output.ps output_.ps && ps2pdf output_.ps[/code]