TMathText further limitations

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:

All what you mentioned here is known. The answer to it is kind of given it the last paragraph of:
sft.its.cern.ch/jira/browse/ROOT-5039
"3rd party software" in the key word… unfortunately the code is written is a way that only the author can extend or debug it. It did only some minor fixes “à la marge”. I can give you his email to ask him some precisions. He is aware of all these issues… but …

[quote]All what you mentioned here is known.[/quote]So it should be documented somewhere…
Adding warnings in TMathText class description could be a good start.

How about[quote]- latex3_.png: TMathText cannot be used in TPaveText[/quote]Doesn’t it depend on ROOT?

Cheers,
M

Yes we can add a link to sft.its.cern.ch/jira/browse/ROOT-5443 in the TMathText Doc

Seems to me it can, try:

{
   TCanvas *c1 = new TCanvas("c1", "c1",1034,44,700,530);
   TPaveText *pt = new TPaveText(0.3,0.4,0.8,0.6,"br");
   pt->AddText("a\\alpha");
   pt->Draw();
}