Hi!
If I use char “=” in function parameter name then TLatex does not accept it.
Example is bellow (show fit parameters should be on in TCanvas). Is there any way to use “=” there? I’m using root 5.34.
Thanks.
void Example(){
TF1 * f = new TF1("a","[0]",0.,10.) ;
f->SetParName(0,"a_{R=0}") ;
TH1D * h = new TH1D("b","b",2,0.,10.) ;
h->Fill(1) ;
h->Fit(f) ;
h->Draw() ;
}
Unfortunately, when used in a TPaveStats, the “=” is interpreted as a control character.
You could use “a_{R#equiv0}” instead.
It seems to me that this is a deficiency in ROOT 5.x and 6.x.
They both need “#eq” in TLatex and “\\eq” in TMathText (here additionally, the existing “\\=” may produce problems). Alternatively, one might define “==” as a special “control sequence” (which would simply produce a single “=”).